Locales and key rules after CLI v0
How CLI v0 locales, key rules, lockedPatterns and other file-entry settings carry over to .lingo/config.json.
Locales and key rules #
locale.source and locale.targets become sourceLocale and targetLocales, written as BCP 47 codes such as pt-BR or zh-Hans. Write an Android-style cs-rCZ as cs-CZ; the android format still writes the values-cs-rCZ folder. For paths with underscores, such as pt_BR, which v0 configured with "delimiter": "_", set "localeFormat": "underscore" on the file entry.
lockedKeys, preservedKeys and ignoredKeys keep their names and meaning. They work for JSON, JSONC, JSON5, TypeScript, PHP, YAML, .properties, Android strings.xml, .strings and .xcstrings files, and .stringsdict supports lockedKeys and preservedKeys. Android, .strings and .xcstrings rules need CLI 1.24.0 or newer. CSV, XML and WebVTT entries refuse them, and other formats translate every string.
In .properties, Android, .strings and .xcstrings files a pattern matches keys or resource names as v0 matched them: a key equal to it, a key that continues it after ., / or -, or a key matching it as a glob. So those patterns carry over unchanged, except one that is $ or starts with $. or $[, which is now a JSONPath query.
Write key paths with dots, as in brand.name. The CLI also reads v0's brand/name, but the GitHub App rejects it. lingo migrate writes the dotted path, or a JSONPath query where a dotted one would select other keys: v0's items/0 becomes $.items[0,"0"], because it matched both an array item and a key named 0, and app.name, which v0 read as one key, becomes $["app.name"]. Key controls covers wildcards and keys that contain dots.
exclude, lockedPatterns, keyColumn and injectLocale keep their names. lockedPatterns works only for .properties files, keyColumn describes a CSV file with a column per locale, and injectLocale writes one key, as in { "enabled": true, "key": "meta.locale" }. locale.extraSource, localizableKeys, formatter and dev.usePseudotranslator have no equivalent; run your formatter after lingo push --wait. Configuration lists every current field.
Back to Migration reference.