This repository has been archived on 2021-02-20. You can view files and clone it, but cannot push or open issues or pull requests.
shapez.io/src/js/translations.js

21 lines
620 B
JavaScript
Raw Normal View History

2020-05-17 12:12:13 +02:00
import { globalConfig } from "./core/config";
2020-05-19 11:08:28 +02:00
const baseTranslations = require("./built-temp/base-en.json");
2020-05-17 12:12:13 +02:00
export const T = baseTranslations;
if (G_IS_DEV && globalConfig.debug.testTranslations) {
// Replaces all translations by fake translations to see whats translated and what not
const mapTranslations = obj => {
for (const key in obj) {
const value = obj[key];
if (typeof value === "string") {
obj[key] = value.replace(/[a-z]/gi, "x");
} else {
mapTranslations(value);
}
}
};
mapTranslations(T);
}