Repository navigation
l10n: add complete Swedish localization - #168
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Qt language toggle switches to languages that do not match its labels and prevents users from selecting Swedish through the button.
1 open issue
What changed in this PR
Adds Swedish localization to the NX2Apple launcher, using the Swift catalog as the source for both frontends.
Changes:
- Adds Swedish translations for all 616 localization keys, with English fallback for future missing entries.
- Extends language detection and selection handling for Swedish.
- Updates Qt catalog generation and adds Swift catalog assertions.
| File | Description |
|---|---|
frontend/Tests/NSPortBuilderTests/OnboardingTests.swift |
Adds assertions for Swedish catalog lookups. |
frontend/Sources/NSPortBuilder/Localization.swift |
Adds Swedish translations, detection, saved preference handling, and fallback. |
frontend/Sources/NSPortBuilder/ContentView.swift |
Adds Swedish to the settings picker and controller navigation. |
frontend-qt/nspb_qt/localization.py |
Regenerates the shared catalog with Swedish translations and lookup support. |
frontend-qt/nspb_qt/i18n.py |
Adds Swedish language detection and updates toggle handling. |
frontend-qt/gen_localization.py |
Generates Swedish catalog entries from the Swift overlay. |
Review effort: Balanced
Owner
|
Approved (owner) — merge into the next release, not v0.6.0 (already shipped). Adding a full new language is exactly the kind of change that deserves a release of its own rather than riding in a patch release. @v0lumehi please review the localization plumbing (the same L10n table and tests every language goes through) before merging; the translations themselves are yeager's. |
2 tasks done
subyoung
added a commit
to subyoung/NX2Apple
that referenced
this pull request
Oct 29, 2026
The host already writes a timing row per frame when DM_NVN_TSV names a file (the rows scripts/bench.py reads), but only from the command line. A game's launch options now have a Frame times section: a switch makes Play pass DM_NVN_TSV (timing rows only, DM_NVN_TSV_CALLS=0) to a new file in <library>/frame-times/<title ID>/, and the last three recordings are summed up as bench.py counts them (nearest-rank percentiles: median, 99 %, slowest, frames over 50 ms, dropped frames) and charted, the hitches marked. Off by default. Rebased onto main: the desktop Play now builds its environment with GameStart.environment, and the recording is added on top of it by one helper (FrameTimes.recordingEnvironment) that console mode's Play calls too, so a game whose recording is on is recorded however it is started. The strings have their Swedish entries (LNPANDY#168). Checked after the rebase: swift build; swift test, 368 tests, 0 failures (FrameTimesTests gains testBothWaysOfStartingAGameRecordTheSame and checks the Swedish entries; ConsoleLiveTests unchanged).
3 tasks done
subyoung
added a commit
to subyoung/NX2Apple
that referenced
this pull request
Oct 29, 2026
The host already writes a timing row per frame when DM_NVN_TSV names a file (the rows scripts/bench.py reads), but only from the command line. A game's launch options now have a Frame times section: a switch makes Play pass DM_NVN_TSV (timing rows only, DM_NVN_TSV_CALLS=0) to a new file in <library>/frame-times/<title ID>/, and the last three recordings are summed up as bench.py counts them (nearest-rank percentiles: median, 99 %, slowest, frames over 50 ms, dropped frames) and charted, the hitches marked. Off by default. Rebased onto main: the desktop Play now builds its environment with GameStart.environment, and the recording is added on top of it by one helper (FrameTimes.recordingEnvironment) that console mode's Play calls too, so a game whose recording is on is recorded however it is started. The strings have their Swedish entries (LNPANDY#168). Checked after the rebase: swift build; swift test, 368 tests, 0 failures (FrameTimesTests gains testBothWaysOfStartingAGameRecordTheSame and checks the Swedish entries; ConsoleLiveTests unchanged).
Koshindai
added a commit
to Koshindai/NX2Apple
that referenced
this pull request
Oct 30, 2026
French players had the English interface. This adds a complete French catalogue to the Mac launcher and, through the generator, to the Qt front end, following the Swedish pattern (LNPANDY#168): an `fr` overlay below the (zh, en) table, a `.fr` case in Lang chosen for fr* devices, a fifth entry in the Settings language picker and its controller cycle, and a fourth Qt column. - Every key is translated (vous form, "compiler" for build). Names, units and button letters that read the same are listed in the test. - French spacing: no-break spaces (\u{a0}) before : ; ? !, inside « », and between a number and its unit, so they never start a line. - Qt: Lang.FR, detected from "fr" alone or before a separator (fr_FR, fr-CA) and from "French" in a Windows locale name, not from a longer code (fry). - FrenchLocalizationTests: every key has French, nothing else is left in English, placeholders (%@, %d, %ld, %%, %1$@, %.1f) match the English. - French reads the English section of bilingual release notes. - Release Info.plist lists fr in CFBundleLocalizations. Builds on l10n/untranslated-strings (launch options, stage and key names). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Koshindai
added a commit
to Koshindai/NX2Apple
that referenced
this pull request
Oct 30, 2026
French players had the English interface. This adds a complete French catalogue to the Mac launcher and, through the generator, to the Qt front end, following the Swedish pattern (LNPANDY#168): an `fr` overlay below the (zh, en) table, a `.fr` case in Lang chosen for fr* devices, a sixth entry in the Settings language picker and its controller cycle (after German), and a fifth Qt column. - Every key is translated (vous form, "compiler" for build). Names, units and button letters that read the same are listed in the test. - French spacing: no-break spaces (\u{a0}) before : ; ? !, inside « », and between a number and its unit, so they never start a line. - Qt: Lang.FR, detected from "fr" alone or before a separator (fr_FR, fr-CA) and from "French" in a Windows locale name, not from a longer code (fry). - FrenchLocalizationTests: every key has French, nothing else is left in English, placeholders (%@, %d, %ld, %%, %1$@, %.1f) match the English. - French reads the English section of bilingual release notes. - Release Info.plist lists fr in CFBundleLocalizations. Builds on l10n/untranslated-strings (launch options, stage and key names). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Koshindai
added a commit
to Koshindai/NX2Apple
that referenced
this pull request
Oct 30, 2026
French players had the English interface. This adds a complete French catalogue to the Mac launcher and, through the generator, to the Qt front end, following the Swedish pattern (LNPANDY#168): an `fr` overlay below the (zh, en) table, a `.fr` case in Lang chosen for fr* devices, a sixth entry in the Settings language picker and its controller cycle (after German), and a fifth Qt column. - Every key is translated (vous form, "compiler" for build). Names, units and button letters that read the same are listed in the test. - French spacing: no-break spaces (\u{a0}) before : ; ? !, inside « », and between a number and its unit, so they never start a line. - Qt: Lang.FR, detected from "fr" alone or before a separator (fr_FR, fr-CA) and from "French" in a Windows locale name, not from a longer code (fry). - FrenchLocalizationTests: every key has French, nothing else is left in English, placeholders (%@, %d, %ld, %%, %1$@, %.1f) match the English. - French reads the English section of bilingual release notes. - Release Info.plist lists fr in CFBundleLocalizations. Builds on l10n/untranslated-strings (launch options, stage and key names). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Koshindai
added a commit
to Koshindai/NX2Apple
that referenced
this pull request
Oct 30, 2026
French players had the English interface. This adds a complete French catalogue to the Mac launcher and, through the generator, to the Qt front end, following the Swedish pattern (LNPANDY#168): an `fr` overlay below the (zh, en) table, a `.fr` case in Lang chosen for fr* devices, a sixth entry in the Settings language picker and its controller cycle (after German), and a fifth Qt column. - Every key is translated (vous form, "compiler" for build). Names, units and button letters that read the same are listed in the test. - French spacing: no-break spaces (\u{a0}) before : ; ? !, inside « », and between a number and its unit, so they never start a line. - Qt: Lang.FR, detected from "fr" alone or before a separator (fr_FR, fr-CA) and from "French" in a Windows locale name, not from a longer code (fry). - FrenchLocalizationTests: every key has French, nothing else is left in English, placeholders (%@, %d, %ld, %%, %1$@, %.1f) match the English. - French reads the English section of bilingual release notes. - Release Info.plist lists fr in CFBundleLocalizations. Builds on l10n/untranslated-strings (launch options, stage and key names). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Koshindai
added a commit
to Koshindai/NX2Apple
that referenced
this pull request
Oct 31, 2026
French players had the English interface. This adds a complete French catalogue to the Mac launcher and, through the generator, to the Qt front end, following the Swedish pattern (LNPANDY#168): an `fr` overlay below the (zh, en) table, a `.fr` case in Lang chosen for fr* devices, a sixth entry in the Settings language picker and its controller cycle (after German), and a fifth Qt column. - Every key is translated (vous form, "compiler" for build). Names, units and button letters that read the same are listed in the test. - French spacing: no-break spaces (\u{a0}) before : ; ? !, inside « », and between a number and its unit, so they never start a line. - Qt: Lang.FR, detected from "fr" alone or before a separator (fr_FR, fr-CA) and from "French" in a Windows locale name, not from a longer code (fry). - FrenchLocalizationTests: every key has French, nothing else is left in English, placeholders (%@, %d, %ld, %%, %1$@, %.1f) match the English. - French reads the English section of bilingual release notes. - Release Info.plist lists fr in CFBundleLocalizations. Builds on l10n/untranslated-strings (launch options, stage and key names). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Koshindai
added a commit
to Koshindai/NX2Apple
that referenced
this pull request
Oct 31, 2026
French players had the English interface. This adds a complete French catalogue to the Mac launcher and, through the generator, to the Qt front end, following the Swedish pattern (LNPANDY#168): an `fr` overlay below the (zh, en) table, a `.fr` case in Lang chosen for fr* devices, a sixth entry in the Settings language picker and its controller cycle (after German), and a fifth Qt column. - Every key is translated (vous form, "compiler" for build). Names, units and button letters that read the same are listed in the test. - French spacing: no-break spaces (\u{a0}) before : ; ? !, inside « », and between a number and its unit, so they never start a line. - Qt: Lang.FR, detected from "fr" alone or before a separator (fr_FR, fr-CA) and from "French" in a Windows locale name, not from a longer code (fry). - FrenchLocalizationTests: every key has French, nothing else is left in English, placeholders (%@, %d, %ld, %%, %1$@, %.1f) match the English. - French reads the English section of bilingual release notes. - Release Info.plist lists fr in CFBundleLocalizations. Builds on l10n/untranslated-strings (launch options, stage and key names).
v0lumehi
pushed a commit
to Koshindai/NX2Apple
that referenced
this pull request
Nov 1, 2026
French players had the English interface. This adds a complete French catalogue to the Mac launcher and, through the generator, to the Qt front end, following the Swedish pattern (LNPANDY#168): an `fr` overlay below the (zh, en) table, a `.fr` case in Lang chosen for fr* devices, a sixth entry in the Settings language picker and its controller cycle (after German), and a fifth Qt column. - Every key is translated (vous form, "compiler" for build). Names, units and button letters that read the same are listed in the test. - French spacing: no-break spaces (\u{a0}) before : ; ? !, inside « », and between a number and its unit, so they never start a line. - Qt: Lang.FR, detected from "fr" alone or before a separator (fr_FR, fr-CA) and from "French" in a Windows locale name, not from a longer code (fry). - FrenchLocalizationTests: every key has French, nothing else is left in English, placeholders (%@, %d, %ld, %%, %1$@, %.1f) match the English. - French reads the English section of bilingual release notes. - Release Info.plist lists fr in CFBundleLocalizations. Builds on l10n/untranslated-strings (launch options, stage and key names).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Validation
swift test --package-path frontend(251 passed; 7 visual-capture tests skipped without their opt-in environment variables)l10n-lint,svlang, Hunspell review, and scoped Gitleaks scan