Gapminder / dollar-street-pages

Dollar Street public pages
https://www.gapminder.org/dollar-street/
GNU General Public License v3.0
14 stars 23 forks source link

Fix header for JP language #1407

Closed chibicode closed 5 years ago

chibicode commented 5 years ago

Hello, this is Shu, a Japanese translator for Factfulness who just got invited to Gapminder Slack.

There's a translation bug for JP language regarding prepositions like "of" or "in". In Japanese, many prepositions like "of" or "in" must be placed after the word instead of before. So instead of "A of B", in Japanese you must do "B {{ 'of' | translate }} A".

I added the logic on LanguageService and used it on the Header component. This might not be the best way (as there are many other places that use {{ 'IN' | translate }}), but at least fixes the header (the most prominent UI) for the Japanese audience.

Before (Incorrect)

screen shot 2019-02-13 at 12 37 10 pm screen shot 2019-02-13 at 12 37 28 pm

After (Correct)

screen shot 2019-02-13 at 12 25 26 pm screen shot 2019-02-13 at 12 41 26 pm
chibicode commented 5 years ago

This is fixed. Thank you!