Repository navigation
fix(ios): recognize the system prompts' Chinese wording on a physical device - #4859
Conversation
|
Thanks for taking on the device wording gap. At 599cd13, three rows in the device table do not match what iOS shows, so the fix does not yet work for location accept and ATT dismiss.
This changes alert accept/dismiss on physical iOS, and the PR body says the device evidence is deferred. Please run on a physical iPhone with Simplified Chinese as the preferred language, through the CLI, before merge: (1) notification prompt: Could a smaller fix work? The premise that a device runner cannot read the OS string files has no evidence yet. The reader resolves Not blocking, and these can be taken or left: the new tests build their fixtures from the table's own strings, so they pass with any wording and could use labels read from the OS zh_CN vocabulary instead; and the The code needs the changes above before it can merge. The failing body-rules check (it reported 464 words outside code blocks, with a limit below 250) is likely unrelated: it grades only the PR title and body, and the code diff does not overlap its route. The current body counts about 244 words by the script's rule, so the check should pass on the edited body, and if it stays red it can be re-run or the body trimmed. There are no conflicts. Before merge, the wording rows must match Apple's zh_CN strings behind the simulator-lane test, and the live zh-Hans physical-device run must be posted. Not verified here: Apple's wording was checked against the local iOS 27.1 simulator runtime's zh_CN string tables, not a physical device, and older iOS versions were not checked. Not verified here: whether a physical-device runner can read the /System/Library string bundles, whether the macOS runner build reaches |
|
This head (599cd13) now conflicts with main. Please rebase onto main and push; the rebased head gets a delta review. |
… device On a physical iOS device, `alert accept`/`dismiss` refused a Chinese permission prompt with ALERT_BUTTON_NOT_FOUND, because the label vocabulary is only the OS prompt strings of a simulated OS (callstack#4006): a device's runtime keeps its framework string files from the runner process, so the non-simulator build compiled `system` as the English vocabulary. The device build now carries a built-in table of the system prompts' Simplified Chinese wording instead: the notification, App Tracking Transparency, and location prompts' buttons, the general-purpose 好/取消 pair, and the launch confirmation's 打开. Each entry pairs an English button label with its localized wording, so the localized label ranks exactly like the English original — 仅在使用期间允许 outranks 仅本次允许. The callstack#3627 guards hold unchanged: a source must be a whole button label, and a translation both actions claim stays unknown. English resolution is untouched, and the simulator keeps reading the OS strings for every preferred language. The table grows only with wording a device really shows, so it starts at Simplified Chinese and other languages stay unknown until device evidence names them. Co-Authored-By: Claude Code <noreply@anthropic.com>
The device-coverage sentence puts the word "system" in the alert description, so the "dialog system" search hint no longer adds a word the text lacks; `command-tools-loading-meta`'s hint contract fails on the repeat. "system" stays searchable through the description itself, so the hint keeps "dialog" only. Co-Authored-By: Claude Code <noreply@anthropic.com>
599cd13 to
511e50c
Compare
|
Rebased onto |
|
Thanks for the update. At 511e50c, the checks show 16 passing and none failing, and no conflicts are known. The code still has the two problems from the earlier review (#4859 (comment)), so it is not ready to merge. Three This change alters Not verified here: the Apple wording was checked against the iOS 27.0 simulator runtime only (CoreLocation locationd.strings and TCC), not a physical device or older iOS versions. Not verified here: whether a physical-device runner can read the /System/Library string bundles. Not verified here: the Swift unit tests and check:xctest-selection were not run locally. Before merge, correct the three rows behind that simulator-lane test and post the zh-Hans physical-device run. |
The three hand-typed rows drifted from Apple's zh_CN wording (使用App时允许, 允许一次, 要求App不追踪): on a zh-Hans device the location accept and the ATT dismiss matched no row and answered ALERT_BUTTON_NOT_FOUND. The rows now equal the OS strings, and a simulator-lane test pins every deviceTranslations row to a pair in fromSystemStrings(["zh-Hans"]) so the table cannot drift from the OS wording again; the vocabulary keeps the handed-in rows for it.
|
Thanks for the follow-up. Reviewed commit 3ad0a51 addresses the earlier findings (#4859 (comment)) in the simulator path, but one problem remains. The non-simulator build sets CI is green: 15 checks, 0 not passing at 3ad0a51. There are no conflicts. Not verified here: the new simulator-lane test was not run, and it is not confirmed that the PR iOS lane executed it at this head rather than only the nightly lane. Not verified here: older iOS versions and physical devices; Apple's zh_CN wording came from the earlier simulator-runtime check. The live zh-Hans physical-iPhone run above is required before merge. |
…S versions show A zh-Hans iPhone 12 Pro Max on iOS 18.1 words the ATT decline 要求App不跟踪; the iOS 26.5-27.x zh_CN string tables the earlier simulator check pinned ship 要求App不追踪. The table carried only the newer wording, so alert dismiss on the device answered ALERT_BUTTON_NOT_FOUND having tapped nothing. The table now carries both rows, the zh-Hans pairs test keeps asserting every row equals a pair this lane's OS ships except the cross-version wording it pins by presence, and the device evidence doc records the three prompts' verbatim alert get labels with the accept/dismiss outcomes and authorization read-backs. A probe read on the device also answers the review's question: the OS string tables are present on device but their localizations are not readable, so widening the OS-string read to os(iOS) cannot replace the table.
|
Thanks for the follow-up. The one added row and its test at 79ef17b close the live-evidence gap from the earlier review (#4859 (comment)), and no new problems were found. All 15 checks pass at this commit and no conflicts are known, so the PR can merge. Not verified here: the notification and location runs were done at 3ad0a51 and the ATT fix run on the author's working tree, but the only production change since is the added row, so those results carry over. Not verified here: the authorization read-backs come from the probe app's status label as reported in the evidence doc, and only the iOS 18.1 device and iOS 26.5-27.x simulator wordings are attested, so other iOS versions' zh_CN wording was not checked. Not verified here: the Swift unit tests were not run locally; CI is green. |
Summary
alert accept/dismisson a physical iOS device refused a Chinese permission prompt withALERT_BUTTON_NOT_FOUND: the localized vocabulary (#4006) is the simulated OS's prompt strings; a device keeps those strings from the runner process, so the non-simulator build compiledsystemas English-only. The device build now carries a built-in table of the system prompts' Simplified Chinese wording; each entry pairs an English label with its localized wording, so a localized prompt ranks like its English original. The simulator still reads the OS strings for every preferred language; English is unchanged. The table grows only with device-confirmed wording.Before / after
Guards and tests
#3627 holds unchanged: a row's source must be a whole preference label, a localized label resolves only for its source's action, and an entry both actions claim stays neutral, separate from #4526. Four table-driven tests in
UnitTests/RunnerTests+AlertLabelVocabularyTests.swiftrun on every lane; a device-gated one pinssystem == deviceon the macOS host lane.check:xctest-selectionreports 0 methods reachable by no lane.Validation
tsc -b tsconfig.typecheck.json, command-surface suite 292, runner-tree guards 63,check:command-docsgreen.check:affectedis green through format/lint/typecheck; its layering ratchet reads the private fork asorigin/main, so the same layering rules were evaluated againstold-origin/main: 0 violations. Swift behavior was verified by compiling the two sources and running 34 table assertions. Device evidence deferred per repo convention. CI is green here except this body rule; the first Coverage round tripped on the search hint repeating a description word.🤖 Generated with Claude Code