-
Notifications
You must be signed in to change notification settings - Fork 134
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
Initial work on i18n mechanics #109
Conversation
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 particular reason you went with localized-strings?
It hasn't been updated in 2 years and isn't one of the major libraries out there (AFAIK).
We use i18next and react-i18next in our wallet, maybe something to look into? Also fine with using this library, just curious for the reasoning
@TimoGlastra No reason other that it was a fairly simple implementation. I'll look into |
would this take the language their phone is set to automatically? |
@NeilSMyers That's the idea. It will find the best available matching translation based on what the phone is set for. |
@jleach what do you think of having a way to manually change the language? Idk if this use case is too small to worry about but if someone has their phone on English but wants the app in French for clarity's sake |
@NeilSMyers I think its a great feature. Well placed in the "settings" once we get to implementing more functionality there. I've made a note about this and will check with the team if we're going to keep it in our board or use Issues (probably issues). @TimoGlastra Switched to use |
Awesome! I'll try to share some typescript goodies later today that can make the 't()' method fully typed. This way it will error if you put in a string that doesn't have a translation |
For adding typescript integration with react-i18next: Add a type
Other language:
Then create a
The |
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
@TimoGlastra Updated to include type support. |
Signed-off-by: Jason C. Leach <jason.leach@fullboar.ca>
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.
Nice!
…c-test-integration remove unnessesary bs4 import in gapi auth code interface
Summary of Changes
Implement a basic i18n strategy using
react-i18next
as per the related issue.Related Issues
Fixes #110
Pull Request Checklist
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.
Signed-off-by
line (we use the DCO GitHub app to enforce this).npm run style-format
If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
PR template adapted from the Python attrs project.