Skip to content
Snippets Groups Projects
Verified Commit 359b0c62 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #14136 TIME 0:05 set JSON_UNESCAPED in migrateCustomLang

parent 8ff177dc
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ foreach ($customs as $custom) { ...@@ -29,7 +29,7 @@ foreach ($customs as $custom) {
$fileContent = trim(file_get_contents($customLangFolderPath . '/' . $customLangFile)); $fileContent = trim(file_get_contents($customLangFolderPath . '/' . $customLangFile));
$fileContent = trim(substr($fileContent, strpos($fileContent, "{"), -2)); // get content from first "{" , and remove last "};" $fileContent = trim(substr($fileContent, strpos($fileContent, "{"), -2)); // get content from first "{" , and remove last "};"
$jsonContent = json_decode(rtrim($fileContent, ",") . "}"); $jsonContent = json_decode(rtrim($fileContent, ",") . "}");
file_put_contents($customLangFolderPath . '/' . str_ireplace(".ts", ".json", $customLangFile), json_encode($jsonContent, JSON_PRETTY_PRINT)); file_put_contents($customLangFolderPath . '/' . str_ireplace(".ts", ".json", $customLangFile), json_encode($jsonContent, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
unlink($customLangFolderPath . '/' . $customLangFile); unlink($customLangFolderPath . '/' . $customLangFile);
$migrated++; $migrated++;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment