Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of i18n namespaces support #936

Merged

Conversation

newsiberian
Copy link
Contributor

This is an implementation of namespaces support for reaction-i18n.

  • Description explains the issue / use-case resolved
  • Only contains code directly related to the issue
  • Has tests.
  • Has docs.
  • Passes all tests
  • Has been linted and follows the style guide

To make it works with import, we have to add new ns field to Translations schema. Also, it is now always correctly load en translations within publication, don't know why, but this happens only on first load after reset and then works fine.

Package creators will need to copy directory structure to make this work: private/data/i18n

- added `ns` field to translations schema;
- `loadCoreTranslations` now lookup all packages
with assets for translation files;
- import now support namespaces;
i18next now receives correct objects with namespaces;
- added `ns` to all translation files;
@newsiberian newsiberian changed the title Implemented i18n namespaces support Implementation of i18n namespaces support Mar 21, 2016
@brent-hoover
Copy link
Collaborator

Approved

Approved with PullApprove

brent-hoover added a commit that referenced this pull request Mar 22, 2016
Implementation of i18n namespaces support
@brent-hoover brent-hoover merged commit b326170 into reactioncommerce:development Mar 22, 2016
@newsiberian newsiberian deleted the i18n-namespaces-support branch March 22, 2016 03:47
@aaronjudd aaronjudd mentioned this pull request Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants