Skip to content

Add missing languages and correct translations of languages.#1161

Merged
adamshiervani merged 9 commits into
jetkvm:devfrom
IDisposable:chore/fix-locale-name
Jan 28, 2026
Merged

Add missing languages and correct translations of languages.#1161
adamshiervani merged 9 commits into
jetkvm:devfrom
IDisposable:chore/fix-locale-name

Conversation

@IDisposable
Copy link
Copy Markdown
Contributor

@IDisposable IDisposable commented Jan 27, 2026

Summary

  • When languages are added to the localization options, we need to always add them to each language. This was not done when Japanese and Portuguese were added so we didn't have a self-localized display string for those in the English locale.
  • When languages are added to the localization options, we need to add all other languages in the language of the new localization. For all locale*.json_ files, this means the translation of a "locale_*": should be in the language OF the containing locale file. For example, in the locale_pt.json, we should have "locale_en": "Inglês". This is different from the locale_en.json which always shows the name in the native language of the locale being represented, e.g. "locale_es": "Español", is the Spanish way of saying spanish.

Changes

  • Add missing locale_jp and locale_pt to all the existing languages (were missed when those PRs were merged)
    • In the en.json added them in their own native language
    • In the rest added them in the native language of the containing file
  • Corrected the locale translations in ja.json to be in Japanese (e.g. "locale_en": "英語", for English)
  • Corrected the locale translations in zh-tw.json to be in Traditional Chinese (e.g. "locale_es": "西班牙語", for Spanish)
  • Correct the Chinese locale option translations in all the other ui/localization/messages/ files as they should be in the native language of the containing file (e.g, "locale_zh": "Kinesisk (forenklet)", for the Danish translation of Chinese)
  • Resorted translations using npm run i18n:resort for diff-stability later
  • Updated documentation of the process of adding localizations to spell out the need to resort, and how to correctly create a new localization target.
  • Added utility function getLocalizedMessage that allows dynamic access to the localized strings and updated the map_locale_code_to_name to use it so we don't need to also update the previous switch statement.

Checklist

  • Ran make test_e2e locally and passed
  • Linked to issue(s) above by issue number (e.g. Closes #<issue-number>)
  • One problem per PR (no unrelated changes)
  • Lints pass; CI green

Japanese and Portuguese were not added to the translations.
Japanese locale strings need to be in Japanese.
Portuguese locale strings need to be in Portuguese.
 Chinese (Traditional) locale strings need to be in Chinese (Traditional).
Always use (bokmål) for "book language" Norwegian.
Resorted using `npm run i18n:resort`
@IDisposable IDisposable changed the base branch from main to dev January 27, 2026 19:42
Comment thread ui/localization/messages/ja.json Outdated
Needed to document the steps for adding the other languages.
@IDisposable
Copy link
Copy Markdown
Contributor Author

IDisposable commented Jan 27, 2026

The design spelled out here are intended to ensure that when the UI is in English (the default), we show each language in their native language and when the UI is in any other language we show the languages in both the current language and in their native language.

Thus the language selector to looks like this in German:
image
(notice in 0.5.2 that the Chinese is incorrectly displaying only Chinese... this is because the line in the de.json for "locale_zh"was not entered in Chinese, not as a German phrase.)

...and this for for English (the default language)
image

They should be in the native language of the containing file.
Copy link
Copy Markdown
Contributor

@adamshiervani adamshiervani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Just one small docs change.

Comment thread DEVELOPMENT.md Outdated
Sorted language codes (leaving English at top as default)
Address review comments.
@IDisposable
Copy link
Copy Markdown
Contributor Author

Here's the results of the changes
image
image

Added a generic helper function that maps localized messages to their inlang/paraglide formatting function.
Copy link
Copy Markdown
Contributor

@adamshiervani adamshiervani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need that Japanese bokmål fix and then we'r good to go! Great catch

@IDisposable
Copy link
Copy Markdown
Contributor Author

Just need that Japanese bokmål fix and then we'r good to go! Great catch

Updated and pushed.

@adamshiervani adamshiervani merged commit b1cdeb2 into jetkvm:dev Jan 28, 2026
4 checks passed
@IDisposable IDisposable deleted the chore/fix-locale-name branch January 28, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants