Repository navigation
Adding or dropping a strings table is a binary change on Apple platforms - #7
Merged
Merged
Conversation
janicduplessis
force-pushed
the
@janic/set-locale
branch
from
November 15, 2026 03:46
5f4fdca to
253b030
Compare
ccheever
added a commit
to expo/exact
that referenced
this pull request
Nov 15, 2026
The Apple bundle lists the strings tables as CFBundleLocalizations, and both
the system and SessionFacts.viewerLocale pick the app's table from that list.
The list was not a compatibility input, so an update that added a table could
reach a binary that never selects it, and one that dropped a table could reach
a binary that still offers it.
On iOS and macOS an app with more than one table now records
`localizations` ({base, locales}) in its compatibility inputs, and the plan
requires it as it requires grantPurposes. Adding or dropping a table is a
binary release; editing a translation still ships as an update. An app with
one table records nothing.
Apple apps that already ship more than one table move to a new cohort once;
no app in this repository does. Android and the other hosts declare no
language list in a native manifest: Android's localized notification channel
names already enter the id through androidChannels.
From appandflow#7 by Janic Duplessis.
Fixes #664
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Apple platforms the strings tables become the bundle's localizations:
localizationKeyswritesCFBundleDevelopmentRegionandCFBundleLocalizationsfromreach.locales. That list is part of the signedInfo.plist, but it was not in the compatibility id or in the plan's update requirements. So an update that adds or drops a table could reach a binary whose declared languages are stale: iOS would keep negotiating the app's language, and drawing its own controls, from the old list.Solution
On iOS and macOS, an app with more than one table records
localizations({base, locales}) as a compatibility input, and the plan requires it the waygrantPurposesis required:It runs after
reach::deriveincompat.rs, readingreach.locales, so the tables are not read twice. contract-for-agents says which edits need a new binary.Not covered: changing the base of a one-table app (
strings.baseinapp.json) movesCFBundleDevelopmentRegionwithout moving the id. Covering it would move every Apple app with a strings table into a new cohort, and the system's chrome falls back the same way either way.Test plan
cargo test -p exact-bake: 127 pass. New tests:the_plists_languages_are_in_the_id: the id moves when a language is added, and not for a translation edit, a single table, or the web. The input is the same on macOS.a_plan_requires_the_localizations_its_inputs_carry.bun scripts/caps.mjs(Bun 1.4.2): all budgets within cap.