[src/resources/dicts/](https://github.com/logseq/logseq/blob/master/src/resources/dicts/) with each language having its own file. For example, the es locale is in `es.edn`.
Now, manually, add keys for your language to the translation files, save and rerun the above command.
Over time you're aiming to have this list drop to zero. Since this process can be tedious, there is an option to print the untranslated strings to copy and paste them to the files:
Almost all translations are small. The only exceptions to this are keys that point to files e.g. their value is prefixed with `#resource`. TODO: Update when new tutorials are written
* Some translations may include punctuation like `:` or `!`. When translating them, please use the punctuation that makes the most sense for your language as you don't have to follow the English ones.
* Some translations may include arguments/interpolations e.g. `{1}`. If you see them in a translation, be sure to include them. These arguments are substituted in the string and are usually used for something the app needs to calculate e.g. a number. See [these docs](https://github.com/tonsky/tongue#interpolation) for more examples.
* Rarely, a translation is a function that calls code and look like `(fn ... )`
* The logic for these fns must be simple and can only use the following fns: `str`, `when`, `if` and `=`.
* These fn translations are usually used to handle pluralization or handle formatted text by returning [hiccup-style HTML](https://github.com/weavejester/hiccup#syntax). For example, a hiccup style translation would look like `(fn [] [:div "FOO"])`. See `:on-boarding/main-title` for more examples.
There is a lint command to catch common translation mistakes - `bb
lang:validate-translations`. This runs for all contribution pull requests so
you'll need to ensure it doesn't fail. Mistakes that it catches:
* Adding translation entries for nonexistent entries in English.
* Most common mistake is mistyping an entry name
* Adding English entries for translations that don't exist in the UI.
* Adding translation entries that are just duplicates of the English entry.
* This catches contributors copying entries from English and then forgetting to translate. Sometimes you do want to have the translation be the same. For this case, add an entry to `allowed-duplicates` in
[lang.clj](https://github.com/logseq/logseq/blob/master/scripts/src/logseq/tasks/lang.clj) for your language
with a list of duplicated entries e.g. `:nb-NO #{:port ...}`.