From 0255424bc0b938a05e8e569982453820b06dc721 Mon Sep 17 00:00:00 2001 From: Cyber-Syntax <115875369+Cyber-Syntax@users.noreply.github.com> Date: Sat, 13 Sep 2025 11:37:49 +0300 Subject: [PATCH 1/2] feat: add missing Turkish translations --- src/assets/i18n/tr.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/assets/i18n/tr.json b/src/assets/i18n/tr.json index 9703afcc8..ab130a62e 100644 --- a/src/assets/i18n/tr.json +++ b/src/assets/i18n/tr.json @@ -24,6 +24,11 @@ "UPDATE_MAIN_MODEL_NO_UPDATE": "Hiçbir model güncellemesi seçilmedi. Model yükseltmesini gerçekleştirmek istemiyorsanız, son sürüme geçmek zorunda olduğunuzu lütfen unutmayın.", "UPDATE_WEB_APP": "Yeni sürüm mevcut. Yeni Sürüm Yüklensin Mi?" }, + "BN": { + "SHOW_ISSUE_PANEL": "Sorun Panelini Göster", + "SHOW_NOTES": "Proje Notlarını Göster", + "SHOW_TASK_VIEW_CUSTOMIZER_PANEL": "Filtre/Grup/Sırala Panelini Göster" + }, "BL": { "NO_TASKS": "Birikmiş işler günlüğünüzde şu anda görev yok" }, @@ -126,7 +131,7 @@ "ASSIGNEE": "Atanan", "AT": "üzerinde", "ATTACHMENTS": "Ekler", - "CHANGED": "Değiştirildi", + "CHANGED": "değiştirildi", "COMMENTS": "Yorumlar", "COMPONENTS": "Bileşenler", "DESCRIPTION": "Açıklama", @@ -1398,7 +1403,11 @@ "THURSDAY": "Perşembe", "TITLE": "Görevin Başlığı", "TUESDAY": "Salı", - "WEDNESDAY": "Çarşamba" + "WEDNESDAY": "Çarşamba", + "INHERIT_SUBTASKS": "Alt görevleri devral", + "INHERIT_SUBTASKS_DESCRIPTION": "Etkinleştirildiğinde, en son görev örneğindeki alt görevler tekrarlayan görevle birlikte yeniden oluşturulur", + "DISABLE_AUTO_UPDATE_SUBTASKS": "Alt görevlerin otomatik güncellenmesini devre dışı bırak", + "DISABLE_AUTO_UPDATE_SUBTASKS_DESCRIPTION": "En yeni örnek değiştiğinde devralınan alt görevleri otomatik olarak güncelleme" } }, "TASK_VIEW": { From 81f0a6b22ec6ef5d13e9e08aff7b42cdb360ca1b Mon Sep 17 00:00:00 2001 From: Cyber-Syntax <115875369+Cyber-Syntax@users.noreply.github.com> Date: Sat, 13 Sep 2025 12:30:40 +0300 Subject: [PATCH 2/2] feat: add script to update missing i18n keys from en.json --- tools/add-missing-i18n-variables.js | 94 +++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 tools/add-missing-i18n-variables.js diff --git a/tools/add-missing-i18n-variables.js b/tools/add-missing-i18n-variables.js new file mode 100644 index 000000000..ed539f82d --- /dev/null +++ b/tools/add-missing-i18n-variables.js @@ -0,0 +1,94 @@ +const fs = require('fs'); +const path = require('path'); + +const i18nDir = path.resolve(__dirname, '../src/assets/i18n'); +const enPath = path.join(i18nDir, 'en.json'); + +function mergeInOrder(enObj, langObj) { + if (typeof enObj !== 'object' || enObj === null) return langObj; + const result = Array.isArray(enObj) ? [] : {}; + for (const key of Object.keys(enObj)) { + if ( + typeof enObj[key] === 'object' && + enObj[key] !== null && + !Array.isArray(enObj[key]) + ) { + result[key] = mergeInOrder(enObj[key], langObj && langObj[key] ? langObj[key] : {}); + } else { + result[key] = langObj && key in langObj ? langObj[key] : enObj[key]; + } + } + return result; +} + +if (!fs.existsSync(enPath)) { + console.error('en.json not found in src/assets/i18n/'); + process.exit(1); +} + +if (!fs.existsSync(i18nDir)) { + console.error('i18n directory not found at src/assets/i18n/'); + process.exit(1); +} + +// Read the English reference file +const en = JSON.parse(fs.readFileSync(enPath, 'utf8')); + +// Get all i18n files except en.json +const i18nFiles = fs + .readdirSync(i18nDir) + .filter((file) => file.endsWith('.json') && file !== 'en.json') + .sort(); + +console.log(`Found ${i18nFiles.length} language files to update:`); +console.log(i18nFiles.map((file) => ` - ${file}`).join('\n')); +console.log(''); + +let updatedFiles = 0; +let errors = 0; + +// Process each language file +for (const file of i18nFiles) { + const langPath = path.join(i18nDir, file); + const langCode = file.replace('.json', ''); + + try { + // Read existing language file or create empty object if it doesn't exist + let langObj = {}; + if (fs.existsSync(langPath)) { + const content = fs.readFileSync(langPath, 'utf8'); + if (content.trim()) { + langObj = JSON.parse(content); + } + } + + // Merge with English structure, preserving existing translations + const merged = mergeInOrder(en, langObj); + + // Write the updated file + fs.writeFileSync(langPath, JSON.stringify(merged, null, 2), 'utf8'); + + console.log(`✓ Updated ${file}`); + updatedFiles++; + } catch (error) { + console.error(`✗ Error processing ${file}:`, error.message); + errors++; + } +} + +console.log(''); +console.log(`Summary:`); +console.log(` - Updated files: ${updatedFiles}`); +console.log(` - Errors: ${errors}`); +console.log(` - Total files processed: ${i18nFiles.length}`); + +if (errors === 0) { + console.log(''); + console.log( + 'All language files updated successfully with missing keys in the same order as en.json.', + ); +} else { + console.log(''); + console.log('Some files had errors. Please check the output above.'); + process.exit(1); +}