Skip to content

launcher: add shared localization tables and stable settings keys - #780

Open
thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/launcher-localization
Open

thehobbit85 wants to merge 1 commit into
seedds:mainfrom
thehobbit85:codex/launcher-localization

Conversation

@thehobbit85

@thehobbit85 thehobbit85 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Mac and iOS launchers share optional localization keys and bundled string tables. Schema1, raw settings values, the single preference store and English fallback remain compatible.

Rebased 533e2cc43b816bb9ad860032d61770a625932731 onto 90b7cefd1d572ab05859c73930b436c4040cd25c, producing 1593de864ccff8d1eab38d76b8ca6be33a2edba3. Main's cloud-save comparison, asynchronous Play checks, cancellation and disabled-button behavior remain intact. Six new English fallback keys cover the current retry/pending-check controls. The existing table already covered current settings rows. The cloud controls' missing entries were observed as twelve failing occurrences before completing the catalog. The original commit and substantive context remain preserved.

Fresh exact-head checks: 99 tests passed, zero skips (test_launcher_localization, test_launcher_settings, test_nsp_mac_app, test_docs), native Python3.14.6, Xcode27.2. These run real bundle translation/fallback and raw-value preference checks, including translated retry text, missing cloud-status translation, unsupported locale, legacy JSON, conditional settings, native temporary Mac apps and resource/reuse handling. The actual iOS launcher/settings/rows/save-report/hosting/game-menu sources also type-check against the installed iPhoneOS SDK, arm64/iOS18 deployment target and production bridging header. The first isolated type-check omitted two dependent Swift sources; supplying those unchanged production files resolved the invocation errors. No source workaround was needed.

Pinned Python lint passed321/321, zero new/stale. Generated symptoms, complete range/main diff, ancestry, original commit message, schema/docs links and whitespace checks passed. Source comparison proves the preference model and save report exactly match main; cloud-check/start state machines match after removing literal localization calls. No default, raw runtime key or store identity changed. The earlier catalog test invocation used the evidence directory, then ran correctly in the checkout; the captured meaningful negative result concerns the new cloud UI keys.

Impact is the shared built-in launcher/settings and packer path across games, with legacy bundles and unknown locales as compatibility controls. No game rebuild, shader translation, gameplay or device test was performed. Full iOS app linking/resource smoke and visual layout were not repeated here; earlier evidence below belongs to its named head. No game signing or installation occurred. No complete translated language is claimed. Remote CI is separate from these local results.

Historical description, validation limitations and original commit context

The Mac and iOS launchers share optional localization keys and bundled string tables. Schema 1, raw values, the single preference store and English fallback remain compatible.

Current rebase

533e2cc43b816bb9ad860032d61770a625932731 rebases eb981149e013b72d0e9527aca2ed88d31923ac4a directly onto main bbea4c90f136f478e25228bc3d4ab33c77420f2e. The packing reference now retains both main's shader package/key mismatch and this PR's launcher localization guidance. The generated symptom index was rebuilt. The feature patch and original commit message are unchanged, including the English catalog that covers the Switch 2 controller and display options.

Current validation

  • 57 focused tests passed, zero skips, with native arm64 Python 3.14.6 and Xcode 27.2 (27B52). Ran the native localization fixture, launcher settings and settings suites, the temporary Mac app layout and reuse fixtures, and docs. These cover localized text, fallback, packaged catalog and preserved raw values.
  • 216 generated-settings cases match pinned main after removing only the optional localization keys. The cases cover six profiles, both platforms, three graphics paths, known/unknown languages and fixups. In 72 cases the new upstream render-scale limit remains 3.0.
  • Pinned Python lint reports 339 findings against 336 baseline entries, three new findings and zero stale. Its three HMMA scan diagnostics match the isolated exact-main check at 5e1c1aec, whose Python and lint inputs are unchanged on this pin. The lint baseline is unchanged. Generated docs and git diff --check passed.

Static impact reports four broad packer matches and 149 profiles without usage manifests. Hades, Breath of the Wild, Scarlet and Tears of the Kingdom represent shared packing paths. Current validation is synthetic. Gameplay, live translated UI and iOS device validation remain outstanding.

Front-ends: interface: schema 1 adds optional label_key, note_key, section_key, option_keys. English text and raw values remain compatible.

Prior descriptions, validation and original commit context

The earlier results apply to their named revisions and environments.

The built-in Mac and iOS launchers share localization resources and optional stable settings keys. Schema 1, the preference store, raw values, original English text and the fallback for missing translations stay compatible.

Current rebase

eb981149e013b72d0e9527aca2ed88d31923ac4a rebases 064bfe9b05d7b88d984630884ef6c3ff4f79b9cb directly onto main 413e8808e0799eab8730688f082835aeeaca84c5 with the original feature commit and message. The sole Git conflict was the generated symptom index, which was regenerated from the combined references. The existing catalog coverage test exposed main's new press-to-join and Switch 2 controller rows, Match screen option, and updated dynamic-resolution note. The English catalog now carries their exact current text. The range-diff retains the same feature patch outside the catalog, and the packer keeps main's Bluetooth and save-sync capability.

Current validation

  • 100 focused tests passed with native arm64 Python 3.14.6, Xcode 27.2 (27B52) and macOS SDK 27.2. Command python3 -B -m unittest -v dm.ios.tests.test_launcher_localization dm.tools.tests.test_launcher_settings dm.tools.tests.test_settings dm.tools.tests.test_nsp_mac_app dm.tools.tests.test_docs. Native Swift fixtures verified translated text, English fallback and stable raw values. Temporary Mac app fixtures verified the packaged resources and launcher.
  • 120 settings comparisons matched pinned main after removing only the optional localization metadata. Five profiles covered both platforms, three graphics paths, known and unknown languages, and synthetic fixups present or absent. The generated docs and git diff --check passed.
  • Pinned Python lint reports 339 findings against 336 baseline entries and zero stale entries. Its three excess findings in unity_bucket.py reproduce with identical diagnostics on isolated exact main. The lint baseline is unchanged.

Static impact reports four broad matches and 149 profiles without usage manifests. Hades, Breath of the Wild, Scarlet and Tears of the Kingdom represent the shared packing paths. This change reaches built-in launcher resources across titles. No current game launch, live translated settings UI observation, or iOS app and device validation was performed.

Front-ends: interface: schema 1 adds optional label_key, note_key, section_key, option_keys. English text and raw values remain compatible. Built-in launchers use bundled Launcher.strings and English fallback.

Prior description, validation and original commit context

The earlier results below apply to their named revisions and environments.

Rebased onto main 865cc35fad7034d17c2190f8ce349f61f5bcaba1; exact candidate 064bfe9b05d7b88d984630884ef6c3ff4f79b9cb. Main still lacks the shared localization catalog and optional stable settings keys. Both launchers keep schema 1 and the existing single preference store, original English text/raw environment values, English fallback and stable section identity.

The packer conflict retains this PR's localization-resource copy beside main's new copy_msl shader-library image path. Removing only the original development-region/catalog-reuse/resource-copy additions yields byte-for-byte main pack_app.py, including archive selection, subset copying and program/reuse behavior. Range-diff changes only adjacent upstream archive-copy context. Main's conditional 120 fps and unknown-language behavior remain intact; canonical development/frontend/schema docs and the generated symptom index are retained.

Fresh exact-candidate validation (native Python 3.14.6 arm64; Xcode 27.2/27B52, macOS SDK 27.2):

  • DM_GAME=010015100B514000 DOTNET_ROOT=/usr/local/share/dotnet /opt/homebrew/bin/python3 -B -m unittest -v dm.tools.tests.test_nsp_mac_app dm.tools.tests.test_shader_lib dm.ios.tests.test_launcher_localization dm.tools.tests.test_launcher_settings dm.tools.tests.test_settings dm.tools.tests.test_docs dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_incremental: 217 tests passed, including all 18 native temporary-App cases, real C/Swift launcher compilation, bundled catalog/layout/signature checks and the compiled native translation/English-fallback/raw-value fixture. The suite ran outside the separately proven iconutil sandbox restriction.
  • 60 generated-settings cases across five profiles, both platforms and known/unknown language lists match pinned main after removing only optional localization keys. Two production-packer/archive-reader fixture cases (compiler/icon/signing tools mocked) verify folder/image shader inputs alongside bundled locale bytes, unchanged raw settings, catalog-edit invalidation and unchanged-input reuse. git diff --check passes.
  • /private/tmp/nxusers-pinned-lint/bin/python3 -B dm/tools/lint_python.py --against 865cc35fad7034d17c2190f8ce349f61f5bcaba1: inherited main failure, 390 findings/387 baseline/3 new/0 stale, with the identical log from tracked-clean exact main. The six annotated reportIndexIssue locations are in unchanged dm/tools/tests/test_nso_match.py, source blob 042bc4320b0d2a1c22bf296c9877ece03108fb51. All five pinned package versions match requirements. This is not a green lint check, and no unrelated repair/baseline growth is included.

Static regress.py impact reports four broad profiles (Hades, Breath of the Wild, Scarlet, Tears of the Kingdom), 141 without usage manifests and zero reached host entry points. This feature reaches built-in launcher text/resources for all Mac/iOS apps; the runtime host/chain/game profiles are unchanged. Synthetic packaging/native fixtures cover this integration; no gameplay, game shader rebuild, iOS full-app/device build or live translated-UI observation is claimed. Historical results and all original commit-message context remain below.

Front-ends: interface: schema 1 adds optional label_key, note_key, section_key, option_keys; existing English text and raw values remain compatible. Built-in launchers use bundled Launcher.strings translations and English fallback.

Historical PR description and original commit context (preserved)

Refreshed onto main f8a5618d5f505a4c0a0bcac7c413872d3a53c009; exact candidate dc864f29ca5db16cd405a7050e4450cd07cf0af8. Main still lacks the shared localization catalog and optional stable label/option keys. Both launchers keep one settings schema/store, raw environment values, English fallback and section identity.

The packing reference conflict retains both upstream shader-table diagnostics and the launcher finding; the symptom index was regenerated. Main's settings lint correction (offered(v, n) outside the row loop), conditional 120 fps choice, and unknown-language behavior are preserved. The range-diff contains upstream context and the documentation union only.

Fresh exact-candidate validation: 70 focused tests passed, including the compiled Swift translation/English-fallback fixture, settings/schema, docs and packaging tests; 60 generated-settings cases across five profiles, both platforms and known/unknown languages matched pinned main byte-for-value after removing only the optional localization keys. Python ratchet passed: 389 baseline findings, zero new/stale. git diff --check passed. Earlier 18 temporary native-App tests remain historical: all listed native source, catalog and packaging recipe inputs match previously tested head bf67015dddd7eff79f17db78eef1187985aabd92; no repeat whole-app campaign is claimed.

This reaches launcher text for all built-in Mac/iOS apps. Runtime host, shader chain and game profiles are unchanged, so no additional gameplay/shader campaign was repeated. No game/device signing, installation or iOS device validation was performed. Historical limits remain below.

Front-ends: interface: schema 1 adds optional label_key, note_key, section_key and option_keys; original English text and raw values remain compatible. Built-in launchers use bundled Launcher.strings translations and English fallback.

Historical PR description and original commit context (preserved)

Both built-in launchers share a Launcher.strings catalog and optional stable display keys in schema-1 launcher.json. Older/untranslated files retain English fallback; raw values, section identity and the existing preference store remain unchanged.

Current bf67015dddd7eff79f17db78eef1187985aabd92 is exactly one commit directly atop 975bb4c14456d145eb3d969814534eecdd996ce9, with the identical tested tree from 941e7f17e59cc82c960cb70836c7f565f662f72f. The rebase retains main's conditional Mac-only 120 fps choices, unknown-language defaults/warning, GameMode=False and current packing features. The inherited catalog test first failed on the newly offered 120 fps entry; the correction adds its English label, understands main's conditional-label syntax, and checks localization keys match only offered choices.

**Fresh validation:**43 localized model/settings/docs/resource/staging tests plus 18 unchanged native temporary Mac app tests pass, no skips. Native Swift fixtures exercise translation/fallback/raw values and compile production Mac UI/model/rows. Thirty profile/platform/language cases compare output against exactmain: after removing only the four optional localization fields, every JSON value matches, including unknown-language warnings and 120 fps restrictions. git diff --check, docs/symptoms, main/range diff and single-parent/count/tree proofs pass.

Pinned Python lint still fails only main's known B023: settings.py's offered() closes over n (389 baseline, 1 new, 0 stale); that function's AST is identical to main. No unrelated source fix or baseline increase is included. Tests used synthetic temporary fixtures with ordinary ad-hoc fixture signing; no game/device build was signed or installed, and no game extraction/playback or current-game shader/GPU comparison is claimed. Full iOS device/UI and gameplay validation remain unavailable. The renderer, shader chain and lock are unchanged.

Commands: DM_GAME=010015100B514000 python3 -m unittest -v over test_launcher_localization, test_launcher_settings, test_settings, test_docs, the localization resource reuse case, test_xcode_workflow, then test_nsp_mac_app.App; pinned lint_python.py --against 975bb4c14456d145eb3d969814534eecdd996ce9. Current canonical launcher/development/schema docs and stable shared settings contract remain aligned. Run evidence is here; no agent planning artifacts appear in the source diff. The #376 HUD default change uses the same DM_METAL_HUD key/store and preserves these optional JSON fields.

Earlier description and historical validation

Both built-in launchers use a shared Launcher.strings catalog. Optional stable localization keys accompany the existing English labels in launcher.json; untranslated or older settings files retain their English fallback. Section identity and saved values remain raw, stable values in the existing settings store.

Current validation

Candidate 919308e6d39bd74d91913f55758e4248e33d5118 rebases c56d7b67843e613b4e09b0dfc9ace614ea1138ff onto main bd98317eecfe832b40d401219c15207a398e78dd. Both original feature/documentation commits remain, with one compatibility follow-up for newer main settings. The code merged without conflicts; reference placement conflicts preserve both entries and regenerate the symptom index. The Mac bundle retains main's Game Mode and AppleDouble behavior. The shared raw settings table, C preference store and validation rules remain identical to main; this adds no second store or value schema.

The initial 83-case run at 880035628dfdbe8a27b75ad73bedfc8b7f59684e exposed three missing catalog keys: DM_UPSCALER, DM_PICTURE_FIT and DM_SCREEN_ASPECT. Their rows were added on newer main. The follow-up copies 11 labels/notes/options exactly from those current rows, retaining every raw value. It changes only the English .strings file.

  • On final candidate 919308e6d39bd74d91913f55758e4248e33d5118, 31 localization/model/documentation tests plus 7 resource/staging tests passed, zero skips. Commands: DM_GAME=010015100B514000 python3 -m unittest -v dm.ios.tests.test_launcher_localization dm.tools.tests.test_launcher_settings dm.tools.tests.test_docs, then dm.tools.tests.test_nsp_mac_app.PackReuse.test_localization_tables_are_packed_and_invalidate_reuse dm.ios.tests.test_xcode_workflow. The native Swift synthetic bundle verifies actual string-table translation, English fallback, raw options, section identity and saved values. Resource checks cover locale addition/edit/removal invalidating reuse and iOS resource staging.
  • Before that one resource-only follow-up, the 83-case run also executed native synthetic Mac app packing/launching and shared-model checks. That run failed only the catalog coverage method's three missing-key subtests; it is not labeled a passing suite. Its native build sources/recipe are byte-identical to the final candidate, and the final tests above load the changed resource. No broad expensive build is represented as rerun.
  • Fresh final pinned lint_python.py --against bd98317eecfe832b40d401219c15207a398e78dd: 391 baseline findings, zero new/stale. Full main diff, range-diff, docs, generated symptom and git diff --check pass. Canonical launcher/development/schema docs remain aligned. No agent plans or execution journals occur in repository changes; run evidence belongs here.
  • This affects iOS and Mac launcher text/resource packing for all games. Synthetic native fixtures cover the mechanism without a game build. The renderer, shader chain/profile and compiler lock are unchanged. Full iOS app/device testing, visual game/UI checks and gameplay remain unavailable; no current-game shader comparison or timing result is claimed. Existing measurements/CI below are historical to their named revisions.

#376 remains compatible: the HUD uses the same stable DM_METAL_HUD row/store, and its default override preserves optional localization fields. This PR changes display strings and metadata, not environment keys or saved choices.

Earlier description and historical validation

Fixes #775.

The iOS and Mac launchers have no translation resources, and dynamic settings labels bypass string lookup. Add a shared Launcher.strings catalog and route launcher buttons, menus, status text and setting rows through it. A translator can add <locale>.lproj/Launcher.strings without changing Swift or the settings table.

Optional label_key, note_key, section_key and option_keys fields preserve schema 1, English fallbacks, raw values, section identities and saved choices. The launcher follows the app's preferred system language independently of DM_LANG. Both iOS build paths include the resources; the Mac packer copies locale tables and invalidates reuse when they change. Canonical development/frontend documentation describes the resource layout and compatibility contract. The English catalog supplies the translation layer; no additional language is claimed complete.

Main's synchronous Mac window dismissal and the button-owned iOS cloud-save picker are preserved, including success/failure/cancel and bookmark-refresh behavior. Neither upstream change supplies localization.

Current revision. Commit c56d7b67843e613b4e09b0dfc9ace614ea1138ff includes main e70fd69d5c828c906905991872c2eeead435dd4e. Main now checks the TXQ opcode match before indexing it. The fixture matches main byte for byte. Both launcher commits retain their original patches.

Local validation. On macOS with Xcode 27.2, the following command passed all 127 tests, including seven synthetic TXQ cases and Mac app packaging. Pinned Ruff and Pyright matched all 391 baseline findings, with zero new or stale findings.

DMSH_TEST_XLATE="$PWD/dm/gfx/tools/dmsh_xlate_bin/dmsh_xlate" python3 -B -m unittest dm.tools.tests.test_txq_type dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.ios.tests.test_launcher_localization dm.ios.tests.test_launcher_storage dm.tools.tests.test_nsp_progress dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_mac_app

GitHub checks for this commit

Earlier tests. Commit a02e2b8dea468818919dad2b644d44241130e0c6 includes upstream main 1440a736860e45c7722f7bd803a0fc74ff62c69f. The packing reference now includes both the upstream Intel translator guidance and this PR’s launcher finding. The symptom index was regenerated from the combined documentation.

Local validation. On macOS with Xcode 27.2 (27B52), /opt/homebrew/bin/python3 -B -m unittest dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.ios.tests.test_launcher_localization dm.ios.tests.test_launcher_storage dm.tools.tests.test_nsp_progress dm.tools.tests.test_nsp_mac dm.tools.tests.test_nsp_mac_app passed all 120 tests, including synthetic Mac app assembly. The production iOS launcher, settings model, and rows also compiled to an arm64 object using the Objective-C bridge, iPhoneOS 27.2 SDK and iOS 26 deployment target. The first compile used a stale SDK path, and a subsequent attempt reused a module cache under two paths. The successful compile used the installed SDK and a fresh absolute cache path.

GitHub checks for this commit

Earlier validation on 230934096ea7. python3 -m unittest dm.tools.tests.test_docs dm.ios.tests.test_launcher_localization dm.tools.tests.test_launcher_settings dm.tools.tests.test_nsp_progress — 52 tests passed.

Earlier local validation on 94daba1cb5ad. python3 -m unittest dm.tools.tests.test_docs dm.tools.tests.test_settings dm.tools.tests.test_launcher_settings dm.ios.tests.test_launcher_storage dm.ios.tests.test_launcher_localization dm.tools.tests.test_nsp_mac. All 52 tests passed. The focused suite includes the Mac/iOS localization, storage and settings fixtures. Physical-device behavior and translated layout in a running game remain unverified.

This affects the shared settings UI and locale resources of every packaged Mac/iOS game. Tests generate synthetic settings with the Breath of the Wild profile and use synthetic app bundles to cover translation and persistence without game files; no gameplay run was selected because the change does not alter game execution or rendering. Physical iOS picker interaction and bookmark persistence across signing identities remain untested. No gameplay, extraction rebuild or game shader rebuild was performed.

Original commit context (historical, preserved through squash)

These messages preserve the original rationale, attribution, validation limits and interface notes. Any references to earlier source or test results remain historical; the current validation section and tree proof above identify the integrated revision.

Original published PR commits:

Commit 7b97ae628400dbf97e693263870300c7596b6d82
Author: seedds <seedds@gmail.com>

launcher: add shared localization tables and stable settings keys

Commit 880035628dfdbe8a27b75ad73bedfc8b7f59684e
Author: seedds <seedds@gmail.com>

docs: explain launcher resources and keep validation in the PR

Commit 919308e6d39bd74d91913f55758e4248e33d5118
Author: seedds <seedds@gmail.com>

Keep launcher English keys aligned with current picture and upscaler settings

Rebased/corrective commits before this squash:

Commit 9adfabf4153ba9ab4331cd57af3b74982e1b415d
Author: seedds <seedds@gmail.com>

launcher: add shared localization tables and stable settings keys

Commit 265d3ad8df815b343df2fae995fcf8a3750b4c95
Author: seedds <seedds@gmail.com>

docs: explain launcher resources and keep validation in the PR

Commit 55fa3304e74744278a9c45299e85369f78af5e34
Author: seedds <seedds@gmail.com>

Keep launcher English keys aligned with current picture and upscaler settings

Commit 941e7f17e59cc82c960cb70836c7f565f662f72f
Author: seedds <seedds@gmail.com>

Keep localized frame-rate choices aligned with conditional settings

Carry the current 120 fps label without exposing the option outside supported Mac games. Read conditional labels using the same grammar as settings.py and verify localized keys follow the offered raw values.

@thehobbit85
thehobbit85 force-pushed the codex/launcher-localization branch 15 times, most recently from 1b5651d to 2309340 Compare November 2, 2026 17:43
@github-actions github-actions Bot added packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers ios The iPhone and iPad app (dm/ios) mac The Mac front end and app (dm/mac, front_mac.m) tools Tools and scripts (dm/tools, scripts) docs Documentation labels Nov 3, 2026
@thehobbit85
thehobbit85 force-pushed the codex/launcher-localization branch 2 times, most recently from 0aa2d30 to c56d7b6 Compare November 3, 2026 10:49
@thehobbit85
thehobbit85 force-pushed the codex/launcher-localization branch 6 times, most recently from eb98114 to 533e2cc Compare November 10, 2026 02:44
Bundle one string catalog for the Mac and iOS launchers. Add optional schema-1 display keys while keeping English fallbacks, raw option values and the existing preference store. Retain current conditional 120 fps availability and unknown-language defaults/warnings; keep the catalog aligned with offered labels.
@thehobbit85
thehobbit85 force-pushed the codex/launcher-localization branch from 533e2cc to 1593de8 Compare November 13, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation ios The iPhone and iPad app (dm/ios) mac The Mac front end and app (dm/mac, front_mac.m) packing Building an IPA or a Mac app: the NSP script, extraction, the shader split, the packers tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS and Mac launchers: no localization layer — add a string table so settings and buttons can be translated (zh-Hans offered)

2 participants