The menu's phrases are English in its code, each through snx_tr (src/gui/i18n.h), and so are the setup's notices,
marked in src/common/utilities/setup.c, which the terminal shows as they are. po/scarletnx.pot lists
them, made from the code by scripts/build-languages.py --pot; the gui_languages_pot test fails when it is not what
the code says, and only warns where a .po lags it (a phrase missing or one the code dropped): the menu shows such a
phrase in English, and --pot adds each one untranslated. A language is a po/<tag>.po, named by its BCP 47 tag as language-Script-REGION, each part only
when it tells the language apart (de.po, pt-BR.po, zh-Hans-CN.po), in gettext's format: the build makes each one a
catalog of gettext's .mo format compiled into the menu, which reads it with musl's __mo_lookup
(src/gui/i18n.c). A new one starts as a copy of the .pot whose header names it, in UTF-8:
"Language: de\n"
"Content-Type: text/plain; charset=UTF-8\n"
"X-Language-Name: Deutsch\n"
X-Language-Name is what Settings > App > Language shows. msgmerge -U po/de.po po/scarletnx.pot (gettext's tools)
brings a translation up to the code; a phrase it leaves empty, or marks fuzzy, stays English. The build refuses a
.po that:
%s, %d, %zu, %.*s) in number, order or type, uses numbered ones
(%1$s) or %n, or has a % its English does not: C's printf takes the arguments in the order the code gives;#, snx-keys, "Key: what it does."): each key stays as it is, or as the
same file translates it (#, snx-key, as Back), since a click on the foot finds a key by its word, and a sentence
greyed (~, one its screen cannot do now) stays greyed;?: the font is CP437, the Latin letters of
U+00A0 to U+024F past it, the blocks game titles are written in and the wide letters the languages show, GNU
Unifont's. scripts/build-glyphs.py takes them all from the Unifont .hex the build downloads (cpmfile.json's
unifont): the Latin ones, which the build draws with the VGA font's stems and baseline; every code point of the
CJK and Hangul blocks of its TITLE_RANGES (CJK Unified Ideographs without Extension A, Hiragana, Katakana, Hangul
Syllables, their punctuation and the halfwidth and fullwidth forms), whatever the languages show; and the 16x16
glyphs of every other letter of po/*.po and tests/po/*.po. The menu draws a 16x16 one two columns wide: every
width, cut, wrap and slide of its text counts them so (src/gui/wide.h), and a row breaks after one as at a space.
The font's texture holds the others whole and 2048 of the 16x16 ones at a time, those drawn longest ago giving their
place to the next. A letter Unifont lacks, or draws 8 wide outside the Latin ones, stops the build, named; the
gui_glyphs_kept test checks the downloaded .hex the same way (--check);msgctxt), plurals (msgid_plural), a phrase twice, or is not UTF-8.The runtime's settings stay as the runtime names them (their groups, names, help and words come from
scarletnx --settings), as do the Controllers' button map page, drawn as the game's menu draws it, the theme
editor's rows (the file's own keys) and the lines Share Log adds for us.
Made from docs/user/gui.md at 69237645142c. GPL-3.0-or-later.