WIP: [pr-feature] Portuguese (Brazil) catalog (locales/pt-BR.json), written as sentences in the F1 menu #217
Loading…
Reference in a new issue
No description provided.
Delete branch "Skanzinho/Darner:traducao-pt-br-v2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contributor role (optional)
What it changes
The problem on main: there is no Portuguese catalog, so a Windows in Portuguese gets Darner in English. A catalog alone is not enough: the F1 menu cut a word at its first accented letter (CONFIGURAÇÕES came out as ConfiguraÇÕEs). #196 fixes that for Spanish; this builds on it.
Reviewed by a native speaker: I am Brazilian, and Brazilian Portuguese is my first language. I read every one of the 163 names in the F1 menu (rows, values, buttons and tabs) and corrected them where needed (
a75ee08). The help texts and the other messages have not been read line by line by a person yet; I will fix what players point out.locales/pt-BR.json: Brazilian Portuguese for all 798 message keys oflocales/en.json: the F1 menu, the F3 panel, the advisor line, the warm-up lines, the preload window, the launcher andplaymessages, and the CLI help.pt-BRwith the aliaspt, sopt-PTandptfind it too, and a Windows in Portuguese gets it under System Language through the existingGetUserPreferredUILanguageslookup.{0},{1:N0}), names in backquotes, the[Y/n]and[y/N]prompts (the answer is read as Y or N) and the messages split across keys (launcher.sdk.*_missing+*_fetch,play.dlss.offer+licence,hud.warmup.restart_delay+load_game, the HDR lines) are kept as in English.F1 menu casing (
menu.rs, on top of #196):casedtakes the language'sCasing(English, Spanish or Portuguese) in place of #196'sspanishflag. Portuguese, like Spanish, writes a title as a sentence ("Limite de memória de vídeo", "Salvar e fechar o jogo") and goes on in small letters after a colon; its one-letter words A, E, O, À and É are small./or a+is the name of a key or a button and keeps its capital: "teclas Q/E", "A/xis". In English and Spanish this also turns the pad hint's "a/cross" into "A/cross", as "B/circle" already was.i18n::portuguese(), likei18n::spanish(). README:--language pt-BR.There are no new settings, no new
DARNER_*switches and no change to play defaults. English, Spanish and Chinese text is unchanged, except the capital of A in A/CROSS.How it was tested
a75ee08, on #196's head60c1374. The three gates ran on5ddf46f.a75ee08changes only text inlocales/pt-BR.json, so on it I ran the menu anddarner-coretests and the catalog check again.5ddf46f:cargo clippy --workspace --all-targets --locked -- -D warnings: no warnings.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: no warnings.cargo xtask policy: "asset policy: 557 files ok".cargo test --workspace --locked: the 2760 tests of the crates beforedarner-shaderpassed. Indarner-shader, 572 passed, 1 failed, andoracle64::legacy_mul_forms_are_exactwas still running after 25 minutes, so I stopped it. The failure,emit::waterfall_tests::sampled_marks_restore_early_depth_only_when_safe_in_pixel_shaders("DXIL validation failed: Not all elements of output SV_Depth were written"), fails the same way on main (f3840d7). This PR doesn't touchdarner-shader. I did not check the long test on main.cargo test --workspace --locked --no-fail-fast --exclude darner-shader: 2785 passed, 2 failed, 105 ignored. Both failures are indarner-gpu'swatch.rs, which this PR doesn't touch:watch::ask_holds::asking_kept_fast_path_guards_ask_ahead_and_doneandwatch::tests::ask_once_by_res_splits_reservations_without_refusals. Run alone (cargo test -p darner-gpu --lib --locked -- <both names>), both passed 3 times out of 3.a75ee08:cargo test -p darner-gpu --lib --locked host::menu: 52 passed, 2 ignored (the picture tests), including #196's Spanish test and a newportuguese_texts_are_shown_in_ordinary_letters.cargo test -p darner-core --locked: 31 passed.pt-BR.jsonis UTF-8 without a BOM and has exactly the keys ofen.json, with the same placeholders, line breaks and[Y/n]prompts in each message.DARNER_MENU_LANGUAGE=pt-BR,DARNER_MENU_SHOTandDARNER_PANEL_SHOTwithmenu_pictures,auto_detect_picturesandpanel_pictures,--include-ignored --test-threads=1), at 1080 lines: every page, the key bindings, the save list, the FPS line, the F3 panel, the advisor and the warm-up notice. With the language set first,every_name_and_value_fits_its_row_at_every_scalealso passes in Portuguese. Two advisor lines and one warm-up line that were cut at the box's columns were made shorter.a75ee08, in a separateDARNER_HOME, on Windows 11 set to Portuguese (Brazil). The F1 menu came up in Portuguese through System Language, with no language set, and I saw nothing wrong in it. No errors in the play log. This stays a draft until #196 is merged.Play-Darner.ps1) in Portuguese were not run.MENU.SETTING.DLSS:, in place of their names. That is a separate fix.Checklist
main.docs/asset-policy.md.menu.rs, which this extends to Portuguese). Kept as a draft until #196 is merged. If #196 is closed without being merged, I will move its accented-letter part into this pull request so it no longer depends on it.Checked for overlap
menu.rsandi18n.rs; whichever lands second needs a small rebase.en.json; until a Portuguese text is added for them, those show in English, as untranslated keys do in every catalog.The translation was written with Claude Code and reviewed by me, a native Brazilian Portuguese speaker, as described above.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.