From 7f4ac42a209f72e957cbb0352e48cb9b337599aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 14 Aug 2025 16:04:37 +0200 Subject: [PATCH] Improve non-standard alphabet translations --- .../Platform/Tasks/DevGenerateTranslations.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php b/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php index 15ae59882e..249aed9956 100644 --- a/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php +++ b/src/Appwrite/Platform/Tasks/DevGenerateTranslations.php @@ -53,20 +53,14 @@ class DevGenerateTranslations extends Action $mainKeys = \array_keys($mainJson); $files = \array_diff(\scandir($dir), array('.', '..', $mainFile)); - + $filesProcessed = 0; $keysProcessed = 0; foreach ($files as $file) { - - if($file !== 'de.json') { - continue; - } - - Console::log('Processing ' . $file); $filesProcessed++; - + $fileJson = \json_decode(\file_get_contents($dir . '/' . $file), true); $fileKeys = \array_keys($fileJson); @@ -96,7 +90,7 @@ class DevGenerateTranslations extends Action Console::log('Translation results:'); Console::log('English: ' . $mainJson[$missingKey]); Console::log($language . ': ' . $translation); - + $keysProcessed++; // This puts new key at beginning to prevent merge conflict issue and ending comma @@ -168,7 +162,7 @@ class DevGenerateTranslations extends Action // Replace XML tags back to placeholders $id = 0; foreach ($placeholders as $placeholder) { - $pattern = '/\/'; + $pattern = '/\/'; $targetTranslation = \preg_replace($pattern, $placeholder, $targetTranslation); $id++; }