-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Localize the interface #449
Comments
I've worked towards that in my own fork. The localization proposal is here. My fork also acts as a proof of concept where the navbar is translated to French, using the process described in the proposal. In order for the translations to show, you need to select French in Account Settings. I welcome any feedback, to see if the way it is described is acceptable, and if I should push this further, towards adding language settings in the user interface. |
@pazaan @cbwebdevelopment |
This looks good to me. Did you investigate something like react-i18next, considering that it also supports date localisation and plurals? It looks like it might be easy to do this with |
@pazaan The current proposal was designed with minimal changes in order to be more readily accepted by the tidepool team, using react-i18next would introduce more changes:
Dates can be handled easily in my opinion, as blip already uses moment for date display. The only thing to do would be to set the language of moment at the same time as setting the language of the application. Regarding plurals, I don't see it becoming an issue. I didn't see any pluralization dependent on a variable number in the code. If there is a specific example in the code, I can look at it. Depending on how it's done, it can be gracefully handled by the current proposal. react-i18next does offer more utilities, so if you are okay with the additional changes entailed, I can switch to using it. By the way, I updated code in my fork to introduce a language setting in the user's account settings. I was pleasantly surprised to see that no change to server code was necessary to preserve the language setting across logins. Now the language is set to English by default, and can be changed to French in the Account settings. |
So I think we were looking toward using the likes of We also tend to be relatively stringent about adding new dependencies to the codebase and @coyotte508 Would you be amenable to using |
@krystophv Yes, no problem. Regarding the possibility of the English string changing, when not using key names, a possibility is adding an English translation for the string instead of changing the reference string in the code. I can begin working on this, first adding the HOC and surrounding all translatable strings by |
It would be great if the strings were translatable.
The text was updated successfully, but these errors were encountered: