[pr-feature][localisation] Spanish catalog (locales/es.json), with accented letters in the F1 menu #196

Open
starrockanonigtavi wants to merge 2 commits from starrockanonigtavi/Darner:spanish into main
Contributor

Contributor role (optional)

  • Fluxer ID: 1576513486756786176

What it changes

  • locales/es.json: Spanish 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. Neutral Latin American Spanish. Names such as DLSS, FPS, GPU, VRAM, RT, HDR and Reflex, and words players use as they are (shaders, pipelines, frame gen, presets), are left in English.
    • The tag is es, so es-MX, es-ES, es-419 and the rest find it through the existing fallback; it needs no aliases.
    • It shows up in F1 > Interface Language by itself. A Windows set to Spanish now gets Spanish under System Language, through the existing GetUserPreferredUILanguages lookup.
    • Placeholders ({0}, {1:N0}), names in backquotes and the split of a message across keys (launcher.sdk.*_missing + *_fetch, the HDR lines) are kept as in English. The [Y/n] prompts keep Y/N, since the answer is read as Y or N.
    • Two tab names are shorter than the page names, so the tab strip fits at 1080 lines: STATS is MÉTRICAS, TOOLS is UTILIDADES.
  • F1 menu casing (menu.rs, cased): an accented letter now belongs to its word. Before, GENERACIÓN was cut at the Ó and came out as GeneraciÓN.
    • Spanish texts are written as sentences, as Spanish does: "Calidad de texturas", not "Calidad De Texturas". English keeps a capital on each word of a title.
    • In Spanish the one-letter words Y, O, A and U are small ("Q y E", "Series X o S"); key names such as Q, E and X keep their capital.
    • Chinese is left as it was.
  • drawn_text (the AUTO-DETECT change list): accented letters and Chinese are kept, upper-cased, instead of being turned into spaces.
  • i18n::spanish(), like i18n::chinese().
  • README: --language es beside --language zh-CN.
  • 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.".

There are no new settings, no new DARNER_* switches and no change to play defaults. English and Chinese text is unchanged.

How it was tested

  • Tested revision: 60c1374
  • Commands and results, on 60c1374:
    • cargo clippy --workspace --all-targets --locked -- -D warnings: passed
    • cargo test -p darner-core --locked: passed (31)
    • cargo test -p darner-gpu --lib --locked host::menu: 51 passed, 2 ignored (the picture tests)
    • cargo test -p darner --locked: passed
    • cargo xtask policy: passed (556 files)
    • A script checked that es.json has exactly the keys of en.json, and the same placeholders and backquoted names in each message.
    • New tests: spanish_texts_are_shown_in_ordinary_letters (accents, sentence case, one-letter words, English and Chinese unchanged) and a drawn_text case with Ñ, Ú and Chinese.
    • The menu pictures were checked by eye in Spanish (DARNER_MENU_LANGUAGE=es), on every page, the key bindings, the save list and the FPS line, at 1080 lines: tabs, switches, values beside their n/m count, buttons and the panel's wrapping. The command was DARNER_MENU_SHOT=<dir> DARNER_MENU_LANGUAGE=es cargo test -p darner-gpu --lib menu::tests::menu_pictures -- --ignored.
  • Coverage gaps:
    • Not run in game. The preload window, the launcher and the F3 panel in Spanish were not looked at, only the F1 pictures.
    • The translation was written with Claude Code and has not been read through line by line by a person yet. I am a native Spanish speaker and will fix what players point out.
    • "AUTO-DETECT: RUN AGAIN" stays in English: it has no key on main.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs:
    • #154 (Magnificus, the full-screen F1 look) has a LANGUAGE row with Spanish, and says Spanish has no catalog of its own, so Darner's other texts stay in English. With this catalog they would be in Spanish too. #154 also changes menu.rs and i18n.rs; whichever lands second needs a small rebase.
    • #26 (merged) added the catalogs and Chinese; this follows the way its README section says to add a language.

🤖 Generated with Claude Code

## Contributor role (optional) - Fluxer ID: 1576513486756786176 ## What it changes - **`locales/es.json`**: Spanish 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. Neutral Latin American Spanish. Names such as DLSS, FPS, GPU, VRAM, RT, HDR and Reflex, and words players use as they are (shaders, pipelines, frame gen, presets), are left in English. - The tag is `es`, so `es-MX`, `es-ES`, `es-419` and the rest find it through the existing fallback; it needs no aliases. - It shows up in F1 > Interface Language by itself. A Windows set to Spanish now gets Spanish under System Language, through the existing `GetUserPreferredUILanguages` lookup. - Placeholders (`{0}`, `{1:N0}`), names in backquotes and the split of a message across keys (`launcher.sdk.*_missing` + `*_fetch`, the HDR lines) are kept as in English. The `[Y/n]` prompts keep Y/N, since the answer is read as Y or N. - Two tab names are shorter than the page names, so the tab strip fits at 1080 lines: STATS is MÉTRICAS, TOOLS is UTILIDADES. - **F1 menu casing (`menu.rs`, `cased`)**: an accented letter now belongs to its word. Before, `GENERACIÓN` was cut at the Ó and came out as `GeneraciÓN`. - Spanish texts are written as sentences, as Spanish does: "Calidad de texturas", not "Calidad De Texturas". English keeps a capital on each word of a title. - In Spanish the one-letter words Y, O, A and U are small ("Q y E", "Series X o S"); key names such as Q, E and X keep their capital. - Chinese is left as it was. - **`drawn_text`** (the AUTO-DETECT change list): accented letters and Chinese are kept, upper-cased, instead of being turned into spaces. - **`i18n::spanish()`**, like `i18n::chinese()`. - README: `--language es` beside `--language zh-CN`. - 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.". There are no new settings, no new `DARNER_*` switches and no change to play defaults. English and Chinese text is unchanged. ## How it was tested - Tested revision: 60c1374 - Commands and results, on 60c1374: - `cargo clippy --workspace --all-targets --locked -- -D warnings`: passed - `cargo test -p darner-core --locked`: passed (31) - `cargo test -p darner-gpu --lib --locked host::menu`: 51 passed, 2 ignored (the picture tests) - `cargo test -p darner --locked`: passed - `cargo xtask policy`: passed (556 files) - A script checked that `es.json` has exactly the keys of `en.json`, and the same placeholders and backquoted names in each message. - New tests: `spanish_texts_are_shown_in_ordinary_letters` (accents, sentence case, one-letter words, English and Chinese unchanged) and a `drawn_text` case with Ñ, Ú and Chinese. - The menu pictures were checked by eye in Spanish (`DARNER_MENU_LANGUAGE=es`), on every page, the key bindings, the save list and the FPS line, at 1080 lines: tabs, switches, values beside their `n/m` count, buttons and the panel's wrapping. The command was `DARNER_MENU_SHOT=<dir> DARNER_MENU_LANGUAGE=es cargo test -p darner-gpu --lib menu::tests::menu_pictures -- --ignored`. - Coverage gaps: - Not run in game. The preload window, the launcher and the F3 panel in Spanish were not looked at, only the F1 pictures. - The translation was written with Claude Code and has not been read through line by line by a person yet. I am a native Spanish speaker and will fix what players point out. - "AUTO-DETECT: RUN AGAIN" stays in English: it has no key on `main`. ## Checklist - [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: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: - #154 (Magnificus, the full-screen F1 look) has a LANGUAGE row with Spanish, and says Spanish has no catalog of its own, so Darner's other texts stay in English. With this catalog they would be in Spanish too. #154 also changes `menu.rs` and `i18n.rs`; whichever lands second needs a small rebase. - #26 (merged) added the catalogs and Chinese; this follows the way its README section says to add a language. 🤖 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]>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'spanish:starrockanonigtavi-spanish'
git switch 'starrockanonigtavi-spanish'

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 'starrockanonigtavi-spanish'
git switch 'starrockanonigtavi-spanish'
git rebase 'main'
git switch 'main'
git merge --ff-only 'starrockanonigtavi-spanish'
git switch 'starrockanonigtavi-spanish'
git rebase 'main'
git switch 'main'
git merge --no-ff 'starrockanonigtavi-spanish'
git switch 'main'
git merge --squash 'starrockanonigtavi-spanish'
git switch 'main'
git merge --ff-only 'starrockanonigtavi-spanish'
git switch 'main'
git merge 'starrockanonigtavi-spanish'
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!196
No description provided.