Repository navigation
settings: mark the media, skill-key and channel panels for translation - #3478
Merged
Merged
Conversation
The runtime slice (#3477) covered the strings Settings builds in JavaScript; the markup still carried 45 Chinese lines with no `data-ui-*` marker, so an English `/settings` rendered them in Chinese. This adds the markers and the catalog pairs and changes no wording: 45 markers on 43 controls in `settings/index.html` (label text next to an `<input>` moves into a `<span data-ui-text=...>`, the pattern the file already uses 19 times, because the leaf replacement only rewrites an element whose content is plain text), 45 zh/en pairs in `shell/system-locale-catalog.mjs`, the regenerated `docs/inventory/visible-controls.json`, and two cases in `tests/system_locale_settings.test.mjs`. The language-picker names stay in their native script on purpose and the new test pins that set at seven `<option>` rows, so an intentional survivor cannot hide a missed marker. Related #3438
Collaborator
Author
Lead review — head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The runtime slice (#3477) covered the strings Settings builds in JavaScript. The
markup still carried 45 Chinese lines: the image, video, music and 3D model API
forms, the skill-key page, the external channel links, and two rail controls
(
appearance-toggle's label andaccount-menu-button'saria-label). AnEnglish
/settingsrendered all of them in Chinese because those texts had nodata-ui-*marker forrenderSystemLocaleto replace.This slice only adds markers and catalog pairs; it does not move text around:
settings/index.html. Label text thatsits next to an
<input>moves into a<span data-ui-text=...>(the patternthe file already uses 19 times), because the leaf replacement only rewrites an
element whose content is plain text.
shell/system-locale-catalog.mjsundersettings.image-api.*,settings.video-api.*,settings.music-api.*,settings.model3d-api.*,settings.skills-secrets.*andsettings.channels.*.settings.backandsettings.channels.helpare reusedinstead of duplicated.
controls:
data-ui-label="shell.account.menu"anddata-ui-text="settings.appearance.light".appearance-toggle's Chinese text is the pre-hydration placeholder:bindAppearanceTogglereplaces the button's content with<span data-appearance-label>andsyncAppearanceButtonfills it, so thenew marker changes the server-rendered bytes (the acceptance surface) and
not the post-hydration label.
The language picker names (
简体中文,繁體中文,繁體中文(香港),繁體中文(台灣),日本語) stay in their native script on purpose: they are theoption labels a user picks a language by, so a reader who cannot read the
current UI language can still find their own. The slice test pins that set at
seven
<option>rows and fails if any other Chinese phrase survives, so theintentional ones cannot hide a missed marker.
Verification (local, non-CI, on tree
809dc4a30b6cb4307f3b5892f5c8032ab89ab908,patched from main
0b069b37/ content treea6815204):/settingsrender through the shipped path(
createPageHandler+renderSystemLocale): Chinese lines 52 -> 7, andall 7 are the language picker names listed above; the 45 marked lines are
gone. No unmarked Chinese remains.
/settingsrender: visible text per line is identical to the base(0 differing lines after normalizing tags and the asset-hash URLs), 283
Chinese lines before and after.
node --test --test-concurrency=2 tests/*.test.mjs .github/scripts/*.test.mjs manager/compose-planner/compose-command-planner.test.js-> 1124 pass /0 fail / 0 cancelled (the CI input of 1122 cases plus the two new cases).
tests.test_settings_page+tests.test_visible_inventory-> 23/23 OK.scripts/visible_inventory.pyregenerated: only thedatafield of 19controls changes, no line numbers move, and a second run is byte-identical.
tests/system_locale_settings.test.mjs: one asserts theEnglish render leaves no Chinese outside the seven language-name options and
that the former leftovers are really translated in the response bytes, the
other asserts the Chinese render keeps every phrase the new markers wrap.
No CI run exists for this slice yet.
Related #3438