Skip to content

Startup: the data pack errors and the START hint in French and Italian - #209

Merged
ZallaxDev merged 2 commits into
ZallaxDev:integrationfrom
andyst-dev:fix/fr-it-startup-localization-v2
Nov 20, 2026
Merged

ZallaxDev merged 2 commits into
ZallaxDev:integrationfrom
andyst-dev:fix/fr-it-startup-localization-v2

Conversation

@andyst-dev

@andyst-dev andyst-dev commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The port's own messages follow the game's language: CTR_TEXT picks one of seven texts at compile time from GAME_LANGUAGE. The ten startup errors in 3ds_data.c were never filled in for French and Italian, so a French or Italian build that cannot open its data pack explains the failure in English, and CtrPlatform_ShowDataError printed a plain English Press START to exit.

Change

  • The ten messages in 3ds_data.c carry French and Italian texts: pack not found, not a pack, ABI/schema mismatch (with the ABI values), pack from another ROM, damaged pack, damaged index, unreadable pack and no embedded data.
  • The five detail strings use a new CTR_TEXT_FR_IT_PT_DE helper, which is the existing CTR_TEXT_PT_DE widened with French and Italian; the titles and the two other details use the full seven-argument CTR_TEXT.
  • The START hint goes through CTR_TEXT too.

ASCII only, like the German startup texts already in the file: this screen is printed with printf, the console font has no accents there, so the texts say e' / integrita' and controle the way German says beschaedigt. The tool name stays builder, as in the Portuguese and German texts. The ROM guidance lines (BPEF, BPEI) were already per-language and are untouched.

Testing

New builder/tests/test_startup_locale.py: it compiles the real 3ds_data.c for each language (-std=c99 -Wall -Wextra -Werror) with only the SDK and platform edges stubbed, builds synthetic packs for twelve startup faults, runs CtrData_Init in a fresh process per case and reads the error getters. The pack is opened through the FS service, so the harness gives FSUSER_OpenFileDirectly, FSFILE_Read and FSFILE_Close real files behind them (the process runs with the SD root as its cwd); the code under test keeps its FS path, no stdio shortcut is added for the test.

  • English, Spanish, Portuguese, German and Japanese output is compared byte for byte against a baseline captured from the same harness before the change.
  • French and Italian are asserted to be localized, different from English and from each other, to keep the ABI placeholders in order, to stay under the buffer sizes and to wrap at 49 columns.
  • The production START printf expression is extracted from 3ds_platform.c and compiled per language.

builder/tests/test_german_manifest.py now covers the new helper as well, so the German texts keep being checked for empty strings and for characters the touch-screen font cannot draw.

Full suite: python -m unittest discover -s builder/tests gives 269 tests, OK (2 skipped). tools/release_audit.py --repo . --strict is clean.

Limitations

No 3DSX build in this environment (no devkitPro/libctru), so 3ds_platform.c is only compiled through its START printf expression in the test; the rest of that file is unchanged. Not tried on hardware: the strings are the ones a broken pack shows, which needs a deliberately wrong pack on the SD card.

Rebase

Rebased onto integration at 1f6ccba (sync of 2026-11-12). Two things came out of it: the base now opens the pack through FSUSER_OpenFileDirectly instead of stdio, which the harness follows (the stub described under Testing), and the Japanese-manifest failure that made the old base red in audit-and-python is fixed there, so that job runs on a green base.

CI

audit-and-python is green on this head: release_audit.py --strict clean, and the 269 builder tests pass, test_startup_locale.py included.

The other two jobs are red on the base branch itself, with the same errors and not one line more. integration at 1f6ccba (run 43137932400) fails:

  • host-tests, in the day/night compositor fixture: CTR_DAYNIGHT_MOON_RGB and CTR_DAYNIGHT_MOON_AMOUNT undeclared, plus a missing sun initializer in CtrDayNightLight.
  • build-3ds, after the 3DSX is built, while linking build/voxel_world_hash_test.exe: undefined reference to 'VoxelRelief_FaceTile' and 'VoxelMesh_BeltFill'.

On this head, 3ds_data.c and 3ds_platform.c compile under arm-none-eabi-gcc -Wall -Wextra -Werror and 3dsxtool produces emerald3ds.3dsx; the same two jobs then stop at the same two places.

The data pack errors and the START prompt were the only English strings left on
the way in, so a French or Italian install read them in English.

A new helper, CTR_TEXT_FR_IT_PT_DE(english, french, italian, portuguese,
german), fills the seven-language CTR_TEXT slots for the five details and the
five titles that were still passing their English text in the French and
Italian slots; the START hint goes through CTR_TEXT itself. English, Spanish,
Portuguese, German and Japanese output does not move.

builder/tests/test_startup_locale.py compiles the real 3ds_data.c per language
with -Wall -Wextra -Werror against synthetic packs, and compares the five
untouched languages byte for byte with their output captured before the change.
The FS service surface (FSUSER_OpenFileDirectly, FSFILE_Read, FSFILE_Close) is
stubbed over real files, since the port now opens the pack through it rather
than stdio.
@andyst-dev
andyst-dev force-pushed the fix/fr-it-startup-localization-v2 branch from b111266 to 22f9917 Compare November 12, 2026 06:59
@ZallaxDev

Copy link
Copy Markdown
Owner

Merged, thanks a lot @andyst-dev! The French/Italian startup texts and the locale harness are excellent work. The red host-tests/build-3ds jobs came from the old base (1f6ccba), not from your change, so we took it in as is.

@ZallaxDev
ZallaxDev merged commit f7b0699 into ZallaxDev:integration Nov 20, 2026
5 checks passed
ZallaxDev added a commit that referenced this pull request Nov 21, 2026
- public_sync: an integration commit is held when each file has what it adds; changelog credits beside the pull requests' own entries
- Changelog: public pull requests #190 #209 #262-#300, by their authors
- public_sync: dev takes integration's ported pull requests as their own commits; a conflict or unported pull requests are problems, not a line
- Public export: the benchmark, profiling and macOS builder test tools (#293, #295, #300)
- Public export: upstream.lock's Python 3.15.2 and Pillow 13.0.0 (#288, #289)
- Harden Emerald 3DS runtime and builder workflows (#300)
- Replace deprecated Pillow pixel reads in voxel tools (#294)
- Add opt-in macOS standalone builder support (#295)
- Locales: move the Japanese span in main_menu.c past the main menu card (#298)
- Fly map: choose the destination with the +Control Pad (#267)
- Bottom screen: a tap on the map that slides a little still goes on with a message (#281)
- Summary: give the trainer memo room for a third line (#269)
- Summary: show Pokémon status icons (#270)
- Main menu: the saved game's trainer card on the top screen (#284)
- Restore Japanese naming marks and full touchscreen rows (#275)
- Speed up voxel generation to shorten development builds (#293)
- Release: ship bottom/menu_top.bin with the engine files (#280)
- Bag: planting a berry opens it in the bottom screen's window (#283)
- Frontier Pass map: the picture half as big again, filling its plate (#282)
- CI: support Ubuntu 26.04 with non-PIE sanitizer fixtures (#290)
- Startup: the data pack errors and the START hint in French and Italian (#209)
- Installation: step-by-step builder for Linux and macOS (#190)
- Bottom screen: reuse unchanged wild-list snapshots (#273)
- Upgrade release builds to Pillow 13.0.0 (#289)
- Naming screen: a tab turns straight to its page (#287)
- ci: upgrade GitHub Actions to latest tested releases (#292)
- Generate map event IDs for standalone voxel host tests (#277)
- Tests: update the voxel draft chunk fixture (#262)
- Harden native string formatting and numeric input parsing (#279)
- Build releases with Python 3.15.2 (#288)
- Visible wild: roll the IVs right after the personality (PID/IV legality) (#266)
- CI: use the release toolchain for 3DS builds (#286)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants