Skip to content

l10n: add complete Italian localization - #352

Closed
Dino0005 wants to merge 1 commit into
LNPANDY:mainfrom
Dino0005:l10n/italian
Closed

Dino0005 wants to merge 1 commit into
LNPANDY:mainfrom
Dino0005:l10n/italian

Conversation

@Dino0005

Copy link
Copy Markdown
Contributor

Fix or feature

  • Fix
  • Feature

What and why

The launcher speaks Chinese, English, Swedish and German. An Italian Mac or Windows gets English. This adds Italian to both front ends, built the way German was in 6355370.

  • Mac launcher. L10n.it is an overlay with an entry for every one of the shared table's 953 keys. It uses the informal "tu", Apple's Italian terms for system things (Impostazioni, Autorizza, Cestino, Modalità sviluppatore) and keeps technical names (prod.keys, NSP, RomFS, Metal, Xcode) as players see them in logs. Xcode's own menu paths stay in English, as Xcode has no Italian UI. Lang.it joins the device-language detection (it*) and the Settings picker, and settings.language.it ("Italiano") is in every catalog.
  • Qt front end. gen_localization.py writes Italian as a fifth column. Lang.IT is detected by language code and by Windows locale name (Italian_Italy, Italiano (Italia)), and the language button cycles 中文 → EN → Svenska → Deutsch → Italiano → 中文.
  • Fit. The width tests now cover Italian, and three labels were shortened to fit their controls: the hero button (library.newBuild, "Compila"), the Builds page's setup button (build.setup, "Configura ora") and the launch options' reset (launch.reset, "Carica valori testati"). data.dlc is "DLC (aggiuntivi)" so it fits the Qt label column.
  • Capture. The language dropdown capture (testRenderDropdownForScreenshots) rendered a fixed German list of five languages. It now renders the picker's own list (BuilderView.languageCodes) in NX_CAPTURE_LANG.
  • frontend/README.md names the Italian overlay and its test.

Checked

  • Tests, on this branch rebased on main 5719163:
    • cd frontend && swift build && swift test: 656 tests, 16 skipped, 0 failures. New ItalianLocalizationTests: every key has Italian text, no English left outside names and units, placeholders match English in count and order, no semicolons, no three-dot ellipsis.
    • python3 -m unittest discover -s frontend-qt/tests: OK. New test_localization_it.py and Italian cases in test_i18n_detect.py and test_build_failure_hints.py.
    • python3 frontend-qt/gen_localization.py leaves frontend-qt/nspb_qt/localization.py unchanged.
    • python3 -m unittest discover tools/tests: OK.
  • Visual QA: NX_CAPTURE_LANG=it NX_LAUNCHER_CAPTURE_DIR=… NX_ONBOARDING_CAPTURE_DIR=… swift test for the library, Builds, Settings, language list, onboarding and build failure views (below). The Qt window was rendered offscreen with PySide6 6.12, NSPB_LANG=it.
  • Run on a Mac: NX2Apple.app assembled locally the way build-mac-app.yml does it and used in Italian on an Apple M3 Pro, macOS 27.2: Settings, library, Builds and a game build. No game was played on this branch.
  • Not checked: the Qt front end on Windows, and the iPhone shell (frontend-ios/), which this PR does not change.

Screenshots

Before is main in English (the language list capture rendered German before this change), after is this branch in Italian.

Library

1-library-before-en 1-library-after-it

Builds

2-build-before-en 2-build-after-it

Settings

3-settings-before-en 3-settings-after-it

Language list

4-language-list-before 4-language-list-after-it

Onboarding

5-onboarding-before-en 5-onboarding-after-it

Build failure

6-build-failure-before-en 6-build-failure-after-it

Qt front end

7-qt-before-en 7-qt-after-it

Scope

  • No engine file (dm/, scripts/, docs/, ref/) is added to the repository: a change there is a patch in patches/ (a commit in engine/, then tools/engine.py export, and tools/engine.py check passes), with its Upstream-Status
  • A fix to the engine or a game profile also goes to seedds/nxnative as a PR in parallel: this PR's patch says forwarded seedds/nxnative#..., or pending until that PR is open
  • A change to a launcher view has before and after screenshots above
  • No keys, game files or data extracted from a game in the change or the attachments

🤖 Generated with Claude Code

@github-actions github-actions Bot added documentation Improvements or additions to documentation launcher The NX2Apple launcher app windows Windows (the Qt front end) labels Oct 31, 2026
@v0lumehi v0lumehi added the nice-to-have Goes into the next release if it is ready in time label Nov 1, 2026
@v0lumehi v0lumehi modified the milestones: v1.4.0, v1.2.0 Nov 1, 2026
@github-actions github-actions Bot added the ci Workflows and repository tooling label Nov 1, 2026
@Dino0005
Dino0005 force-pushed the l10n/italian branch 3 times, most recently from dbf5142 to 55292d6 Compare November 1, 2026 22:15
Add an Italian overlay (L10n.it) for every string of the shared table, in the
informal "tu", with Apple's Italian terms for system things and technical names
(prod.keys, NSP, RomFS, Metal, Xcode) left as players see them in logs. Xcode's
own menus stay in English, as Xcode has no Italian UI. Italian joins the
device-language selection, the Settings picker and the Qt language button
(by language code and Windows locale name, after French), the app's
CFBundleLocalizations, and the generator writes it into the Qt table as a sixth
column. The stale-frameworks prompt (LocalizationStaleFrameworks.swift) has its
Italian text too.

The overlay lives in NXCore/LocalizationItalian.swift and
LocalizationItalianMore.swift, so no Swift file goes above 800 lines
(SourceSizeTests). Localization.swift does not grow: Lang.initial() reads the
stored choice with Lang(rawValue:), which also covers the new code, and the
file's entry in SourceSizeTests goes down from 4237 to 4236.

ItalianLocalizationTests and test_localization_it.py fail for any key without
Italian text or with different format placeholders. The width tests now cover
Italian too: the hero button, the Builds page's setup button, the launch
options' reset label and the controller layout's "Standard" were shortened to
fit. The language dropdown capture renders the picker's own list in
NX_CAPTURE_LANG. The French tests list settings.language.it among the names
that stay as written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@v0lumehi

v0lumehi commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the Italian translation. It is a lot of work. The launcher texts now live in one JSON file per language (frontend/l10n/<code>.json, from #478 and the PRs after it), and the Windows launcher reads the same files. So this PR would become a new file frontend/l10n/it.json plus its _language entry, and the Swift and Python tables go away. Adding a language is one file then.

I suggest you wait until those PRs are in main. I will write here when they are, and explain the file. #514 in Discussions asks for Italian as well, so you may want to work together.

@PikaMan80

Copy link
Copy Markdown
Contributor

I don't want to interfere with Dino0005's work.
If he agree i'll be happy to help. If not, i'll wait for the translation. :)

@v0lumehi

v0lumehi commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks @PikaMan80, that is kind of you. @Dino0005 are you still on the Italian translation? When the new language file format is in main, I will post here with a short guide, and you two can decide how to split the work.

@Dino0005

Dino0005 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @v0lumehi. I'll wait for the JSON files to land on main and then redo this PR as frontend/l10n/it.json. All the Italian strings are ready, so it should be quick once you give the go.

Hi @PikaMan80,
as for the app, the translation is already complete: PR #352 has every launcher string translated into Italian. As soon as the new format lands on main, I'll move them to frontend/l10n/it.json, so the most useful thing would be a review of the wording once the new PR is up, or testing the launcher in Italian after it's merged.
If you'd like to take care of the documentation, I haven't done anything for README.it.md yet.

@v0lumehi

v0lumehi commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks @Dino0005. The new format is in main now, so you have the go. Here is how to redo this PR:

  1. Copy frontend/l10n/en.json to frontend/l10n/it.json and translate the values. The file is flat, one line per key, sorted by key.
  2. Start the file with the language block, as in de.json:
"_language": {
  "name": "Italiano",
  "locales": ["it", "italian", "italiano"]
},

locales are the names by which the system language is matched (a macOS language code, a Windows name). order is optional. Without it a language comes after the five that have one.
3. Keep the placeholders (%@, %d, %.1f, {0}) as in English. A text you leave out shows English, so a first PR can be partial. Keys that start with ios. are the iPhone and iPad shell texts and are optional.
4. Run cd frontend && swift test --filter LocalizationRulesTests and python3 -m unittest discover -s frontend-qt/tests (the same command CI runs). They check the file for you.
5. The iOS shell only offers a language its app declares in CFBundleLocalizations (the Demo app, tools/try-local, the shell app of the engine in patch 0056). tools/tests/test_l10n_shell_catalogs.py fails until it is listed there. I can do this part, so just tell me when your file is up. If you do change the xcstrings, run python3 tools/l10n_shell_catalogs.py.

Please open it as a new PR from a branch of your fork, and I will close this one when it is up. @PikaMan80 a review of the Italian wording once the PR is up is a big help.

@PikaMan80

Copy link
Copy Markdown
Contributor

documentation is almost ready. Going to fork it.

Dino0005 added a commit to Dino0005/NX2Apple that referenced this pull request Nov 2, 2026
frontend/l10n/it.json: every launcher text in Italian (1022 keys, the same
coverage as German and French, plus the one ios. key they have), in the
informal "tu", with Apple's Italian terms for system things and technical
names (prod.keys, NSP, RomFS, Metal, Xcode) left as players see them in logs.
The _language block names it Italiano, with the locales it, italian and
italiano and no order, so it comes after the five.

The texts are the ones of LNPANDY#352, moved to the new file.

Italian is declared where every language of the files is: the Mac app
(build-mac-app.yml, tools/try-local), the iOS demo app (project.yml and
Gen/Info.plist) and the engine's shell app (patch 0057, after 0056). The
ShellUI catalog is regenerated with tools/l10n_shell_catalogs.py.

The tests that listed the five languages now list Italian sixth (the picker
order, the button cycle, the files in the checkout), and the temporary
language of the "one more file" tests comes after it. The tests that compare
the detection with the code before the files accept that it-IT / it_it,
English then, selects Italian now, and check that it does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Dino0005 Dino0005 mentioned this pull request Nov 2, 2026
4 of 6 tasks
Dino0005 added a commit to Dino0005/NX2Apple that referenced this pull request Nov 2, 2026
frontend/l10n/it.json: every launcher text in Italian (1022 keys, the same
coverage as German and French, plus the one ios. key they have), in the
informal "tu", with Apple's Italian terms for system things and technical
names (prod.keys, NSP, RomFS, Metal, Xcode) left as players see them in logs.
The _language block names it Italiano, with the locales it, italian and
italiano and no order, so it comes after the five.

The texts are the ones of LNPANDY#352, moved to the new file.

Italian is declared where every language of the files is: the Mac app
(build-mac-app.yml, tools/try-local), the iOS demo app (project.yml and
Gen/Info.plist) and the engine's shell app (patch 0060, after 0059). The
ShellUI catalog is regenerated with tools/l10n_shell_catalogs.py.

The tests that listed the five languages now list Italian sixth (the picker
order, the button cycle, the files in the checkout), and the temporary
language of the "one more file" tests comes after it. The tests that compare
the detection with the code before the files accept that it-IT / it_it,
English then, selects Italian now, and check that it does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@v0lumehi

v0lumehi commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Superseded by #528, which is merged. Thanks @Dino0005 and @PikaMan80. I close this PR.

@v0lumehi v0lumehi closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Workflows and repository tooling documentation Improvements or additions to documentation launcher The NX2Apple launcher app nice-to-have Goes into the next release if it is ready in time windows Windows (the Qt front end)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants