mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Provide single endpoint to load all node message catalogs
Replaces potentially dozens of http requests with one or two.
This commit is contained in:
@@ -98,6 +98,7 @@ function init() {
|
||||
|
||||
function getCatalog(namespace,lang) {
|
||||
var result = null;
|
||||
lang = lang || defaultLang;
|
||||
if (resourceCache.hasOwnProperty(namespace)) {
|
||||
result = resourceCache[namespace][lang];
|
||||
if (!result) {
|
||||
@@ -105,9 +106,6 @@ function getCatalog(namespace,lang) {
|
||||
if (langParts.length == 2) {
|
||||
result = resourceCache[namespace][langParts[0]];
|
||||
}
|
||||
if (!result) {
|
||||
return resourceCache[namespace][defaultLang];
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
Reference in New Issue
Block a user