Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Mar 11, 2020
1 parent 7e3f5af commit 5e9cede
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.0.1

- fix serverside usage by loading to fluent by preloaded languages - not current [6](https://github.com/i18next/i18next-fluent/pull/6)

### 1.0.0

- Return undefined when unable to get bundle in getResource [5](https://github.com/i18next/i18next-fluent/pull/5)
Expand Down
4 changes: 3 additions & 1 deletion i18nextFluent.js
Original file line number Diff line number Diff line change
Expand Up @@ -2144,7 +2144,9 @@
this.createBundleFromI18next(lng, ns);
});
this.i18next.on('initialized', () => {
this.i18next.languages.forEach(lng => {
var lngs = this.i18next.languages || [];
var preload = this.i18next.options.preload || [];
lngs.filter(l => !preload.includes(l)).concat(preload).forEach(lng => {
this.i18next.options.ns.forEach(ns => {
this.createBundleFromI18next(lng, ns);
});
Expand Down
2 changes: 1 addition & 1 deletion i18nextFluent.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "i18next-fluent",
"version": "1.0.0",
"version": "1.0.1",
"description": "i18nFormat plugin to use fluent format with i18next",
"main": "./index.js",
"jsnext:main": "dist/es/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class BundleStore {
});

this.i18next.on('initialized', () => {
var lngs = _this.i18next.languages || [];
var preload = _this.i18next.options.preload || [];
var lngs = this.i18next.languages || [];
var preload = this.i18next.options.preload || [];

lngs
.filter(l => !preload.includes(l))
.concat(preload)
Expand Down

0 comments on commit 5e9cede

Please sign in to comment.