mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix i18n api changes in runtime/nodes
This commit is contained in:
parent
2aae76c9bc
commit
d34ebd4d1b
4
packages/node_modules/@node-red/runtime/lib/api/nodes.js
generated
vendored
4
packages/node_modules/@node-red/runtime/lib/api/nodes.js
generated
vendored
@ -390,10 +390,10 @@ var api = module.exports = {
|
|||||||
return new Promise(function(resolve,reject) {
|
return new Promise(function(resolve,reject) {
|
||||||
var namespace = opts.module;
|
var namespace = opts.module;
|
||||||
var lang = opts.lang;
|
var lang = opts.lang;
|
||||||
var prevLang = runtime.i18n.i.lng();
|
var prevLang = runtime.i18n.i.language;
|
||||||
// Trigger a load from disk of the language if it is not the default
|
// Trigger a load from disk of the language if it is not the default
|
||||||
runtime.i18n.i.changeLanguage(lang, function(){
|
runtime.i18n.i.changeLanguage(lang, function(){
|
||||||
var catalog = runtime.i18n.getResourceBundle(lang, namespace);
|
var catalog = runtime.i18n.i.getResourceBundle(lang, namespace);
|
||||||
resolve(catalog||{});
|
resolve(catalog||{});
|
||||||
});
|
});
|
||||||
runtime.i18n.i.changeLanguage(prevLang);
|
runtime.i18n.i.changeLanguage(prevLang);
|
||||||
|
Loading…
Reference in New Issue
Block a user