Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Multiple languages #767

Merged
merged 11 commits into from Sep 19, 2018
Merged

Multiple languages #767

merged 11 commits into from Sep 19, 2018

Conversation

mrfelton
Copy link
Member

@mrfelton mrfelton commented Sep 15, 2018

Description:

This PR implements i18n support in our repo using https://github.com/yahoo/react-intl

You can switch languages in two different ways:

  1. Using the Language menu at the top of the screen
  2. using the Settings menu within the app.

Default local should be detected by the browser. When you change locale, this will be saved as a setting in our settings store and used as the selected language next time you start the app.

Additionally, a best-fit default currency is selected for the user based on their determined country.

I identified quite a lot of strings that were not included in the original extraction so none of the translations are 100% now. Additionally, the structure of the translation files has changed from what we originally uploaded to Crowdin and whilst I have tried where possible to carry over the translations that were submitted to us, it is possible that some did not make it over.

Note: This builds on #754 #755 and #756 - so those should be merged prior to this one.

Motivation and Context:

Support international users.

How Has This Been Tested?

Ran all tests and manually test app.

Screenshots (if appropriate):

screenshot 2018-09-15 23 38 23

screenshot 2018-09-15 23 54 30

Types of changes:

New Feature

Checklist:

  • My code follows the code style of this project.
  • I have reviewed and updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes where needed.
  • All new and existing tests passed.
  • My commits have been squashed into a concise set of changes.

@mrfelton mrfelton added the type: enhancement New feature or request label Sep 15, 2018
@mrfelton mrfelton added this to the v0.2.2-beta milestone Sep 15, 2018
@mrfelton mrfelton self-assigned this Sep 15, 2018
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 14.364% when pulling 3ba287d on crowdin into 15559db on master.

@coveralls
Copy link

coveralls commented Sep 15, 2018

Coverage Status

Coverage increased (+0.2%) to 16.407% when pulling 5c93cee on crowdin into 4771c1e on master.

@mrfelton
Copy link
Member Author

@JimmyMow I have added an additional commit to this PR which detects a best-fit default currency for the user based on their locale. We default back to USD if the detected currency is not one that we support.

@JimmyMow JimmyMow mentioned this pull request Sep 18, 2018
@mrfelton mrfelton force-pushed the crowdin branch 9 times, most recently from 9cd9dd0 to a4cdd7b Compare September 19, 2018 13:48
@mrfelton mrfelton changed the title Multilingual support Multiple languages Sep 19, 2018
mrfelton and others added 8 commits September 19, 2018 17:21
Use the locale information in order to select a best fit default
currency for the user.
Use `intl.formattedNumber` to display currency values to ensure that
currencies are displayed using the formatting rules that match the
user's locale.
* New translations en.json (Irish)
[ci skip]

* New translations en.json (Ukrainian)
[ci skip]

* New translations en.json (Turkish)
[ci skip]

* New translations en.json (Swedish)
[ci skip]

* New translations en.json (Spanish)
[ci skip]

* New translations en.json (Russian)
[ci skip]

* New translations en.json (Romanian)
[ci skip]

* New translations en.json (Portuguese, Brazilian)
[ci skip]

* New translations en.json (Portuguese)
[ci skip]

* New translations en.json (Polish)
[ci skip]

* New translations en.json (Japanese)
[ci skip]

* New translations en.json (Italian)
[ci skip]

* New translations en.json (Arabic)
[ci skip]

* New translations en.json (Hindi)
[ci skip]

* New translations en.json (Hebrew)
[ci skip]

* New translations en.json (Greek)
[ci skip]

* New translations en.json (German)
[ci skip]

* New translations en.json (French)
[ci skip]

* New translations en.json (Dutch)
[ci skip]

* New translations en.json (Danish)
[ci skip]

* New translations en.json (Czech)
[ci skip]

* New translations en.json (Croatian)
[ci skip]

* New translations en.json (Chinese Traditional)
[ci skip]

* New translations en.json (Chinese Simplified)
[ci skip]

* New translations en.json (Bulgarian)
[ci skip]
@JimmyMow
Copy link
Member

Tested ACK 5c93cee

@JimmyMow JimmyMow merged commit f6fd4f9 into master Sep 19, 2018
@mrfelton mrfelton deleted the crowdin branch September 20, 2018 07:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants