17 lines
626 B
PHP
Executable File
17 lines
626 B
PHP
Executable File
<?php
|
|
$langs = ['pt_BR', 'en', 'es'];
|
|
foreach ($langs as $lang) {
|
|
$file = "/app/lang/$lang/auth.php";
|
|
if (file_exists($file)) {
|
|
$translations = include $file;
|
|
// Add auth. prefix to keys for JSON fallback
|
|
$jsonTranslations = [];
|
|
foreach ($translations as $key => $value) {
|
|
$jsonTranslations["auth.$key"] = $value;
|
|
}
|
|
$json = json_encode($jsonTranslations, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
|
file_put_contents("/app/lang/$lang.json", $json);
|
|
echo "Fixed $lang.json with auth-prefixed keys" . PHP_EOL;
|
|
}
|
|
}
|