-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #118: Fill in missing string translations with base translation #470
Conversation
Will anyone please review this PR? The existing code does not fallback to a base locale. |
@Alex009 Is there any plan to add this? We have this issue that on iOS the app does not return a default localization and we have string keys everywhere. @colintheshots-meetup Will this one fix the iOS issue? |
hi. this pr fix case when you have in base localization more keys than in other languages. with this fix when you try read some key, that not exist in language X but exist in base localization - you got value from base. at now you got just key, as not found. i think i include this pr in next release (with kotlin 1.9 support) |
@Alex009 Is there any pending work on this PR that can push it to get included in the next release? I can work on it if needed |
# Conflicts: # resources/src/appleMain/kotlin/dev/icerock/moko/resources/desc/PluralFormattedStringDesc.kt
@ExNDY need to add new tests with cases when string/plural have base localization, but not have some language. in this case on language that not localized we should receive text from base localization |
@Alex009 @ExNDY I've added test cases for this PR at SubhrajyotiSen@5c453a1 Can you please review these? If they work, feel free to cherry-pick. Otherwise I can open a new PR |
Hi, i'm check this changes on samples and... it doesn't work if you has string in base. I'm find solution of this problem, and my opinion: change your fallback on Base, and after add tests for check. |
@ExNDY Does the test at SubhrajyotiSen@5c453a1#diff-bcc9dabae360e0fe619920a8ccedbab18f97381771aa23cf20ce544f1abfb1e6R32 not cover the case you mentioned? The string is present in base but not in another language. Or am I missing a case? |
@SubhrajyotiSen sorry, i'm not check this on current time, later today/tomorow, i think your brach can help me |
…le with case in resource-gallery
@SubhrajyotiSen thanks for tests. @Alex009 please check this PR, i think we can include him in release |
If no translation is found, we should fallback to the base translation in the default locale for iOS and MacOS.