EBSECan / donatemask

Donate A Mask Project Repository
GNU Lesser General Public License v2.1
10 stars 7 forks source link

Initial setup for for i18n, footer localized #125

Open humphd opened 2 years ago

humphd commented 2 years ago

Initial work to internationalize the front-end (see #124), please don't merge this yet. NOTE: this only localizes the footer component into English, and includes the file for French as well.

The way this works is as follows:

This process will expose a bunch of issues. Strings in different languages have different lengths, and will require tweaks to the UI/CSS os that it works in all cases. Also, some components are currently using classes, which won't work with hooks (i.e., the navbar needs to be converted to a functional component). Also, some strings are used all over the place, and we'll need to separate the translations out into different JSON files for improved loading.

I'm in the process of redoing the 'Buy' page right now, so I'd like to finish major updates to the UI before pushing ahead with this (i.e., it's easier to not have a lot of churn on the UI when you are pulling the strings out into JSON files); but I wanted to show you what it looks like to do this work.

We can also do this bit at a time vs. waiting for the whole thing to be translated.

Resources:

  1. https://www.i18next.com/
  2. https://react.i18next.com/