Skip to content
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

[react-i18n] Specify default locale to babel plugin #1221

Closed
5 tasks
nimzco opened this issue Dec 13, 2019 · 3 comments · Fixed by #1225
Closed
5 tasks

[react-i18n] Specify default locale to babel plugin #1221

nimzco opened this issue Dec 13, 2019 · 3 comments · Fixed by #1225
Labels
Area: tooling good first issue Good for newcomers Package: react-i18n Type: Feature Request 🙌 Request a new feature or changes to an existing one

Comments

@nimzco
Copy link
Contributor

nimzco commented Dec 13, 2019

Overview

When using the babel plugin the default locale used is en. It would be nice to specify defaultLocale as an option to the babel plugin so that it fallbacks to French by default instead of English.

Motivation

The app's default locale I am currently working on is French, hence, we will start by having fr.json files before translating them to English.

Labels

  • Add the Type: Enhancement label to this issue.

Area

  • Add any relevant Area: <area> labels to this issue

Scope

  • Is this issue related to a specific package?

    • Tag it with the Package: <package_name> label.

Checklist

  • Please delete the labels section before submitting your issue
  • I have described this issue in a way that is actionable (if possible)
@GoodForOneFare GoodForOneFare added Area: tooling good first issue Good for newcomers Package: react-i18n Type: Feature Request 🙌 Request a new feature or changes to an existing one labels Dec 19, 2019
@GoodForOneFare
Copy link
Member

@nimzco - does your team have bandwidth to contribute a PR for this feature? Web Foundation would be happy to provide guidance and code review.

@nimzco
Copy link
Contributor Author

nimzco commented Dec 21, 2019

Hey @GoodForOneFare, my team doesn't, but I might have some bandwidth during the holiday. 😇The change seems pretty straightforward, I had started to have a look into it. The only wall I am hitting is how to test locally. I run into stupid configuration problem (and it's definitely not something that I enjoy..!) Maybe you have tips to test changes in the babel plugin in isolation?

I'll try something and see if I can get a PR up, we can go from there then.

On a side note, do you know by any chance if react-i18n could be plugged with something like PhraseApp since I know the team did some research, maybe you have this info already. 😇

@nimzco
Copy link
Contributor Author

nimzco commented Dec 21, 2019

image
Ha! Old habits! 😄

Here's a PR if you want to have a look: https://github.com/Shopify/quilt/pull/1225/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tooling good first issue Good for newcomers Package: react-i18n Type: Feature Request 🙌 Request a new feature or changes to an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants