chore: add TODO: Translate me in locales
This commit is contained in:
+32
-20
@@ -2,30 +2,42 @@
|
||||
|
||||
To add a new language configuration, follow these steps:
|
||||
|
||||
1. **Duplicate an Existing Language Directory**
|
||||
## 1. **Duplicate an Existing Language Directory**
|
||||
|
||||
- Choose any existing language directory that you are familiar with, and duplicate it.
|
||||
- Name the new directory according to the `lang` attribute specified in `lang-config-map.tsx`.
|
||||
- Choose any existing language directory that you are familiar with, and duplicate it.
|
||||
- Name the new directory according to the `lang` attribute specified in `lang-config-map.tsx`.
|
||||
|
||||
2. **Create a New `.ts` File in the Current Directory**
|
||||
## 2. **Create a New `.ts` File in the Current Directory**
|
||||
|
||||
- In the `locales` directory, create a `.ts` file named to align with the new directory.
|
||||
- Copy the contents of the `en-US.ts` file into this new `.ts` file.
|
||||
- Update the following line to match your new language directory:
|
||||
```ts
|
||||
const requireContext = require.context(
|
||||
`./{new-language-directory}`,
|
||||
false,
|
||||
/\.ts$/
|
||||
);
|
||||
```
|
||||
- In the `locales` directory, create a `.ts` file named to align with the new directory.
|
||||
- Copy the contents of the `en-US.ts` file into this new `.ts` file.
|
||||
- Update the following line to match your new language directory:
|
||||
```ts
|
||||
const requireContext = require.context(
|
||||
`./{new-language-directory}`,
|
||||
false,
|
||||
/\.ts$/
|
||||
);
|
||||
```
|
||||
|
||||
3. **Translate Each Attribute Value**
|
||||
## 3. **Translate Each Attribute Value**
|
||||
|
||||
- Open the `.ts` file in the **new directory**.
|
||||
- Translate the value of each key into your target language.
|
||||
- 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"`.
|
||||
|
||||
4. **Finalize the Configuration**
|
||||
**Example:**
|
||||
|
||||
- Review and ensure all translations are complete.
|
||||
- Your new language configuration is now ready for use!
|
||||
```ts
|
||||
export default {
|
||||
welcome_message: 'TODO: Translate me',
|
||||
logout_button: 'TODO: Translate me'
|
||||
};
|
||||
```
|
||||
|
||||
## 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.
|
||||
- Your new language configuration is now ready for use!
|
||||
|
||||
@@ -81,16 +81,14 @@ export default {
|
||||
'playground.audio.texttospeech': 'Текст в речь',
|
||||
'playground.audio.speechtotext': 'Речь в текст',
|
||||
'playground.audio.texttospeech.tips': 'Здесь появится сгенерированная речь',
|
||||
'playground.audio.speechtotext.tips':
|
||||
'Загрузите аудио или начните запись',
|
||||
'playground.audio.speechtotext.tips': 'Загрузите аудио или начните запись',
|
||||
'playground.audio.enablemic':
|
||||
'Разрешите доступ к микрофону в настройках браузера.',
|
||||
'playground.audio.enablemic.doc': 'Инструкция',
|
||||
'playground.audio.startrecord': 'Начать запись',
|
||||
'playground.audio.stoprecord': 'Остановить запись',
|
||||
'playground.audio.generating.tips': 'Здесь появится распознанный текст',
|
||||
'playground.audio.uploadfile.tips':
|
||||
'Поддерживаемые форматы: {formats}',
|
||||
'playground.audio.uploadfile.tips': 'Поддерживаемые форматы: {formats}',
|
||||
'playground.input.multiplePaste': 'Пакетный ввод',
|
||||
'playground.input.multiplePaste.tips':
|
||||
'Многострочный текст будет автоматически разделён на отдельные записи.',
|
||||
@@ -127,8 +125,7 @@ export default {
|
||||
'playground.documents.verify.rerank': 'Документы не могут быть пустыми.',
|
||||
'playground.image.guidance.tip':
|
||||
'Уровень контроля: влияет на качество и разнообразие изображений.',
|
||||
'playground.image.cfg_scale.tip':
|
||||
'Уровень соответствия промпту.',
|
||||
'playground.image.cfg_scale.tip': 'Уровень соответствия промпту.',
|
||||
'playground.image.strength.tip':
|
||||
'Чем выше значение — тем сильнее изменения исходного изображения.',
|
||||
'playground.image.edit.tips': 'Перетащите изображение для загрузки',
|
||||
@@ -141,5 +138,9 @@ export default {
|
||||
'playground.image.fitview': 'Подогнать размер',
|
||||
'playground.chat.aithought': 'Рассуждение (CoT)',
|
||||
'playground.image.mask.uploaded': 'Маска загружена',
|
||||
'playground.image.mask.upload': 'Загрузить маску'
|
||||
'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'
|
||||
};
|
||||
|
||||
@@ -584,6 +584,10 @@ const options = [
|
||||
{
|
||||
label: '--image-free-compute-memory-immediately',
|
||||
value: '--image-free-compute-memory-immediately'
|
||||
},
|
||||
{
|
||||
label: '--jinja',
|
||||
value: '--jinja'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user