Add Spanish (Spain) UI localisation (es) #53
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!53
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-53"
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?
@Kassadd on GitHub · 2026-12-05 16:38 UTC · original
Kassadd:locale/es→main· +303 −5 · 7 files · 3 commits · merged 2026-12-05 19:00 UTCAdds
locales/es.json(288 keys, the same key set and{0}-style placeholders asen) and registers it, so it works in theF10menu,--lang es,LARP_LANGUAGE=esand automatic OS detection.Registration — every place the language list is hard-coded:
locales/es.json{"tag":"es","name":"Español","aliases":["es-ES"]}crates/larp-game/src/settings.rsc("es", 7.0)appended to thelanguagesetting's choicescrates/larp-hle/src/settings.rsLANG_TAGS: [&str; 8],"es"appended in the same ordercrates/larp-core/src/i18n.rsCATALOGS.len()7 → 8,es-ES/es_MXalias assertsapps/larp/src/main.rs,docs/environment-variables.md,README.md--langhelp,LARP_LANGUAGErow, 7 → 8 languagesAppending at the end rather than inserting keeps the number saved in
settings.ini(language = 6) pointing at the same tag, so nobody's language changes on upgrade.The panel clips a string that does not fit — it does not wrap it, and inside a row a span may run into the next one.
overlay.rsstops a span atpanel.columns; the menu puts the label at column 2, the value atVALUE_AT = 34and the "when" atWHEN_AT = 60. So the budget is not one number per key but one per column the string starts at:setting.*.label≤ 31 columns (English's longest is 29, the other locales' is 26);"<default> (<choice>)"≤ 26 columns, i.e. the two parts together, not each on its own;pool.*names ≤ 20 columns (hostmem.rs);*.about≤ 2 lines of 74; effect and status lines ≤ 75 (one span at column 1 of a 76-column panel);perf.*labels share the panel's 30 columns with their value on the right.Technical terms are deliberately left in English where translating them would be worse than the English word (shader, pipeline, frame, back buffer, upscaler, mip, LOD, cull, ray tracing, streaming, heap, present, hook, screen-space, tessellation).
How it was tested
cargo xwin build --release --locked -p larp --target x86_64-pc-windows-msvcinrust:1.98.1with the Windows SDK, and run on Linux under Proton (larp.exe run … --execute) withLARP_LANGUAGE=es.F9panel:Ajustes,[Imagen]/Sin probar,4/19and15/19, every row label, the about box, the effect line (Surte efecto en el próximo arranque (…)), the when-column (ahora,ahora, reinicia,próximo arranque) and the performance panel (1% low,0,1% low,el más largo,heap libre,objetos de textura,graphics heap,copias del título,pipelines).menu.hints.browsewas cut atF10(83 columns at column 1) → 72 columns;menu.default.dlss_or_fsrwrapped into the value column →DLSS si hay, and withmenu.value.default=defectothe wholedefecto (DLSS si hay)is 21 of the 26 columns available. It is the same row that overflows in en/de/fr/pl/tr (default (DLSS where the card has it, else FSR)is 46), but that is not this PR's to fix.cargo test -p larp-core --lib i18n— 5/5, including catalog completeness, placeholder parity and sort order.es.jsonagainsten.json: identical key set, zero placeholder mismatches, sorted, and the width limits above hold for every key.Not tested: the
F10menu at a resolution other than 3440x1440, and the CJK paths (nozhstrings touched).Note: #48 adds
locales/pt-BR.jsonbut does not touch the three registration points, so that catalog would not be reachable from the menu or--lang; the same three edits are needed there. Same for the missingsetting.speaker_gain.*andsetting.volumetrics_quality.*keys that the OCR review of #23 mentions —es.jsonmirrorsen.json, so it inherits the gap rather than introducing it.405244629ato43d8100753