-
Notifications
You must be signed in to change notification settings - Fork 484
feat: utilise string localisations #1248
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
Conversation
Though it's a big of an abstraction-break I think we should given the localization bundle override is in the core package and strings themselves aren't stateful and have no dependencies. Overall I expect the strings required for 3P auth providers to be minimal since those dependencies (GoogleSignIn etc) also do their own localization.
Yes, if you can add placeholders that'd be great. I'll fill them in with internal l10n resources async and they shouldn't be a blocker for this project. In the meantime Xcode will display whatever you use as a placeholder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we're not using SwiftUI's built-in string localisation?
See:
@peterfriese - The reason why I kept computed properties instead of using string literals (I think this is what you mean by built-in string localization) is for two reasons:
Happy to update if you prefer an alternative. |
This should be covered by the
In which situations would this be used? |
@peterfriese - There is a I'm not sure how we control the bundle if we use string literals. Also - we have to specify the Text("VerifyItsYou", bundle: Bundle.module) If we do this: Text("VerifyItsYou") It'll render |
You would use the actual English phrase in the UI, so you wouldn't run into this issue. See https://developer.apple.com/documentation/swiftui/preparing-views-for-localization and https://developer.apple.com/documentation/Xcode/localizing-and-varying-text-with-a-string-catalog |
@peterfriese - Yes, you would get the English translation but you wouldn't get any other translation if we didn't specify |
PR contains string localization implementation.
A couple of things to note;
Questions
Bundle.module
which contains the strings.