android: externalize hardcoded UI strings#819
Open
foXaCe wants to merge 2 commits into
Open
Conversation
59a0a21 to
1af83f8
Compare
Add android/src/main/res/values-fr/strings.xml with the full French localization of the app UI (307 translatable strings). - Vouvoiement register, terminology consistent with Tailscale product terms kept in English (tailnet, Taildrop, exit node -> nœud de sortie, admin console -> console d'administration, etc.). - Placeholders (%s, %d, %1$s, %.1f), XML entities and escaped apostrophes preserved; translatable="false" strings intentionally omitted. Updates tailscale/tailscale#7856 Signed-off-by: Stéphane <foxace66@gmail.com>
Replace user-facing strings that were hardcoded in Kotlin/Java with string resources so they can be localized. - Extract 10 strings to res/values/strings.xml (mostly accessibility contentDescriptions across MainView, TaildropView, PeerDetails, HealthView, LoginQRView, SharedViews, plus the split-tunnel switch dialog title). - Reuse existing resources where possible: R.string.search and R.string.clear_search for search icons, R.string.tile_name for the Quick Settings tile label. - Add matching French translations in res/values-fr/strings.xml. No behavior change: the English strings are identical to before. Updates tailscale/tailscale#7856 Signed-off-by: Stéphane <foxace66@gmail.com>
1af83f8 to
68f5bd6
Compare
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.
What
Externalizes user-facing strings that were hardcoded in Kotlin/Java into
res/values/strings.xml, so they can be localized and pass theHardcodedTextlint check.Changes
contentDescriptions):MainView,TaildropView,PeerDetails,HealthView,LoginQRView,SharedViews, and the split-tunnel switch confirmation dialog title.R.string.search/R.string.clear_searchR.string.tile_nameres/values-fr/strings.xml.No behavior change — the English strings are byte-for-byte identical to before.
Notes
commit; once android: add French (fr) translation #818 is merged/closed it will show only the extraction changes.
./gradlew ktfmtCheckwas not run in this environment (no network for theGradle/ktfmt plugin download); the one wrapped line was formatted to match
the surrounding ktfmt (Meta) style by hand.
Verification
Text/contentDescription,setLabel/setTitle).xmllintvalid; EN↔FR key parity 317/317.com.tailscale.ipn.RinSharedViews.kt).