Repository navigation
fix(i18n): localize hardcoded widget text and harden string checks - #103
Merged
Merged
Conversation
Calendar, tasks and weather labels (Today, Tomorrow, Overdue, rain/snow/storm warnings, permission prompts), temperature unit names, screen time units and the error label were hardcoded English in Kotlin, so no locale translated them. Move them to string resources with translations for all 10 locales. check_strings.py now also flags hardcoded English literals in Kotlin, unused base strings and locale values left identical to English. Remove 9 unused strings it found.
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.
Problem
In v3.0 the Russian widget showed English "Today"/"Tomorrow". These and other widget labels were hardcoded in Kotlin, so
check_strings.py(which only compares XML files) could not see them.Changes
scripts/check_strings.pynow also flags:// i18n-ignoreor-start/-endblocks)SAME_AS_BASE_KEYS)TasksFetcherTest)Verification
python3 scripts/check_strings.pyOK; run against v3.0 sources it flags every bug fixed here./gradlew --offline testDebugUnitTestpass,lintDebugno errorsFollow-up
Settings search matches only English keywords (
SettingsSearch.kt); marked as intentional for now.