You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
628 B
21 lines
628 B
4 years ago
|
import { globalConfig } from "./core/config";
|
||
|
|
||
|
const baseTranslations = require("./translations-built/base-en.json");
|
||
|
|
||
|
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);
|
||
|
}
|