From 4c5eb721fbb042db31e75eaf9205ade7c27f4933 Mon Sep 17 00:00:00 2001 From: jialin Date: Tue, 4 Mar 2025 19:16:59 +0800 Subject: [PATCH] chore: update TODO for locales --- src/locales/README.md | 12 ++++++++---- src/locales/ru-RU/playground.ts | 11 ++++++----- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/locales/README.md b/src/locales/README.md index b4d2b64d..f87b2877 100644 --- a/src/locales/README.md +++ b/src/locales/README.md @@ -25,19 +25,23 @@ To add a new language configuration, follow these steps: - Open the `.ts` file in the **new directory**. - For each key-value pair: - If a translation is available, replace the value with the translated text. - - If no translation is available yet, **replace the value with** `"TODO: Translate me"`. + - If no translation is available yet, **replace the value with** `TODO: Translate key ""`. + - This ensures that the key is visible for contributors to know exactly what needs to be translated. **Example:** ```ts export default { - welcome_message: 'TODO: Translate me', - logout_button: 'TODO: Translate me' + 'playground.image.mask.upload': + 'TODO: Translate key "playground.image.mask.upload"', + 'welcome.message': 'TODO: Translate key "welcome.message"' }; ``` +- **Important**: The `TODO` message should include the original key in quotes so that contributors can easily identify which key needs translation without needing to look at the code itself. + ## 4. **Finalize the Configuration** - Review and ensure all translations are complete. -- If any translations are missing, contributors can later replace `"TODO: Translate me"` with the correct translation. +- If any translations are missing, contributors can later replace `"TODO: Translate key '...'` with the correct translation. - Your new language configuration is now ready for use! diff --git a/src/locales/ru-RU/playground.ts b/src/locales/ru-RU/playground.ts index 265b107f..5ad8317f 100644 --- a/src/locales/ru-RU/playground.ts +++ b/src/locales/ru-RU/playground.ts @@ -138,9 +138,10 @@ export default { 'playground.image.fitview': 'Подогнать размер', 'playground.chat.aithought': 'Рассуждение (CoT)', 'playground.image.mask.uploaded': 'Маска загружена', - 'playground.image.mask.upload': 'TODO: Translate me', - 'playground.params.frequency_penalty.tips': `TODO: Translate me`, - 'playground.params.presence_penalty.tips': `TODO: Translate me`, - 'playground.image.origin': 'TODO: Translate me', - 'playground.image.mask': 'TODO: Translate me' + 'playground.image.mask.upload': + 'TODO: Translate key "playground.image.mask.upload"', + 'playground.params.frequency_penalty.tips': `TODO: Translate key "playground.params.frequency_penalty.tips"`, + 'playground.params.presence_penalty.tips': `TODO: Translate key "playground.params.presence_penalty.tips"`, + 'playground.image.origin': 'TODO: Translate key "playground.image.origin"', + 'playground.image.mask': 'TODO: Translate key "playground.image.mask"' };