Cleanup
This commit is contained in:
parent
d3272efef7
commit
3c9f2c6a2e
@ -28,7 +28,7 @@ class Translator {
|
||||
};
|
||||
|
||||
this.loaded = false;
|
||||
this.tags = null;
|
||||
this.tagMeta = null;
|
||||
this.dictionary = new Dictionary();
|
||||
this.deinflector = new Deinflector();
|
||||
}
|
||||
@ -53,7 +53,7 @@ class Translator {
|
||||
this.deinflector.setRules(JSON.parse(response));
|
||||
break;
|
||||
case 'tags':
|
||||
this.tags = JSON.parse(response);
|
||||
this.tagMeta = JSON.parse(response);
|
||||
break;
|
||||
case 'kanjidic':
|
||||
this.dictionary.addKanjiDict(key, JSON.parse(response));
|
||||
@ -175,10 +175,10 @@ class Translator {
|
||||
name: tag
|
||||
};
|
||||
|
||||
const tagMeta = this.tags[tag];
|
||||
const tagMeta = this.tagMeta[tag];
|
||||
if (tagMeta) {
|
||||
for (const key in tagMeta) {
|
||||
tagItem[key] = tagMeta[key] || tagItem[key];
|
||||
for (const tagProp in tagMeta) {
|
||||
tagItem[tagProp] = tagMeta[tagProp] || tagItem[tagProp];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user