Skip to content

Regenerate the string resources from the localizations store - #480

Merged
Ryanmello07 merged 1 commit into
urnetwork:mainfrom
Ryanmello07:fix/localizations-store-sync
Sep 6, 2026
Merged

Regenerate the string resources from the localizations store#480
Ryanmello07 merged 1 commit into
urnetwork:mainfrom
Ryanmello07:fix/localizations-store-sync

Conversation

@Ryanmello07

Copy link
Copy Markdown
Contributor

Follow-up to #479. Depends on urnetwork/localizations#19 — merge that first.

The problem #479 left in main

#479 added seven mock_location_* strings directly to res/values/strings.xml. Those files are generated (<!-- Generated by @urnetwork/localizations (gen/generate.mjs). DO NOT EDIT. -->), and build.sh regenerates from ../localizations before every pipeline build. A string that exists only in strings.xml and not in the store disappears there — build.sh's own header says exactly this.

The release pipeline is currently broken on main. Reproduced locally at efb2797f:

$ npm run gen:android           # what build.sh runs
localizations: wrote 19 of 19 files (android)
$ grep -c 'name="mock_location' app/app/src/main/res/values/strings.xml
17                              # was 24 — seven keys dropped

$ ./gradlew :app:compileGithubReleaseKotlin
e: MockLocationGuideScreen.kt:171 Unresolved reference 'mock_location_error_stuck_title'.
e: MockLocationGuideScreen.kt:178 Unresolved reference 'mock_location_error_stuck_detail'.
e: MockLocationGuideScreen.kt:234 Unresolved reference 'mock_location_step_location_permission'.
e: MockLocationGuideScreen.kt:237 Unresolved reference 'mock_location_open_app_settings'.
e: MockLocationGuideScreen.kt:239 Unresolved reference 'mock_location_grant_permission'.
e: MockLocationSection.kt:149   Unresolved reference 'mock_location_status_stuck'.
e: MockLocationSection.kt:173   Unresolved reference 'mock_location_error_stuck_detail'.
e: SettingsScreen.kt:1028       Unresolved reference 'mock_location_status_stuck'.
e: SettingsScreen.kt:1030       Unresolved reference 'mock_location_status_retrying'.
BUILD FAILED

With the committed strings.xml, the same tree builds clean — so regeneration is the only trigger, which is why both checks on #479 passed. build-and-test.yml:31 already documents the gap: the generated files are committed, "so CI does not need the sibling store — it just will not catch key drift, which the release pipeline regenerates and would."

This PR

Generated output only — npm run gen:android wrote all 19 files, no hand edits.

  • The seven keys now arrive translated in all 18 locales instead of English-only.
  • mock_location_error_cleanup_required drops out: the ORPHANED copy moved to the _stuck_ strings and it has no kotlin references left, so it is retired in the store.

Verification

Against a locally built toolchain (JDK 21, SDK 36, NDK 29.0.14206865, gradle 9.5.1, locally built URnetworkSdk.aar), after regeneration:

check result
:app:testGithubDebugUnitTest 345 tests, 0 failures
compile{Github,Play,Solana_dapp,Ethos_dapp}ReleaseKotlin pass
:app:assembleGithubDebug pass
merged manifests, per flavor unchanged — github still has no ACCESS_COARSE_LOCATION, the three GMS flavors still do, no ACCESS_FINE_LOCATION anywhere

Worth considering separately

CI could catch this class of bug by running the generator and failing on drift. It needs the sibling store checked out, which is why it was skipped — but a --check against a shallow clone of urnetwork/localizations would have caught #479 before merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_019VYp99vhW9soGoTmNGVYJk

Generated output of urnetwork/localizations#<store PR>; no hand edits.
`npm run gen:android` wrote all 19 res/values*/strings.xml.

urnetwork#479 added seven mock_location_* strings directly to res/values/strings.xml.
These files are generated, and build.sh regenerates from ../localizations
before every pipeline build, so the release build dropped all seven and
failed on nine unresolved R.string.mock_location_* references across
MockLocationGuideScreen.kt, MockLocationSection.kt and SettingsScreen.kt.
CI stayed green throughout: it runs gradle directly and never runs the
generator, which build-and-test.yml:31 already documents as a known gap.

Reproduced on main before the store keys landed -- `npm run gen:android`
took the mock_location_* set from 24 keys to 17 and
:app:compileGithubReleaseKotlin failed. With the keys in the store the same
regeneration is clean.

The seven keys now arrive translated in all 18 locales rather than English
only, and mock_location_error_cleanup_required drops out: the ORPHANED copy
moved to the _stuck_ strings and it has no kotlin references left, so it is
retired in the store.

Verified after regeneration: 345 unit tests, 0 failures; github, play,
solana_dapp and ethos_dapp release variants all compile; assembleGithubDebug
packages; merged manifests unchanged (github still has no
ACCESS_COARSE_LOCATION, the three GMS flavors still do, no ACCESS_FINE_LOCATION
anywhere).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019VYp99vhW9soGoTmNGVYJk
@Ryanmello07
Ryanmello07 merged commit 2aa69b5 into urnetwork:main Sep 6, 2026
2 checks passed
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.

1 participant