mirror of
https://github.com/storytold/craft-launcher.git
synced 2026-11-02 18:07:04 +00:00
i18n: add Japanese (ja) interface language (#177)
* Add a Polish interface - pl.tsv: the full catalog (287 rows), written clean-room from the English labels; plurals use the same one|few|many rule as Russian. - Registered as the seventh language: "Polski" in the picker, locales pl, pl-PL and pl_PL.UTF-8, complete_menus = true so the completeness tests cover it. - tests/polish.rs: the Polish UI test, modeled on the French one. - README and AGENTS updated for the new language. * Add Hungarian localization and fix responsive settings layout * i18n: add Czech (cs) interface language Czech catalog with every key of the most complete catalog (287 rows), the cs language entry with locale detection (cs-CZ, cs_CZ.UTF-8, ?lang=cs), a Czech plural rule (1 / 2-4 / other) with a unit test, and the README language list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n: add Japanese (ja) interface language ja.tsv translates the whole interface, the tray menu and tooltip, each app's tagline and the backend's install/update messages into Japanese, and Settings > Language offers 日本語. Japanese locales (ja, ja-JP, ja_JP.UTF-8…) select it; Japanese has one plural form. Japanese is a CJK language, so cjk_font.rs now looks for a Japanese system font (Hiragino Sans on macOS; Yu Gothic, Meiryo or MS Gothic on Windows; Noto Sans CJK JP, Noto Sans JP, IPAGothic, Takao or VL Gothic on Linux and FreeBSD), falling back to a Chinese one, which draws kana and most kanji, where the system has none. The font is loaded per language, so switching between Japanese and Chinese reloads the right face. A fallback face is nudged onto the body font's baseline: egui puts a fallback glyph's baseline at that face's own ascent and only centres the two line boxes, which left a face whose metrics differ from Inter's riding high. On Windows, Yu Gothic's line gap is half an em, so its kana and kanji sat about 0.29 em above the Latin text beside them (Microsoft YaHei, used for Chinese, happens to match). The nudge, applied through a FontTweak, is the difference in ascent and line height, and helps the Chinese faces too. The README and AGENTS list the new language. Tests: the complete-catalog checks cover ja.tsv (placeholders, plural forms, every tl! literal, taglines, package formats), plus a locale/plural test, a Japanese glyph-coverage test, a baseline test and tests/japanese.rs (grid, table, dates, a backend message). * i18n: make the CJK font choice language-neutral The CJK comments, the missing-font note and the plural-rule docs named the languages, so each new one meant editing them all; they now say "CJK". Each language's writing system (its `script`) now lives in the registry, and a language is drawn only with a face for its own script — never another's, which would leave characters as tofu — so a language the system has no font for stays in English, like any other. Adding Korean or Traditional Chinese is a registry row and a candidate list, not a special case. * i18n(pl): use Polish plural rule, so 21 is "21 aplikacji" plural_east_slavic treats 21, 31 and 101 as "one", which is right for Russian but not Polish, where only 1 itself takes the singular. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(cs): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(pl): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(hu): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(ja): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * hungarian test: count only the settings body's links, not the cards' Website links behind the modal #198 gave every card a Website link, and Hungarian labels both Webhely. * hungarian test: card links are 14px text, settings icons 24px; filter on that --------- Co-authored-by: DzikStar <82441193+DzikStar@users.noreply.github.com> Co-authored-by: ferivoq <ferikegameplay@gmail.com> Co-authored-by: Losminek <301412321+Losminek@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
@@ -85,22 +85,23 @@ The web version shows the same catalog in the browser, with the latest download
|
||||
## Interface languages
|
||||
|
||||
The interface is in English, Brazilian Portuguese (Português (Brasil)), Czech (Čeština), French
|
||||
(Français), German (Deutsch), Hungarian (Magyar), Polish (Polski), Russian (Русский), Simplified
|
||||
Chinese (简体中文) or Spanish (Español). **Auto**, the default, follows the system or browser
|
||||
language; **Settings → Language** picks one and switches at once, and the choice is kept between
|
||||
runs. Czech locales (`cs-CZ`, `cs_CZ.UTF-8`…) select Czech, German ones (`de-DE`, `de-AT`,
|
||||
`de-CH`, `de_DE.UTF-8`…) German, French ones (`fr-FR`, `fr-CA`…) French, Hungarian ones (`hu`,
|
||||
`hu-HU`, `hu_HU.UTF-8`…) Hungarian, Polish ones (`pl`, `pl-PL`, `pl_PL.UTF-8`) Polish, Spanish ones
|
||||
(`es-ES`, `es-MX`, `es-419`…) Spanish, and Portuguese ones (`pt-BR`, and `pt-PT` too, for now)
|
||||
Brazilian Portuguese. Simplified Chinese locales (`zh-CN`, `zh-SG`, `zh-Hans`, and POSIX forms such
|
||||
as `zh_CN.UTF-8`) select Chinese; Traditional Chinese ones don't. To try a language without
|
||||
changing the setting, start the desktop app with `ARTCRAFT_LAUNCHER_LOCALE=pt-BR`, or add
|
||||
`?lang=ru` to the web address.
|
||||
(Français), German (Deutsch), Hungarian (Magyar), Japanese (日本語), Polish (Polski), Russian
|
||||
(Русский), Simplified Chinese (简体中文) or Spanish (Español). **Auto**, the default, follows the
|
||||
system or browser language; **Settings → Language** picks one and switches at once, and the choice
|
||||
is kept between runs. Czech locales (`cs-CZ`, `cs_CZ.UTF-8`…) select Czech, German ones (`de-DE`,
|
||||
`de-AT`, `de-CH`, `de_DE.UTF-8`…) German, French ones (`fr-FR`, `fr-CA`…) French, Hungarian ones
|
||||
(`hu`, `hu-HU`, `hu_HU.UTF-8`…) Hungarian, Japanese ones (`ja`, `ja-JP`, `ja_JP.UTF-8`…) Japanese,
|
||||
Polish ones (`pl`, `pl-PL`, `pl_PL.UTF-8`) Polish, Spanish ones (`es-ES`, `es-MX`, `es-419`…)
|
||||
Spanish, and Portuguese ones (`pt-BR`, and `pt-PT` too, for now) Brazilian Portuguese. Simplified
|
||||
Chinese locales (`zh-CN`, `zh-SG`, `zh-Hans`, and POSIX forms such as `zh_CN.UTF-8`) select
|
||||
Chinese; Traditional Chinese ones don't. To try a language without changing the setting, start the
|
||||
desktop app with `ARTCRAFT_LAUNCHER_LOCALE=pt-BR`, or add `?lang=ru` to the web address.
|
||||
|
||||
Chinese is drawn with the system's own Chinese font (PingFang on macOS, Microsoft YaHei on
|
||||
Windows, Noto Sans CJK or WenQuanYi on Linux and FreeBSD). Where there is none, and in the web
|
||||
version, the interface stays in English and Settings says why. Product names and release notes
|
||||
stay as published; text without a translation falls back to English.
|
||||
The CJK languages are drawn with the system's own CJK font (Hiragino Sans or PingFang on macOS,
|
||||
Yu Gothic, Meiryo or Microsoft YaHei on Windows, Noto Sans CJK, IPA, Takao or WenQuanYi on Linux and
|
||||
FreeBSD). Where the system has no font for one, and in the web version, the interface stays in
|
||||
English and Settings says why. Product names and release notes stay as published; text without a
|
||||
translation falls back to English.
|
||||
|
||||
## Where apps are installed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user