Skip to content

Add the mock location permission keys, retire the cleanup error - #19

Merged
Ryanmello07 merged 1 commit into
mainfrom
feat/mock-location-permission-keys
Sep 6, 2026
Merged

Add the mock location permission keys, retire the cleanup error#19
Ryanmello07 merged 1 commit into
mainfrom
feat/mock-location-permission-keys

Conversation

@Ryanmello07

Copy link
Copy Markdown
Contributor

Why

urnetwork/android#479 shipped seven mock_location_* strings straight into res/values/strings.xml without adding them here. Those files are generated from this store, and build.sh regenerates before every pipeline build — so the release build drops all seven and the app fails to compile on nine R.string.mock_location_* references.

Reproduced on android main before these keys existed:

$ npm run gen:android
localizations: wrote 19 of 19 files (android)
$ grep -c 'name="mock_location' .../values/strings.xml
17          # was 24

$ ./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

CI never sees this. The android workflow runs gradle directly and never runs the generator — build-and-test.yml:31 already documents the gap: "it just will not catch key drift, which the release pipeline regenerates and would."

What this adds

Seven android-only keys. mock_location_step_location_permission is deliberately phrased as optional: the AOSP LocationManager test providers need no runtime grant, and only the Play services mirror does, so the copy says what granting buys rather than implying the feature is broken without it.

key purpose
mock_location_status_stuck settings row status when the simulated location is stuck on
mock_location_error_stuck_title recovery card title
mock_location_error_stuck_detail the recovery instructions — the only in-app guidance for restoring the real GPS
mock_location_step_location_permission the optional approximate-location step
mock_location_grant_permission button on that step
mock_location_open_app_settings what that button becomes once Android stops showing the dialog
mock_location_status_retrying settings row status while the engine retries

mock_location_error_cleanup_required is retired: the ORPHANED copy moved to the _stuck_ strings and android has no references left. platforms is emptied and android recorded in deprecated, matching the other 21 retired keys.

Translations

Produced per locale against the 19 mock_location_* keys already here, so the feature reads consistently — "simulated location", "developer options" and "provider" keep the wording each locale already uses. "Developer options" and "approximate location" follow the names Android itself ships in that language rather than a literal translation, since a user who cannot find the setting cannot unfreeze their GPS.

Each locale was then reviewed independently and 16 came back with corrections. The sharpest was ar, where the draft used ثبّت for "locked" — this store uses that verb nine times to mean install and once to mean pin, so the sentence read as "Android installed the fake GPS" in the one string that explains the freeze.

Verification

  • node --test gen/*.test.mjs — 5 pass, 0 fail
  • npm run gen:android then, in the android tree: 345 unit tests, 0 failures; all four flavor release variants compile; assembleGithubDebug packages

Merge order

Merge this first. The android side is the regenerated output and is a separate PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_019VYp99vhW9soGoTmNGVYJk

android/#479 shipped seven mock_location_* strings straight into
res/values/strings.xml without adding them here. Those files are generated
from this store, and build.sh regenerates before every pipeline build, so the
release build drops all seven and the app stops compiling on nine
R.string.mock_location_* references. CI cannot catch it -- the android
workflow says as much at build-and-test.yml:31, since the generated files are
committed and it never runs the generator.

Adds, all android-only:
  mock_location_status_stuck              settings row status when the
                                          simulated location is stuck on
  mock_location_error_stuck_title         recovery card title
  mock_location_error_stuck_detail        the recovery instructions, and the
                                          only in-app guidance for restoring
                                          the real GPS
  mock_location_step_location_permission  the optional approximate-location
                                          step, phrased as optional because
                                          the AOSP test providers need no
                                          runtime grant -- only the Play
                                          services mirror does
  mock_location_grant_permission          button on that step
  mock_location_open_app_settings         what that button becomes once
                                          Android stops showing the dialog
  mock_location_status_retrying           settings row status while the
                                          engine retries

Retires mock_location_error_cleanup_required: the ORPHANED copy moved to the
_stuck_ strings and android has no references left, so platforms is empty and
android is recorded in deprecated, like the other 21 retired keys.

Translations were produced per locale against the 19 mock_location_* keys
already in this store, so the feature reads consistently: "simulated
location", "developer options" and "provider" keep the wording each locale
already uses, and Developer options and approximate location follow the names
Android itself ships in that language rather than a literal translation -- a
user who cannot find the setting cannot unfreeze their GPS. Each locale was
then reviewed independently; 16 came back with corrections, the sharpest being
ar, where the draft used ثبّت for "locked". This store uses that verb nine
times to mean install, and once to mean pin, so the sentence read as "Android
installed the fake GPS" in the one string that explains the freeze.

node --test gen/*.test.mjs passes. npm run gen:android then leaves the android
tree building: 345 unit tests, 0 failures; all four flavor release variants
compile; assembleGithubDebug packages.

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