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

[Intl] Lockdown implementation #71

Open
christopherdro opened this issue Apr 14, 2017 · 3 comments
Open

[Intl] Lockdown implementation #71

christopherdro opened this issue Apr 14, 2017 · 3 comments
Assignees

Comments

@christopherdro
Copy link
Member

No description provided.

@christopherdro
Copy link
Member Author

I don't think we need to complicate things by using libraries and just roll out our own basic solution.

A folder with constants files based on language .i.e en.copy.js, fr.copy.js.
Index file in that folder that determines the user locale automatically or what is set in the app.

Then used within the app...
import { APP_LABEL, APP_HEADING } from '../constants/copy

I'm thinking the time spent next week on this should be to just work this kind of implementation and get rid of react-intl entirely.

@cjcaj
Copy link
Contributor

cjcaj commented Apr 17, 2017

If we go this route, we'll have to roll out our own solution to format numbers, dates and time, pluralization, currency (not really applicable here). What are some of the pain points of react-intl that made you want to move away from it? Things do get a little hairy with a react navigation but if we were to do our own stylings in the future, we would end up with the same implementation in having to do provide our own components instead of a string.
What do you guys think if we go this route with Intl and navigation: #76

As for the form components we could pass a formatted message with id and defaultMessage to FormLabel. This would also make it easier for us since we don't have to manage a constants file and not worry about duplicates.

Or if we only want to pass strings and not components, we could pass a primaryTextId

<FormLabel primaryTextId="app.access_key.rights" />

Then we'll define the default message in build/lang/en.json. This is a lot like managing a constants/copy file.

So if we don't need the support to format dates, number, currency, and maybe some pluralization, maybe we can roll out our own and manage a constants file for every copy in the app.

@christopherdro
Copy link
Member Author

christopherdro commented Apr 17, 2017

My suggestion is to put this on the back burner for now. Almost everybody in the community communicates in English. The 2nd most spoken language I see is German and almost all germans speak perfect english so I don't think it'll be much of an issue.

I would like us to focus on getting the alpha version of the app out and get users feedback as soon as possible.

@christopherdro christopherdro removed this from the Week 3 [4/17 - 4/21] milestone Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants