Use i18next-client instead of i18next
Change-Id: I1a6c02407948d99c3b91fc11f9826e45e367e205
This commit is contained in:
parent
4c8e87d2ad
commit
234371f92b
|
@ -4327,22 +4327,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"i18next": {
|
||||
"version": "1.7.1",
|
||||
"from": "i18next@1.7.1",
|
||||
"dependencies": {
|
||||
"cookies": {
|
||||
"version": "0.5.1",
|
||||
"from": "cookies@>= 0.2.2",
|
||||
"dependencies": {
|
||||
"keygrip": {
|
||||
"version": "1.0.1",
|
||||
"from": "keygrip@~1.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"imports-loader": {
|
||||
"version": "0.6.4",
|
||||
"from": "imports-loader@0.6.4",
|
||||
|
@ -8525,6 +8509,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"i18next-client": {
|
||||
"version": "1.11.1",
|
||||
"from": "i18next-client@"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"gulp-jison": "1.2.0",
|
||||
"gulp-replace": "0.5.3",
|
||||
"gulp-util": "3.0.4",
|
||||
"i18next": "1.7.1",
|
||||
"i18next-client": "1.11.1",
|
||||
"imports-loader": "0.6.4",
|
||||
"javascript-natural-sort": "0.7.1",
|
||||
"jquery": "1.11.3",
|
||||
|
|
|
@ -14,14 +14,10 @@
|
|||
* under the License.
|
||||
**/
|
||||
define([
|
||||
// dependency on jQuery is still needed because:
|
||||
// 1) we still have some Backbone code which uses $().i18n()
|
||||
// 2) it seems to be impossible to use AMD version with jQuery extensions
|
||||
'jquery',
|
||||
'underscore',
|
||||
'i18next',
|
||||
'i18next-client',
|
||||
'./translations/core.json'
|
||||
], function($, _, i18next, translations) {
|
||||
], function(_, i18next, translations) {
|
||||
'use strict';
|
||||
|
||||
var defaultLocale = 'en-US';
|
||||
|
@ -41,6 +37,9 @@ define([
|
|||
},
|
||||
setLocale: function(locale) {
|
||||
i18next.setLng(locale, {});
|
||||
},
|
||||
addTranslations: function(extraTranslations) {
|
||||
_.merge(i18next.options.resStore, extraTranslations);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -19,15 +19,13 @@ define(
|
|||
'./vmware_tab',
|
||||
'./vmware_models',
|
||||
'./translations.json',
|
||||
'./styles.less',
|
||||
'jquery',
|
||||
'underscore',
|
||||
'i18next'
|
||||
'i18n',
|
||||
'./styles.less'
|
||||
],
|
||||
function(VmWareTab, vmWareModels, translations, styles, $, _, i18next) {
|
||||
function(VmWareTab, vmWareModels, translations, i18n) {
|
||||
'use strict';
|
||||
|
||||
_.merge(i18next.options.resStore, translations);
|
||||
i18n.addTranslations(translations);
|
||||
|
||||
return {
|
||||
VmWareTab: VmWareTab,
|
||||
|
|
|
@ -32,10 +32,7 @@ module.exports = {
|
|||
extensions: ['', '.js'],
|
||||
alias: {
|
||||
underscore: 'lodash',
|
||||
react: 'react/addons',
|
||||
// FIXME(vkramskikh): node.js version depends on express
|
||||
// and causes warnings
|
||||
i18next: 'i18next/lib/dep/i18next-1.7.1.js'
|
||||
react: 'react/addons'
|
||||
}
|
||||
},
|
||||
node: {},
|
||||
|
|
Loading…
Reference in New Issue