mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix loading individual module catalog
This commit is contained in:
parent
8a87f93741
commit
0284ef401e
@ -406,10 +406,12 @@ var api = module.exports = {
|
||||
var lang = opts.lang;
|
||||
var prevLang = runtime.i18n.i.language;
|
||||
// Trigger a load from disk of the language if it is not the default
|
||||
return runtime.i18n.i.changeLanguage(lang, function(){
|
||||
var catalog = runtime.i18n.i.getResourceBundle(lang, namespace);
|
||||
runtime.i18n.i.changeLanguage(prevLang);
|
||||
return catalog||{};
|
||||
return new Promise(resolve => {
|
||||
runtime.i18n.i.changeLanguage(lang, function() {
|
||||
var catalog = runtime.i18n.i.getResourceBundle(lang, namespace);
|
||||
runtime.i18n.i.changeLanguage(prevLang);
|
||||
resolve(catalog||{});
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user