CoastalResilienceNetwork / GeositeFramework

Mapping Framework powering TNC Coastal Resilience programs
http://maps.coastalresilience.org/network/
GNU General Public License v3.0
13 stars 10 forks source link

Migrate internationalization to static site #1133

Closed fungjj92 closed 5 years ago

fungjj92 commented 5 years ago

Overview

The Framework can be internationalized by providing translation dictionaries for plugins, core and then specifying what language in region.json. This PR ports that ability from the C# site to the static site -- this amounts really to compiling the translation dicts across the various folders using python. We are able to use the already implemented i18next library to template in the values-- it automagically just works behind the scenes. TNC developers won't have to make any updates for translations to work.

Connects #1088

Demo

screen shot 2018-10-08 at 2 00 13 pm

Using spanish.

Notes

There are some known translation fails that were fixed in https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/1109 and https://github.com/CoastalResilienceNetwork/GeositeFramework/pull/1112 . These fixes are on develop.

Some instances of English ("Zoom to Extent") are also because there is no provided translation.

Testing Instructions

fungjj92 commented 5 years ago

Thanks for review all ~ I will leave this PR up until EOD today in case there's comment on the changes I pushed.