Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.76 KB

I18N.md

File metadata and controls

30 lines (24 loc) · 1.76 KB

Translations

English is the source and fallback. Simplified Chinese is bundled in internal/locale/locales/zh-Hans.json. MyGo resolves the OS preferred languages; Nudilo stores system by default. Settings can explicitly select a language. The selected language applies immediately to views, menus, feedback and new outgoing notifications. The system appearance is also followed by default.

Add a language

  1. Copy internal/locale/locales/en.json to a BCP 47 filename, for example ja.json.
  2. Set @@locale to that tag and translate values, preserving message keys and named ICU placeholders.
  3. Run make check. Every source key and argument must be present.
  4. Review all pages in light and dark mode, including the minimum 880 × 620 window.
  5. Package with make package. The language picker and macOS .lproj / CFBundleLocalizations metadata are derived from the catalogs.

Messages use locale.Text(language, key, args...) or a.tr(key, args...). Arguments follow their order in the English source. Stored feedback uses locale.Message so changing language also updates messages already on screen and structured errors loaded from history. User content and external diagnostics are not translated. Legacy static Chinese history notes are mapped when displayed.

MyGo's native control and menu translations come from its pinned language packages. Add a corresponding MyGo locale import when available. Unsupported system languages fall back to English. Layout direction for a new RTL language requires a separate visual check; it is not currently a supported UI language.

Run make test-ui for interaction tests and preview images in build/test-artifacts/. Catalog and message behavior tests live in internal/locale; notification-language tests live in internal/engine.