Skip to content

Commit

Permalink
chore(all): prepare release 2.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Feb 24, 2018
1 parent 5692e30 commit 3d82402
Show file tree
Hide file tree
Showing 16 changed files with 306 additions and 286 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-i18n",
"version": "2.1.1",
"version": "2.1.2",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand Down
472 changes: 236 additions & 236 deletions config.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions dist/amd/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ define(['exports', 'aurelia-logging', 'i18next', 'aurelia-pal', 'aurelia-event-a
debug: false
};

if (options && !options.lng) {
throw new Error('You need to provide the lng option');
}

_i18next2.default.init(options || defaultOptions, function (err, t) {
if (_i18next2.default.options.attributes instanceof String) {
_i18next2.default.options.attributes = [_i18next2.default.options.attributes];
Expand Down
9 changes: 8 additions & 1 deletion dist/amd/relativeTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ define(['exports', './i18n', './defaultTranslations/relative.time', 'aurelia-eve

RelativeTime.prototype.setup = function setup(locales) {
var trans = _relative.translations.default || _relative.translations;
var key = locales && locales.newValue ? locales.newValue : this.service.getLocale();
var fallbackLng = this.service.i18next.fallbackLng;

var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;
if (Array.isArray(alternateFb) && alternateFb.length > 0) {
alternateFb = alternateFb[0];
}

var key = (locales && locales.newValue ? locales.newValue : this.service.getLocale()) || alternateFb;

var index = 0;

if ((index = key.indexOf('-')) >= 0) {
Expand Down
14 changes: 10 additions & 4 deletions dist/aurelia-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,6 @@ export class I18N {
debug: false
};

if (options && !options.lng) {
throw new Error('You need to provide the lng option');
}

i18next.init(options || defaultOptions, (err, t) => {
//make sure attributes is an array in case a string was provided
Expand Down Expand Up @@ -1065,8 +1062,17 @@ export class RelativeTime {

setup(locales) {
let trans = translations.default || translations;
let key = locales && locales.newValue ? locales.newValue : this.service.getLocale();
let fallbackLng = this.service.i18next.fallbackLng;

let alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;
if (Array.isArray(alternateFb) && alternateFb.length > 0) {
alternateFb = alternateFb[0];
}

let key = ((locales && locales.newValue)
? locales.newValue
: this.service.getLocale()) || alternateFb;

let index = 0;

if ((index = key.indexOf('-')) >= 0) { // eslint-disable-line no-cond-assign
Expand Down
4 changes: 0 additions & 4 deletions dist/commonjs/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ var I18N = exports.I18N = (_temp = _class = function () {
debug: false
};

if (options && !options.lng) {
throw new Error('You need to provide the lng option');
}

_i18next2.default.init(options || defaultOptions, function (err, t) {
if (_i18next2.default.options.attributes instanceof String) {
_i18next2.default.options.attributes = [_i18next2.default.options.attributes];
Expand Down
9 changes: 8 additions & 1 deletion dist/commonjs/relativeTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ var RelativeTime = exports.RelativeTime = function () {

RelativeTime.prototype.setup = function setup(locales) {
var trans = _relative.translations.default || _relative.translations;
var key = locales && locales.newValue ? locales.newValue : this.service.getLocale();
var fallbackLng = this.service.i18next.fallbackLng;

var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;
if (Array.isArray(alternateFb) && alternateFb.length > 0) {
alternateFb = alternateFb[0];
}

var key = (locales && locales.newValue ? locales.newValue : this.service.getLocale()) || alternateFb;

var index = 0;

if ((index = key.indexOf('-')) >= 0) {
Expand Down
4 changes: 0 additions & 4 deletions dist/es2015/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ export let I18N = (_temp = _class = class I18N {
debug: false
};

if (options && !options.lng) {
throw new Error('You need to provide the lng option');
}

i18next.init(options || defaultOptions, (err, t) => {
if (i18next.options.attributes instanceof String) {
i18next.options.attributes = [i18next.options.attributes];
Expand Down
9 changes: 8 additions & 1 deletion dist/es2015/relativeTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,15 @@ export let RelativeTime = class RelativeTime {

setup(locales) {
let trans = translations.default || translations;
let key = locales && locales.newValue ? locales.newValue : this.service.getLocale();
let fallbackLng = this.service.i18next.fallbackLng;

let alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;
if (Array.isArray(alternateFb) && alternateFb.length > 0) {
alternateFb = alternateFb[0];
}

let key = (locales && locales.newValue ? locales.newValue : this.service.getLocale()) || alternateFb;

let index = 0;

if ((index = key.indexOf('-')) >= 0) {
Expand Down
4 changes: 0 additions & 4 deletions dist/native-modules/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ export var I18N = (_temp = _class = function () {
debug: false
};

if (options && !options.lng) {
throw new Error('You need to provide the lng option');
}

i18next.init(options || defaultOptions, function (err, t) {
if (i18next.options.attributes instanceof String) {
i18next.options.attributes = [i18next.options.attributes];
Expand Down
9 changes: 8 additions & 1 deletion dist/native-modules/relativeTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ export var RelativeTime = function () {

RelativeTime.prototype.setup = function setup(locales) {
var trans = translations.default || translations;
var key = locales && locales.newValue ? locales.newValue : this.service.getLocale();
var fallbackLng = this.service.i18next.fallbackLng;

var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;
if (Array.isArray(alternateFb) && alternateFb.length > 0) {
alternateFb = alternateFb[0];
}

var key = (locales && locales.newValue ? locales.newValue : this.service.getLocale()) || alternateFb;

var index = 0;

if ((index = key.indexOf('-')) >= 0) {
Expand Down
4 changes: 0 additions & 4 deletions dist/system/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ System.register(['aurelia-logging', 'i18next', 'aurelia-pal', 'aurelia-event-agg
debug: false
};

if (options && !options.lng) {
throw new Error('You need to provide the lng option');
}

i18next.init(options || defaultOptions, function (err, t) {
if (i18next.options.attributes instanceof String) {
i18next.options.attributes = [i18next.options.attributes];
Expand Down
9 changes: 8 additions & 1 deletion dist/system/relativeTime.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,15 @@ System.register(['./i18n', './defaultTranslations/relative.time', 'aurelia-event

RelativeTime.prototype.setup = function setup(locales) {
var trans = translations.default || translations;
var key = locales && locales.newValue ? locales.newValue : this.service.getLocale();
var fallbackLng = this.service.i18next.fallbackLng;

var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;
if (Array.isArray(alternateFb) && alternateFb.length > 0) {
alternateFb = alternateFb[0];
}

var key = (locales && locales.newValue ? locales.newValue : this.service.getLocale()) || alternateFb;

var index = 0;

if ((index = key.indexOf('-')) >= 0) {
Expand Down
13 changes: 8 additions & 5 deletions dist/temp/aurelia-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,6 @@ var I18N = exports.I18N = (_temp = _class2 = function () {
debug: false
};

if (options && !options.lng) {
throw new Error('You need to provide the lng option');
}

i18next.init(options || defaultOptions, function (err, t) {
if (i18next.options.attributes instanceof String) {
i18next.options.attributes = [i18next.options.attributes];
Expand Down Expand Up @@ -1076,8 +1072,15 @@ var RelativeTime = exports.RelativeTime = function () {

RelativeTime.prototype.setup = function setup(locales) {
var trans = translations.default || translations;
var key = locales && locales.newValue ? locales.newValue : this.service.getLocale();
var fallbackLng = this.service.i18next.fallbackLng;

var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;
if (Array.isArray(alternateFb) && alternateFb.length > 0) {
alternateFb = alternateFb[0];
}

var key = (locales && locales.newValue ? locales.newValue : this.service.getLocale()) || alternateFb;

var index = 0;

if ((index = key.indexOf('-')) >= 0) {
Expand Down
10 changes: 10 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="2.1.2"></a>
## [2.1.2](https://github.com/aurelia/i18n/compare/2.1.1...2.1.2) (2018-02-24)


### Bug Fixes

* **i18n:** stop forcing lng option ([#259](https://github.com/aurelia/i18n/issues/259)) ([5692e30](https://github.com/aurelia/i18n/commit/5692e30))



<a name="2.1.1"></a>
## [2.1.1](https://github.com/aurelia/i18n/compare/2.1.0...2.1.1) (2018-01-25)

Expand Down
16 changes: 1 addition & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-i18n",
"version": "2.1.1",
"version": "2.1.2",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand All @@ -26,25 +26,11 @@
},
"jspm": {
"registry": "npm",
"jspmPackage": true,
"main": "aurelia-i18n",
"format": "amd",
"directories": {
"dist": "dist/amd"
},
"peerDependencies": {
"aurelia-binding": "^1.0.0",
"aurelia-dependency-injection": "^1.0.0",
"aurelia-event-aggregator": "^1.0.0",
"aurelia-loader": "^1.0.0",
"aurelia-logging": "^1.0.0",
"aurelia-metadata": "^1.0.3",
"aurelia-pal": "^1.3.0",
"aurelia-templating": "^1.4.0",
"aurelia-templating-resources": "^1.0.0",
"i18next": "^9.0.0",
"intl": "^1.2.4"
},
"dependencies": {
"aurelia-binding": "^1.0.0",
"aurelia-dependency-injection": "^1.0.0",
Expand Down

0 comments on commit 3d82402

Please sign in to comment.