Repository navigation
v0.29.0 - the labels that only JavaScript could see
RayRAG 0.29.0
The labels that only JavaScript could see
RayRAG renders every page in English or Chinese. Strings that go through the translation helper switch
language; strings written straight into the markup do not. The audit that guards this rule was too
generous — it accepted a whole line as soon as any label on it was translated. <option>All files</option>
sat on a line that already translated something else, so it stayed English on the Chinese pages, and so did
every label injected through an innerHTML fragment. Meanwhile the audit reported zero problems.
The audit now judges one label at a time. Run against the code as it stood, the stricter rule found
69 untranslated labels instead of zero. 27 markup sites were then split so the labels inside JavaScript
strings pass through the translator, and 60 keys were added: the measured backlog is now 42, and that
number is the enforced ceiling — it may only go down.
A guard for the mistake that is easy to make
t() has two match arms: an English early-return for namespaced upstream keys, then the Chinese table. Adding
a key to the wrong arm silently inverts the interface — English pages rendering Chinese — without failing a
single existing test. translation_table_points_the_right_way now asserts both directions, and it was run
before the new keys existed to watch it fail first.
A test that had frozen the bug
The stricter rule surfaced something worse than a missing translation: the admin console layout test asserted
that the Chinese admin page contains Service status and User management in English. Those labels come
from AdminConsoleSection::label(), which had been left untranslated because upstream's zh.ts omits the
admin.* keys — and the test recorded that leak as expected behaviour. The labels are now translated at every
call site, the assertions check the Chinese text, and both labels are covered by the direction test.
Verification
- 2258 tests passed, 0 failed, 27 ignored.
- Deployment checked live: the Chinese admin page shows
服务状态/用户管理, the English page shows
Service status/User management, and the layout suites report 0 page errors across 34 routes at two
widths and 5 sidebars at nine widths. - One leak remains and is documented rather than hidden: the browser tab
<title>on the Chinese admin page
still readsService status · RayRAG.
Upgrading
Nothing to do — same Compose file, same rayrag service. PostgreSQL and zvec stay the defaults in both the
Docker and the plain-Linux deployment.