chore: update TODO for locales

This commit is contained in:
jialin
2025-03-04 19:18:13 +08:00
parent f3bdb03cae
commit 4c5eb721fb
2 changed files with 14 additions and 9 deletions
+8 -4
View File
@@ -25,19 +25,23 @@ To add a new language configuration, follow these steps:
- Open the `.ts` file in the **new directory**. - Open the `.ts` file in the **new directory**.
- For each key-value pair: - For each key-value pair:
- If a translation is available, replace the value with the translated text. - 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 "<original-key>"`.
- This ensures that the key is visible for contributors to know exactly what needs to be translated.
**Example:** **Example:**
```ts ```ts
export default { export default {
welcome_message: 'TODO: Translate me', 'playground.image.mask.upload':
logout_button: 'TODO: Translate me' '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** ## 4. **Finalize the Configuration**
- Review and ensure all translations are complete. - 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! - Your new language configuration is now ready for use!
+6 -5
View File
@@ -138,9 +138,10 @@ export default {
'playground.image.fitview': 'Подогнать размер', 'playground.image.fitview': 'Подогнать размер',
'playground.chat.aithought': 'Рассуждение (CoT)', 'playground.chat.aithought': 'Рассуждение (CoT)',
'playground.image.mask.uploaded': 'Маска загружена', 'playground.image.mask.uploaded': 'Маска загружена',
'playground.image.mask.upload': 'TODO: Translate me', 'playground.image.mask.upload':
'playground.params.frequency_penalty.tips': `TODO: Translate me`, 'TODO: Translate key "playground.image.mask.upload"',
'playground.params.presence_penalty.tips': `TODO: Translate me`, 'playground.params.frequency_penalty.tips': `TODO: Translate key "playground.params.frequency_penalty.tips"`,
'playground.image.origin': 'TODO: Translate me', 'playground.params.presence_penalty.tips': `TODO: Translate key "playground.params.presence_penalty.tips"`,
'playground.image.mask': 'TODO: Translate me' 'playground.image.origin': 'TODO: Translate key "playground.image.origin"',
'playground.image.mask': 'TODO: Translate key "playground.image.mask"'
}; };