react-intl spike #216

Merged
SamSamskies merged 3 commits from react-intl-spike into main 2023-02-08 10:03:06 +00:00
SamSamskies commented 2023-02-08 05:58:25 +00:00 (Migrated from github.com)

This possibly resolves https://github.com/v0l/snort/issues/127.

Not sure what languages you want to support. I started with just English and Spanish.

The locale is being set by whatever locale the user has set in their browser. You could also maybe let the user set the locale in their user settings or with a language selector on the landing page.

English
Screenshot 2023-02-07 at 11 47 00 PM

Spanish
Screenshot 2023-02-07 at 11 46 43 PM

This possibly resolves https://github.com/v0l/snort/issues/127. Not sure what languages you want to support. I started with just English and Spanish. The locale is being set by whatever locale the user has set in their browser. You could also maybe let the user set the locale in their user settings or with a language selector on the landing page. English ![Screenshot 2023-02-07 at 11 47 00 PM](https://user-images.githubusercontent.com/3655410/217448205-f0368e09-7ca3-4c98-8cd5-f03874a65347.png) Spanish ![Screenshot 2023-02-07 at 11 46 43 PM](https://user-images.githubusercontent.com/3655410/217448236-e82dd306-6788-4d7d-b82d-ab811e7cbca2.png)
SamSamskies (Migrated from github.com) reviewed 2023-02-08 06:01:47 +00:00
@ -0,0 +5,4 @@
Login: "Login",
});
export default addIdAndDefaultMessageToMessages(messages, 'Pages');
SamSamskies (Migrated from github.com) commented 2023-02-08 06:01:47 +00:00

This is an example boilerplate file where default messages are defined. The values are extracted into one JSON file per each locale that is supported using the yarn generate-messages command.

These boilerplate files are fairly simple, so I think it's okay to leave it them as JS. I think it would require more dependencies to get it to work with TS.

This is an example boilerplate file where default messages are defined. The values are extracted into one JSON file per each locale that is supported using the `yarn generate-messages` command. These boilerplate files are fairly simple, so I think it's okay to leave it them as JS. I think it would require more dependencies to get it to work with TS.
verbiricha commented 2023-02-08 08:02:47 +00:00 (Migrated from github.com)

yo Sam thanks for starting this effort ❤️

Not sure what languages you want to support. I started with just English and Spanish.

Starting with those is fine, once the project is ready for getting translations we'll probably publish it in Transifex to get translation contributions.

The locale is being set by whatever locale the user has set in their browser. You could also maybe let the user set the locale in their user settings or with a language selector on the landing page.

Like this idea, i think this is a good default (system locale) but we should allow user to override that in the future, similar to theme selection.

yo Sam thanks for starting this effort ❤️ >Not sure what languages you want to support. I started with just English and Spanish. Starting with those is fine, once the project is ready for getting translations we'll probably publish it in Transifex to get translation contributions. > The locale is being set by whatever locale the user has set in their browser. You could also maybe let the user set the locale in their user settings or with a language selector on the landing page. Like this idea, i think this is a good default (system locale) but we should allow user to override that in the future, similar to theme selection.
verbiricha (Migrated from github.com) approved these changes 2023-02-08 08:08:56 +00:00
v0l (Migrated from github.com) reviewed 2023-02-08 09:44:44 +00:00
v0l (Migrated from github.com) left a comment

Awesome, we really need to get Chinese and Japanese translations up first as those are the most popular

Awesome, we really need to get Chinese and Japanese translations up first as those are the most popular
Sign in to join this conversation.
No description provided.