[Minor] Don't load resources if no localesPath
This commit is contained in:
parent
11e31089a3
commit
facb519870
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "strolch-wc-localize-behavior",
|
||||
"description": "Strolch Polymer Localization Behavior extension",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"authors": [
|
||||
"Franz Nieschalk",
|
||||
"Robert von Burg"
|
||||
|
|
|
@ -4,14 +4,16 @@
|
|||
|
||||
// custom behaviour accessing the configuration above
|
||||
StrolchLocalizeBehaviorImpl = {
|
||||
attached: function() {
|
||||
attached: function () {
|
||||
var locale = Strolch.getUserLocale();
|
||||
|
||||
// load the language resource of the configured language
|
||||
this.language = locale;
|
||||
this.useKeyIfMissing = true;
|
||||
console.log('Loading locales ' + this.localesPath);
|
||||
this.loadResources(this.resolveUrl(this.localesPath));
|
||||
|
||||
if (Strolch.isNotEmptyString(this.localesPath)) {
|
||||
this.loadResources(this.resolveUrl(this.localesPath));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue