WIP: [pr-feature] Portuguese (Brazil) catalog (locales/pt-BR.json), written as sentences in the F1 menu #217

Draft
Skanzinho wants to merge 4 commits from Skanzinho/Darner:traducao-pt-br-v2 into main
First-time contributor

Contributor role (optional)

  • Fluxer ID: 1578057944262520834

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 of locales/en.json: the F1 menu, the F3 panel, the advisor line, the warm-up lines, the preload window, the launcher and play messages, and the CLI help.

    • The tag is pt-BR with the alias pt, so pt-PT and pt find it too, and a Windows in Portuguese gets it under System Language through the existing GetUserPreferredUILanguages lookup.
    • Placeholders ({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.
    • Words Brazilian players use as they are stay in English: shaders, pipelines, ray tracing, build, save, and FRAME GEN in the tab strip and short rows (GERAÇÃO DE QUADROS elsewhere).
    • Abbreviations with a dot are avoided inside sentences, because the menu starts a new sentence after a dot.
  • F1 menu casing (menu.rs, on top of #196): cased takes the language's Casing (English, Spanish or Portuguese) in place of #196's spanish flag. 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.

    • A one-letter word beside a / 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(), like i18n::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

  • Tested revision: a75ee08, on #196's head 60c1374. The three gates ran on 5ddf46f. a75ee08 changes only text in locales/pt-BR.json, so on it I ran the menu and darner-core tests and the catalog check again.
  • Gates, on 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 before darner-shader passed. In darner-shader, 572 passed, 1 failed, and oracle64::legacy_mul_forms_are_exact was 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 touch darner-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 in darner-gpu's watch.rs, which this PR doesn't touch: watch::ask_holds::asking_kept_fast_path_guards_ask_ahead_and_done and watch::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.
  • On a75ee08:
    • cargo test -p darner-gpu --lib --locked host::menu: 52 passed, 2 ignored (the picture tests), including #196's Spanish test and a new portuguese_texts_are_shown_in_ordinary_letters.
    • cargo test -p darner-core --locked: 31 passed.
    • A script checked that pt-BR.json is UTF-8 without a BOM and has exactly the keys of en.json, with the same placeholders, line breaks and [Y/n] prompts in each message.
    • The menu and panel pictures were checked by eye in Portuguese (DARNER_MENU_LANGUAGE=pt-BR, DARNER_MENU_SHOT and DARNER_PANEL_SHOT with menu_pictures, auto_detect_pictures and panel_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_scale also passes in Portuguese. Two advisor lines and one warm-up line that were cut at the box's columns were made shorter.
  • Gameplay: not run in the game yet. This stays a draft until it is, and until #196 is merged.
  • Changes a default: no.
  • Hardware dependence: none; text only.
  • Coverage gaps:
    • The launcher scripts (Play-Darner.ps1) in Portuguese were not run.
    • The AUTO-DETECT change list stays as on main: its strings have no keys yet, and on main (in English too) it shows the rows' message keys, such as MENU.SETTING.DLSS:, in place of their names. That is a separate fix.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on #196 (its accented-letter casing in 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

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs:
    • #196 (Spanish catalog and accented letters in the menu): this depends on it.
    • #154 (the full-screen F1 look) also changes menu.rs and i18n.rs; whichever lands second needs a small rebase.
    • #175, #143, #140, #80, #75 and #47 add keys to en.json; until a Portuguese text is added for them, those show in English, as untranslated keys do in every catalog.
  • Replaces or overlaps: none found. No open or closed pull request or issue adds Portuguese.

The translation was written with Claude Code and reviewed by me, a native Brazilian Portuguese speaker, as described above.

🤖 Generated with Claude Code

## Contributor role (optional) - Fluxer ID: 1578057944262520834 ## 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 of `locales/en.json`: the F1 menu, the F3 panel, the advisor line, the warm-up lines, the preload window, the launcher and `play` messages, and the CLI help. - The tag is `pt-BR` with the alias `pt`, so `pt-PT` and `pt` find it too, and a Windows in Portuguese gets it under System Language through the existing `GetUserPreferredUILanguages` lookup. - Placeholders (`{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. - Words Brazilian players use as they are stay in English: shaders, pipelines, ray tracing, build, save, and FRAME GEN in the tab strip and short rows (GERAÇÃO DE QUADROS elsewhere). - Abbreviations with a dot are avoided inside sentences, because the menu starts a new sentence after a dot. - **F1 menu casing (`menu.rs`, on top of #196)**: `cased` takes the language's `Casing` (English, Spanish or Portuguese) in place of #196's `spanish` flag. 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. - A one-letter word beside a `/` 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()`, like `i18n::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 - Tested revision: a75ee08, on #196's head 60c1374. The three gates ran on 5ddf46f. a75ee08 changes only text in `locales/pt-BR.json`, so on it I ran the menu and `darner-core` tests and the catalog check again. - Gates, on 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 before `darner-shader` passed. In `darner-shader`, 572 passed, 1 failed, and `oracle64::legacy_mul_forms_are_exact` was 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 touch `darner-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 in `darner-gpu`'s `watch.rs`, which this PR doesn't touch: `watch::ask_holds::asking_kept_fast_path_guards_ask_ahead_and_done` and `watch::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. - On a75ee08: - `cargo test -p darner-gpu --lib --locked host::menu`: 52 passed, 2 ignored (the picture tests), including #196's Spanish test and a new `portuguese_texts_are_shown_in_ordinary_letters`. - `cargo test -p darner-core --locked`: 31 passed. - A script checked that `pt-BR.json` is UTF-8 without a BOM and has exactly the keys of `en.json`, with the same placeholders, line breaks and `[Y/n]` prompts in each message. - The menu and panel pictures were checked by eye in Portuguese (`DARNER_MENU_LANGUAGE=pt-BR`, `DARNER_MENU_SHOT` and `DARNER_PANEL_SHOT` with `menu_pictures`, `auto_detect_pictures` and `panel_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_scale` also passes in Portuguese. Two advisor lines and one warm-up line that were cut at the box's columns were made shorter. - Gameplay: not run in the game yet. This stays a draft until it is, and until #196 is merged. - Changes a default: no. - Hardware dependence: none; text only. - Coverage gaps: - The launcher scripts (`Play-Darner.ps1`) in Portuguese were not run. - The AUTO-DETECT change list stays as on main: its strings have no keys yet, and on main (in English too) it shows the rows' message keys, such as `MENU.SETTING.DLSS:`, in place of their names. That is a separate fix. ## Checklist - [ ] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on #196 (its accented-letter casing in `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 - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: - #196 (Spanish catalog and accented letters in the menu): this depends on it. - #154 (the full-screen F1 look) also changes `menu.rs` and `i18n.rs`; whichever lands second needs a small rebase. - #175, #143, #140, #80, #75 and #47 add keys to `en.json`; until a Portuguese text is added for them, those show in English, as untranslated keys do in every catalog. - Replaces or overlaps: none found. No open or closed pull request or issue adds Portuguese. The translation was written with Claude Code and reviewed by me, a native Brazilian Portuguese speaker, as described above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
All 798 message keys in Spanish. The F1 menu's casing keeps accented
letters in their word (GENERACIÓN was GeneraciÓN), writes Spanish titles
as sentences and keeps the one-letter words Y, O, A and U small. The
AUTO-DETECT list keeps accented letters and Chinese. Two Spanish tab
names are shorter than their pages (MÉTRICAS, UTILIDADES) to fit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PRESETS is PERFILES in Spanish. Spanish goes on in small letters after a
colon. Reflex, Windows, Streamline, DualSense, GitHub, Microsoft and
Series keep their capital inside a sentence (also in English, where
"in Windows." came out as "in windows.").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every message of locales/en.json in Brazilian Portuguese, alias pt, so a
Windows in Portuguese gets it under System Language. On top of the
Spanish casing (#196): cased() takes the language's Casing, and
Portuguese, like Spanish, writes a title as a sentence ("Limite de
memória de vídeo") with its own one-letter words small (A, E, O, À, É).
A one-letter word beside a / or a + is a key or a button and keeps its
capital (Q/E, A/XIS; in English A/CROSS, which came out as a/cross).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
BORRÃO for the smear, A CADA QUADRO for every frame, HISTÓRICO EM
GRÁFICOS for the graphs row (GRÁFICOS alone also means the picture's
quality), the game's RAM and VRAM in its help, and "(Y = sim)" in the
MFG Unlocker prompt, which only takes y as a yes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'traducao-pt-br-v2:Skanzinho-traducao-pt-br-v2'
git switch 'Skanzinho-traducao-pt-br-v2'

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.

git switch 'main'
git merge --no-ff 'Skanzinho-traducao-pt-br-v2'
git switch 'Skanzinho-traducao-pt-br-v2'
git rebase 'main'
git switch 'main'
git merge --ff-only 'Skanzinho-traducao-pt-br-v2'
git switch 'Skanzinho-traducao-pt-br-v2'
git rebase 'main'
git switch 'main'
git merge --no-ff 'Skanzinho-traducao-pt-br-v2'
git switch 'main'
git merge --squash 'Skanzinho-traducao-pt-br-v2'
git switch 'main'
git merge --ff-only 'Skanzinho-traducao-pt-br-v2'
git switch 'main'
git merge 'Skanzinho-traducao-pt-br-v2'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!217
No description provided.