WildAid / o-fish-web

Web application for the Officer's Fishery Information Sharing Hub (O-FISH). The web app allows agencies to gain insights from the aggregated information gathered during a routine vessel inspection (submitted via the web app).
Apache License 2.0
31 stars 41 forks source link

Localization management system for node.js web application #254

Open Sheeri opened 3 years ago

Sheeri commented 3 years ago

We need a localization management system for this web application - running node.js.

Requirements:

Nice to have:

SerhatKayaa commented 3 years ago

Can i take this ?

Sheeri commented 3 years ago

@SerhatKayaa I have assigned this to you.

SerhatKayaa commented 3 years ago

I'm sorry, I can't handle this, I have to give it back to you :(

Sheeri commented 3 years ago

@SerhatKayaa that's OK! Thanks for letting us know quickly.

Sheeri commented 3 years ago

As discussed in office hours - we are looking for a script to look through the strings in: https://github.com/WildAid/o-fish-web/blob/main/src/helpers/i18n/en/translation.json

and compare to the strings in https://github.com/WildAid/o-fish-web/blob/main/src/helpers/i18n/LANG/translation.json

For all the other LANG files.

The script should preserve groupings - e.g. NAVIGATION.DASHBOARD is different from HOME_PAGE.DASHBOARDS.

The script should insert the missing values into the translation.json file, as if it was an actual translation. It should add the key itself (e.g. "VIEW") and the value/translation should be the same.

So for example, in the fr/translation.json: "SAVE": "Sauvegarder", "DELETE": "Effacer",

would change to: "SAVE": "Sauvegarder", "VIEW": "VIEW", "DELETE": "Effacer",

Then there can be a different script (you don't have to write that as part of this ticket) that parses a translation file and sees if there are any rows which the key and value are exactly the same.

rh9891 commented 3 years ago

Can I work on this?

Sheeri commented 3 years ago

Thanks for coming to office hours @rh9891 ! I've assigned this to you.

rh9891 commented 3 years ago

@Sheeri, I thought I had signed up for office hours today, but I guess I missed it as I couldn't find the link. Anyway, I had a follow-up question about my changes. Some of the translations are blank with no translation. Do they remain that way with the blank string? Is that okay? Or am I filling it in with some sort of placeholder text?

Sheeri commented 3 years ago

Hi @rh9891,

Please put the value in the string. E.g. if a translation is missing for FOO, the line should be:

FOO="FOO",