Repository navigation
feat(i18n): add ten languages and restart-to-apply selection - #1519
Conversation
Localize application controls, messages, counts and dates with rust-i18n. Persist auto-detected or manual language choices and apply them after restart while honoring operation close guards. Refs #1517
Keep English source catalogs checked while excluding translated and multilingual data from the English-only dictionary. Preserve the literal French restart caption in its E2E regression. Refs #1517
Require new and changed user-facing messages to ship in all ten supported languages, preserving interpolation and user-content boundaries. Refs #1517
This comment has been minimized.
This comment has been minimized.
The CI E2E bundle is built from a Docker context that only includes src/ and data/, so rust-i18n compiled an empty catalog and every lookup fell back to its key (for example "counts.items.one"). Move the catalogs to data/locales so the image build, bundle source key and builds from any source subset embed them, and fail the build if they are missing.
Code reviewReviewed at The main problems are a build-input gap that ships the CI E2E binary with no catalogs, a restart path that can destroy windows without restarting, and a translated string being used for behaviour. Blocker1. The CI E2E binary is built without
Major2. "Restart now" can close some windows and then refuse to restart
3. A translated title is used for behaviour, and every error-dialog subtitle stays English
4. Modal titles and subtitles are never translated, so many dialogs keep English headings
Minor5. Destructive and other messages are assembled from English fragments
6. Update and release-notes strings left in English
7. A GIO-supplied description is passed through
8. Internal, never-shown error strings are translated, and inconsistently
9. Translation errors found in the catalogs
Nit10. Confirm labels are translated twice
11. The new E2E test is in the wrong file
12.
|
Restart closed windows one at a time and only learned afterwards that a later window refused, so a busy window could leave earlier windows closed without restarting. Close guards for file operations, Jobs and drive formatting now register in a shared registry that restart queries before closing anything; a refusal shows the guard's warning on the busy window. The waiter is spawned before any window closes and stopped if closing is refused, so a spawn failure no longer exits without restarting.
…slated titles The message dialog chose its subtitle by comparing the translated title with "Completed with errors", so partial failures showed the wrong subtitle in other languages, and all three subtitles stayed English. Callers now request a partial-failure dialog explicitly and the subtitles are translated. Modal builders now display titles, subtitles and confirm labels as given, so each string is translated once by its caller. Translate the remaining modal headings, the Appearance menu headings, Jobs buttons, device release and drive dialogs, progress and completion titles, Settings action dialogs, and update and release-notes text. Replace sentences assembled from English fragments with whole messages: drive label errors, format confirmation values, go-to-folder and pin feedback, the copy-or-move subtitle, header tooltips, managed-install guidance and update status. Join translated lists with the language's separator and use plural forms for the release change count.
The Type column looked up shared-mime-info descriptions as catalog keys. Translate only Strata's own Folder, Broken link and Other types and show GIO-supplied descriptions as provided. Thumbnail, camera and audio worker errors are diagnostics that are never shown, so keep them in English like the other internal errors and drop their catalog entries.
- ru: run an action "для" the selection, which takes the genitive count forms. - es, pt-BR, vi, fr, ja: say that a script reported creating items, not that a report was created. - es, pt-BR, fr: label a finished progress card as completed, not as a verb. - ja, vi: describe where an action will be saved before it is saved. - ja: fix the cancelled-after and pending key sequence wording. - es: use the informal tú register throughout, as most messages already did.
Exclude only the non-English values of counts.json and dates.json from typos instead of the whole files, so their English messages are checked.
The scenario covers saved language and relaunch behavior, not Settings search.
Review fixesFollow-up to the code review. Findings
Not done: a heuristic scan still finds about 270 English literals in ValidationAll runs used a private display and bus. Containers ran on Docker.
|
This comment has been minimized.
This comment has been minimized.
i18n visual QA sweep (all 10 languages)Head: Method: 16 scoped passes ran a snapshot binary of the PR head on private Xvfb displays, each with a private D-Bus and AT-SPI bus. They captured screenshots and full AT-SPI dumps (names, descriptions and texts) per language. Each scope did a full pass in de, ru, ja and ko and spot-checked fr, es, it, pt-BR and vi on tight or suspicious surfaces. Plural boundaries were exercised (ru 1/2/5/21/22/25), and some scopes also checked narrow windows or larger text sizes. After the visual pass, each scope reviewed the source for literals that bypass Screenshots and AT-SPI dumps are kept locally and are not attached here. They are pending owner upload if needed. File and line references are as reported at What's fine everywhere: plural forms (ru one/few/many, fr/pt-BR 0 as singular, ja/ko/vi invariant), relative and absolute dates, and CJK, Cyrillic and Vietnamese glyphs. No tofu, mojibake, raw catalog keys or unreplaced Per-scope verdictsScope abbreviations used in the items below are in parentheses.
Result: all 16 scopes fail. Findings reported by several scopes are merged into one item, and each item lists every scope that saw it. Item counts
There are also 18 non-i18n observations, listed at the end. Conventions: "all 9" means every non-English language. Sources are A. Cut-off / clipping
B. Untranslated visible UI textSidebar & location
Browser header & views
Footer, 10xer & shortcut reference
Search
Context menus & dialogs
Progress & jobs
Properties & Customize
Archives
Previews
Settings: General, integration, actions
Settings: Appearance
Updates & About
File chooser (portal)
Devices & desktop
C. Mixed-language sentences / English error details spliced inThese come from errors created below the UI layer (services, adapters, io, glib) that reach the UI through
D. Formatting
E. Wrong sense / terminology / grammar in catalogsShared keys used in two senses
de
ja
ko
ru
vi
Several languages
F. Accessibility-only (screen-reader names/descriptions)
G. Source-only (not reached on screen)Each of these passes English text to the UI, and in most cases the key is missing.
H. Test gap
Non-i18n observations (functional / layout, all languages incl. en)
|
A press that changes the layout makes GTK synthesize a motion event a frame later from the live X pointer state. When the server had already processed the 20 ms release but GTK had not yet read it, that motion carried no button and cancelled the click, which made the quick-preview scenario flaky in CI. Hold buttons for 100 ms; scroll taps keep the short gap.
Add shared integer, decimal, file_size, transfer_rate and duration helpers
that apply each language's digit grouping, decimal separator and unit
symbols, and group the number in every count message. English now groups
thousands ("3,000 items").
Unoptimized builds initialize every compiled-in translation in one stack
frame, which outgrows libtest's default 2 MiB thread stack, so tests run
with an 8 MiB minimum thread stack.
Refs #1517
Translate the English labels, tooltips, accessible names, dialog bodies and error details reported by the ten-language visual sweep across the sidebar, location bar, views, 10xer footer and F1 reference, context menus, progress and jobs, Properties, archives, previews, Settings, updates, the file chooser, desktop integration setup and devices. Error enums shown in dialogs gain localized messages while their Display output stays English for logs. Use the shared formatters for sizes, rates, durations, counts and dates, add context keys where one English word needs two translations (permission "Group", archive "Format", release channel "Preview", and others), translate the desktop entry, and rename the compress cancel button to "Cancel compressing". Refs #1517
Apply the sweep's wording findings to existing translations: consistent terminology (de Theme/Update/Aufgabe, vi chủ đề/Hành động, ko 단축키 and 라이트/다크), Japanese spacing around placeholders and counters, the Korean object particle after counts, word order in progress counters, and a generic error subtitle that no longer repeats its title. English is unchanged. Refs #1517
Unoptimized builds initialize every compiled-in translation in one large stack frame. When the portal's D-Bus executor thread was the first to translate text, it overflowed its stack and the file chooser never opened. Load the catalogs at the start of main instead. Refs #1517
…ns out Wrapping segmented choices only between words kept long translated labels whole, but at the largest text size the General page then grew wider than a narrow window and pushed switches out of view. Restore the word-then-character wrapping. Refs #1517
Format the preview position, print page and 10xer candidate counters with the shared integer formatter, and route the remaining desktop-integration inspection errors through the translated message. Refs #1517
i18n sweep round 1 — fixesFixes for the round-1 sweep. Item IDs below refer to that comment. Items marked "re-verify" have a code change that I could only confirm from source, not from screenshots; round 2 will re-verify them on screen. Commits pushed (
|
i18n visual QA sweep — round 2Head: Method: the same 16 scopes as round 1 re-ran a snapshot binary of the PR head on private Xvfb displays with private D-Bus and AT-SPI buses. Each scope re-checked its round-1 items on screen and looked for new problems, including the new digit grouping, localized sizes and durations, growing context menus and the desktop-entry translations. Every capture was confirmed to come from a fresh process in the requested language. Screenshots and AT-SPI dumps are kept locally and are not attached here. File and line references are at Round 2 vs round 1
Of the 40 round-2 items, 19 are carry-overs or residuals of round-1 items (cited per item) and 21 are new. Per-scope resultsScope abbreviations are used in the items below. "Reported" is the
Round-1 areas confirmed fixed on screen
Cut-off / layout
Untranslated / mixed-language
Formatting
Catalog wording / terminology / typographySeveral languages
de
fr
it
ru
vi
Uncounted wording nits (flagged as minor by the reports): ko audio caption "9개 중 트랙 2" reads unnaturally; it mixes straight and curly apostrophes in one dialog; it "apri la cartella contenitore" (palette) vs "Apri cartella contenitore" (menu); ko renders "pane" as "창" (window) in "이 창 필터링"; ja "GitHub で表示" has a space other ja strings omit; ru mixes "объекты" and "элементы"; the ja footer uses ASCII "(6 B)" instead of full-width parentheses. Source-only
Non-i18n observations (functional / layout, all languages incl. en)
|
Show failure details through the shared io_error_message, which now also translates no-space, read-only, already-exists, not-empty, busy, too-long and truncated-file errors and drops the "(os error N)" suffix and tempfile paths that exposed internal staging names. Add gio_error_message for glib::Error and use both for move, restore, delete, copy and replace, rename, new items, archive extraction and compression, paste and undo failures, media playback and integration setup. Translate the remaining restore, move, copy and archive error sentences, and collapse model-preview parse diagnostics into a few translated messages with fixed limit text. Refs #1517
wrap_dialog_text hard-wrapped dialog text every 64 characters, splitting Japanese and Korean words mid-token and collapsing paragraph breaks and bullets. Replace it with dialog_text, which only normalizes spacing, and let the labels wrap with WordChar within their maximum width, including the authentication dialog. The folder-merge conflict dialog moves "Apply to All" above the buttons and lets button labels wrap so long translations stay within the window, and the no-terminal message lists program names on their own line. Refs #1517
- Update pill: keep "v… available" and put a prerelease's build kind on its own line. - 10xer place chord: show keycaps in place of the row icon so long place names are not truncated further. - Wrap the pane-filter partial-search status, theme names beside the light/dark badge and the unlock waiting text (between words only). - Show the unlock error in the status card instead of over the folder's empty-state text. - Let the archive password entry shrink in narrow panes. - Stack the search-exclusion entry above its buttons below 1000 px, and keep Opening-items row labels whole beside the choices. - Keep each F1 footer hint together so lines break only after a separator. - Announce the 10X pill with one translatable sentence. Refs #1517
Digit-group the completed progress counter, use singular delete and trash confirmation bodies for one item, translate the trash "name: reason" separator, and lower-case the Russian and Vietnamese cancelled-summary fragments, capitalizing only the start of the joined sentence. Refs #1517
rust-i18n's i18n! macro initializes its catalogs with one inline statement per message. Unoptimized, that closure needs about 2.2 MiB of stack, so any 2 MiB thread that translates first overflows. CI runs the prebuilt test binaries directly, without the RUST_MIN_STACK that .cargo/config.toml gave cargo test, and test threads and app worker threads aborted. build.rs now loads data/locales with rust-i18n-support and writes them as static tables, served by a small i18n::Catalogs backend. Loading is a loop over static data and works on 256 KiB thread stacks, so the minimum-stack override and the early main-thread load are removed. Refs #1517
…onalization # Conflicts: # src/adapters/local_operations.rs
i18n visual QA sweep — round 3Build swept: Method: the same 16 scopes re-ran a snapshot binary of Screenshots and AT-SPI dumps are kept locally and are not attached here. File and line references are at CI: after the swept build, Trend
Of the 30 round-3 items:
The untranslated group grew from 4 to 6 only because R2-14 was one grouped item in round 2; its four remaining sites are listed separately here (R3-8, R3-11, R3-12 and R3-13). Per-scope results"Reported" is the
Merged: R3-1 (desk + arch, also noted uncounted by nav, upd and prev), R3-8 (upd + chooser) and R3-18 (menus + fileops). Round-2 items confirmed fixed on screen
Cut-off / layout
Untranslated / mixed-language
Formatting
Catalog wording / terminology / typographySeveral languages
de
ja
ko
ru
Source-only
Accepted limitations (not counted going forward)These come up every round. They are outside Strata's catalogs or are deliberately English, so later rounds will note them without counting them.
Uncounted i18n nits (judgment calls)
Non-i18n observations (functional / layout / accessibility; all languages incl. en)
|
…-neutrally Map ureq failures to a serializable NetworkError (HTTP status, catalog reason or library detail) and localize it when shown, so downloads, update checks and the AUR query no longer embed raw English "io: ... (os error N)" text. The update-check cache stores that value instead of a translated sentence; a cache written by an older version is stale. Add error_detail, io_error_detail and gio_error_detail for reasons that continue a sentence after a colon, and network kinds to io_error_message.
…ails
Route the remaining raw OS and GIO errors through the localized helpers:
location validation (not a folder), unreadable previews, sandbox start-up,
terminal launch, unmount/eject and drive operations. Archive messages
quote names with each language's quotation marks instead of backticks,
show free-space and declared sizes with localized units, join sentences
with a translatable separator, and log untranslatable encoder and RAR
helper diagnostics behind fixed text.
The new-item failure quotes the default name ("Could not create “New
Folder”: ...") so it reads correctly in inflected languages, and the
action-row unavailability reason continues the summary in lower case.
Pango may break between any two Hangul syllables and hyphenates words it has to split. controls::keep_words_whole disables inserted hyphens and marks short Korean words as unbreakable; it is applied to dialog text, Settings labels, the authentication and drive-label dialogs and the sidebar update notice. dialog_text now normalizes only ASCII spaces and tabs, so French no-break spaces and digit-group spaces survive, and each F1 footer hint stays on one line instead of splitting at its slash.
…hs and large text The folder-merge dialog stacks its five actions once it is narrowed to the window, so long German and Russian labels no longer push Replace off-screen. The Opening-items matrix stacks further when a translated choice gets less than its natural width, and theme-editor color labels wrap between words instead of being hyphenated inside them.
Add i18n::percent ("%{value}%", with a narrow no-break space in French
and a no-break space in German) for the progress dock and the chooser
download ring, translate the chooser's "%{size} downloaded" row, make the
update pill's spaced percent non-breaking, and use a singular restore
body when one item is restored.
Japanese uses the ASCII colon everywhere, so nested "%{name}: %{error}"
templates no longer mix styles, and "10xerモード" is spelled one way.
Also: it "Link rotto", de "Erscheinungsbild-Einstellungen", ru "ОТКРЫТИЕ
ЭЛЕМЕНТОВ", lower-case Library requirement values in es/it/pt-BR/vi and
no repeated "필요" in ko.
…ing helpers Describe the after-colon error detail helpers, NetworkError, i18n::percent, controls::keep_words_whole and stack_actions_when_constrained, the quotation-mark, Japanese colon and French typography rules, and the accepted limitations of the translation.
i18n sweep round 3 — fixesFixes for the round-3 sweep (R3-1…R3-30), on top of Commits
Catalogs: +16 Per itemLayout items are fixed in code. Where noted, the fix agent checked them in screenshots on a private display. Round 4 should re-check them all. Cut-off / layout
Untranslated / mixed-language
Formatting
Catalog wording / terminology / typography
Source-only
English-visible changes
Validation
Accepted limitationsThese stay outside Strata's catalogs or are deliberately English. They are now listed in
|
i18n visual QA sweep — round 4Build swept: Method: the same 16 scopes re-ran a snapshot binary of Screenshots and AT-SPI dumps are kept locally and are not attached here. File and line references are at CI on Trend
Of the 14 round-4 items:
Per-scope results"Reported" is the
Six scopes report 0: keyboard, file-chooser, pointer-selection, search-filter, desktop-integration and browser-modes. Merged: R4-4 (archives extract path + previews listing path), R4-10 (archives + file-operations + accessibility) and R4-11 (updates-about + trash + archives, three sites). Round-3 items confirmed fixed on screen
Cut-off / layout
Untranslated / mixed-language
Formatting
Catalog wording / terminology / typography
Source-only
Accepted limitations (not counted)Unchanged from round 3 and listed in
Uncounted i18n nits
Non-i18n observations (functional / layout / accessibility; all languages incl. en)
|
Route install staging, archive open and remote preview I/O and GIO errors through the localized error helpers, so they no longer show OS text, errno suffixes or temporary paths. Unsupported archive methods get a catalog message, compressed and run names are quoted, and install failures and restore refusals continue in lower case after a colon where the language does.
Add reasons for symlink loops, device I/O errors, missing devices, disconnected and stale network locations and busy executables, matching raw errnos where ErrorKind has no stable variant. Any other OS error shows a generic localized reason and logs the system text. GIO TooManyLinks and NotMounted are mapped too. Video preview badges use catalog text for the frame rate, mono, stereo and channel counts.
…d splits A particle ending a word longer than the kept-word cap, such as 을(를) after a long file name, now stays on the same line as the character before it. The action editor's error and library notes keep Korean words whole, and sidebar chips in Settings wrap only between words.
… info The completed progress card and the modal's initial status use the localized percent format. A pasted clipboard image takes its name from a translated stem, numbered like new files. Copied version info uses the translated About description instead of the Cargo package description.
German and French quote the Follow Omarchy setting name in the Managed by Omarchy hint. Japanese drops the spaces around Latin words in the PNG conversion prompt, and Spanish and Vietnamese continue the Trash-unsupported reason in lower case.
i18n sweep round 4 — fixesFixes for the round-4 sweep. File references are at the previous head, Commits (on top of
Status per finding
Uncounted items also fixed:
English-visible changes
ValidationAll of these ran locally on Catalogs:
Rust:
E2E: full Other: Not verified on screen: remote (GVfs) preview staging errors, a pasted clipboard texture, and the Omarchy/pacman install paths. None of them is reachable on the private test display. |
…onalization # Conflicts: # src/adapters/local_operations.rs
Translate the copy-fallback restore errors added on main, report an occupied destination through the existing restore message, and drop the no-longer-used unsupported-rename message from the catalogs.
i18n visual QA sweep — round 5Build swept: Method: the same 16 scopes ran a snapshot binary of Screenshots and AT-SPI dumps are kept locally and are not attached here. File and line references are at CI on This is the final fix pass. Round 5 found 8 distinct items, under the stop threshold of 10. The next commits fix them; no further sweep round is planned. Trend
Of the 8 round-5 items:
Per-scope results
Round-4 items confirmed fixed on screen
No tofu, mojibake or unreplaced Cut-off / layout
Untranslated / malformed
Catalog wording / capitalization
Accepted limitations (not counted)Unchanged from round 4 and listed in Uncounted i18n nits
Non-i18n observations (all languages incl. en)
|
Description
Add compiled-in
rust-i18ntranslations for English, French, German, Spanish, Japanese, Brazilian Portuguese, Korean, Vietnamese, Italian, and Russian. General Settings now offers Auto-detect and native-language names, with a synchronized Restart now action when the effective language changes.Language changes apply after restart, as requested by the owner. Detection respects Linux language priorities with English fallback. Counts and dates follow the app language; filenames, caller-supplied chooser labels, and protocol identifiers stay unchanged. Restart honors existing operation-close guards. System/provider text remains provider-owned; Japanese/Korean rendering requires system CJK fonts.
Visual evidence
Pending owner upload through the GitHub editor. Sanitized before/after Settings captures and a language-menu capture are retained locally; exact paths and captions are recorded in the issue handoff. Japanese/Korean captures use the existing Noto CJK fonts mounted read-only into the isolated pinned environment. No captures are committed.
How to test
LANGUAGE, then the message locale (LC_ALL,LC_MESSAGES,LANG), with English fallback. Explicit C/POSIX selects English.Expected result: The chosen language persists, applies consistently after restart, and never changes filesystem paths, file contents, or application-supplied chooser values.
Related issue
Closes #1517