Skip to content

Commit

Permalink
Update i18next files in ext.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Jun 24, 2017
1 parent e24f3f8 commit 9a8ef07
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"main": "dist/dwv.js",
"dependencies": {
"modernizr": "~3.5.0",
"i18next": "~8.3.0",
"i18next": "~8.4.2",
"i18next-xhr-backend": "~1.4.1",
"i18next-browser-languagedetector": "~1.0.1",
"i18next-browser-languagedetector": "~2.0.0",
"konva": "~1.6.0"
},
"devDependencies": {
Expand Down
15 changes: 8 additions & 7 deletions ext/i18next/i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -1859,6 +1859,7 @@ var I18n = function (_EventEmitter) {
} else {
this.options = _extends({}, get$1(), this.options, transformOptions(options));
}
this.format = this.options.interpolation.format;
if (!callback) callback = noop;

function createClassOnDemand(ClassOrObject) {
Expand Down Expand Up @@ -2054,10 +2055,10 @@ var I18n = function (_EventEmitter) {
I18n.prototype.changeLanguage = function changeLanguage(lng, callback) {
var _this4 = this;

var done = function done(err) {
if (lng) {
_this4.emit('languageChanged', lng);
_this4.logger.log('languageChanged', lng);
var done = function done(err, l) {
if (l) {
_this4.emit('languageChanged', l);
_this4.logger.log('languageChanged', l);
}

if (callback) callback(err, function () {
Expand All @@ -2076,7 +2077,7 @@ var I18n = function (_EventEmitter) {
}

_this4.loadResources(function (err) {
done(err);
done(err, l);
});
};

Expand Down Expand Up @@ -2149,7 +2150,7 @@ var I18n = function (_EventEmitter) {
};

I18n.prototype.dir = function dir(lng) {
if (!lng) lng = this.language;
if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;
if (!lng) return 'rtl';

var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];
Expand All @@ -2173,7 +2174,7 @@ var I18n = function (_EventEmitter) {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;

var mergedOptions = _extends({}, options, this.options, { isClone: true });
var mergedOptions = _extends({}, this.options, options, { isClone: true });
var clone = new I18n(mergedOptions, callback);
var membersToCopy = ['store', 'services', 'language'];
membersToCopy.forEach(function (m) {
Expand Down
4 changes: 2 additions & 2 deletions ext/i18next/i18next.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion ext/i18next/i18nextBrowserLanguageDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@
lookupLocalStorage: 'i18nextLng',

// cache user language
caches: ['localStorage']
caches: ['localStorage'],
excludeCacheFor: ['cimode']
//cookieMinutes: 10,
//cookieDomain: 'myDomain'
};
Expand Down Expand Up @@ -268,6 +269,7 @@

if (!caches) caches = this.options.caches;
if (!caches) return;
if (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(lng) > -1) return;
caches.forEach(function (cacheName) {
if (_this2.detectors[cacheName]) _this2.detectors[cacheName].cacheUserLanguage(lng, _this2.options);
});
Expand Down
2 changes: 1 addition & 1 deletion ext/i18next/i18nextBrowserLanguageDetector.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions ext/i18next/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Third Party: i18next
====================

* Web: http://i18next.com/
* Version: [8.3.0](https://github.com/i18next/i18next/releases/tag/v8.3.0)
* Date: 19/05/2017
* Download: https://github.com/i18next/i18next/blob/v8.3.0/i18next.min.js
* License: MIT (see https://github.com/i18next/i18next/blob/v8.3.0/LICENSE)
* Version: [8.4.2](https://github.com/i18next/i18next/releases/tag/v8.4.2)
* Date: 11/06/2017
* Download: https://github.com/i18next/i18next/blob/v8.4.2/i18next.min.js
* License: MIT (see https://github.com/i18next/i18next/blob/v8.4.2/LICENSE)
* Description: internationalization framework.
* Purpose for dwv: internationalization of GUI and messages.

Expand All @@ -22,9 +22,9 @@ i18next-xhr-backend
i18next-browser-languageDetector
--------------------------------
* Web: https://github.com/i18next/i18next-browser-languageDetector
* Version: [1.0.1](https://github.com/i18next/i18next-browser-languageDetector/releases/tag/v1.0.1)
* Date: 17/10/2016
* Download: https://github.com/i18next/i18next-browser-languageDetector/blob/v1.0.1/i18nextBrowserLanguageDetector.min.js
* License: MIT (see https://github.com/i18next/i18next-browser-languageDetector/blob/v1.0.1/LICENSE)
* Version: [2.0.0](https://github.com/i18next/i18next-browser-languageDetector/releases/tag/v2.0.0)
* Date: 16/06/2017
* Download: https://github.com/i18next/i18next-browser-languageDetector/blob/v2.0.0/i18nextBrowserLanguageDetector.min.js
* License: MIT (see https://github.com/i18next/i18next-browser-languageDetector/blob/v2.0.0/LICENSE)
* Description: language detector used in browser environment for i18next
* Purpose for dwv: detect user language.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"main": "dist/dwv.min.js",
"dependencies": {
"modernizr": "~3.5.0",
"i18next": "~8.4.0",
"i18next": "~8.4.2",
"i18next-xhr-backend": "~1.4.1",
"i18next-browser-languagedetector": "~2.0.0",
"konva": "~1.6.0"
Expand Down

0 comments on commit 9a8ef07

Please sign in to comment.