1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-10-07 12:03:26 +00:00

Update translations

This commit is contained in:
tobspr
2020-06-24 19:15:35 +02:00
parent 15a4e0c580
commit 944463a914
24 changed files with 150 additions and 12 deletions

View File

@@ -21,7 +21,7 @@ const placeholderRegexp = /<([a-zA-Z_0-9]+)>/gi;
function match(originalObj, translatedObj, path = "/") {
for (const key in originalObj) {
if (!translatedObj[key]) {
if (!translatedObj.hasOwnProperty(key)) {
console.warn(" | Missing key", path + key);
translatedObj[key] = originalObj[key];
continue;
@@ -60,7 +60,7 @@ function match(originalObj, translatedObj, path = "/") {
}
for (const key in translatedObj) {
if (!originalObj[key]) {
if (!originalObj.hasOwnProperty(key)) {
console.warn(" | Obsolete key", path + key);
delete translatedObj[key];
}