Automattic / i18n-calypso

i18n JavaScript library on top of Jed originally used in Calypso
GNU General Public License v2.0
24 stars 19 forks source link

Does not work with multiple locale sources #39

Closed Tug closed 7 years ago

Tug commented 7 years ago

Calling setLocale a second time for the same language does not merge the given data with the existing one resulting in a partially translated page when multiple modules use i18n-calypso in the same app.

This is currently a problem in wp-calypso when user bootstrapping is disabled because notifications-panel might set the language first.

To reproduce, simply load a development environment of wp-calypso as a logged in user with a locale different than en. Either https://widgets.wp.com/languages/notifications/fr.json or https://widgets.wp.com/languages/calypso/fr.json will be ignored.