i18n: the five spots the smoke test found, and a BOM in the export

Reported from a real pass through the window.

The theme categories were a static readonly array, so the five names
froze at whatever language the plugin started in and a runtime switch
relabelled the entire window except them. Same shape as the layout
labels earlier in this cycle; this one got missed because replacing the
literals with resource lookups looks finished until you actually switch.

The status bar built its counts from English literals -- tab, tabs, msg,
tell, tells -- and the privacy pill said "Privacy-First" in all 25
files. The thousands separator follows the user's culture now too, so
German reads 1,2k rather than 1.2k.

The live preview claims to show what the window will look like. It was
showing English channel names next to a translated placeholder, which is
worse than either. Channel labels come from ChatType.Name() now and the
status slots share the strings with the real status bar. The four mock
chat lines stay English on the earlier decision.

And the export wrote a byte order mark. Encoding.UTF8 emits one, and a
leading U+FEFF makes the JSON invalid for every strict parser --
confirmed against a real export from the game, where python's json.load
refused the file. CSV keeps its BOM, because without one Excel guesses
the codepage and mangles every non-ASCII name.

The self-test that was supposed to catch that read the file with
File.ReadAllText, which strips a BOM while detecting the encoding. It
reads bytes now.

The status bar tests asserted English literals and started failing on a
German machine -- they pin a fixed culture now instead of inheriting the
locale of whoever runs them.
This commit is contained in:
2026-08-19 08:24:31 +02:00
parent fdb1a98519
commit e0c9efca05
31 changed files with 699 additions and 49 deletions
+25 -1
View File
@@ -704,7 +704,7 @@
<value>Conserva</value>
</data>
<data name="StatusBar_Privacy_Enabled" xml:space="preserve">
<value>Privacy-First</value>
<value>Privadesa primer</value>
</data>
<data name="StatusBar_Privacy_Open" xml:space="preserve">
<value>Obert</value>
@@ -1334,4 +1334,28 @@
<data name="Settings_Database_Op_Maintenance" xml:space="preserve">
<value>manteniment</value>
</data>
<data name="StatusBar_Tabs_One" xml:space="preserve">
<value>{0} pestanya</value>
</data>
<data name="StatusBar_Tabs_Other" xml:space="preserve">
<value>{0} pestanyes</value>
</data>
<data name="StatusBar_Tells_One" xml:space="preserve">
<value>{0} xiuxiueig</value>
</data>
<data name="StatusBar_Tells_Other" xml:space="preserve">
<value>{0} xiuxiueigs</value>
</data>
<data name="StatusBar_Messages" xml:space="preserve">
<value>{0} msg</value>
</data>
<data name="StatusBar_MessagesThousands" xml:space="preserve">
<value>{0:0.0}k msg</value>
</data>
<data name="Settings_Preview_TitleMock" xml:space="preserve">
<value>«Campió» Vista prèvia</value>
</data>
<data name="Settings_Preview_StatusOpen" xml:space="preserve">
<value>obert</value>
</data>
</root>