i18n: rely less on exceptions

This commit is contained in:
Nils Maier 2019-08-26 02:57:06 +02:00
parent d00b25cbe7
commit 976c57c043

View File

@ -52,8 +52,13 @@ class Localization {
continue; continue;
} }
try { try {
if (entry.message.includes("$")) {
this.strings.set(id, new Entry(entry)); this.strings.set(id, new Entry(entry));
} }
else {
this.strings.set(id, entry.message);
}
}
catch (ex) { catch (ex) {
this.strings.set(id, entry.message); this.strings.set(id, entry.message);
} }