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:
|
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.
|
- 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`.
|
- 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.
|
- 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.
|
- Copy the contents of the `en-US.ts` file into this new `.ts` file.
|
||||||
- Update the following line to match your new language directory:
|
- Update the following line to match your new language directory:
|
||||||
```ts
|
```ts
|
||||||
const requireContext = require.context(
|
const requireContext = require.context(
|
||||||
`./{new-language-directory}`,
|
`./{new-language-directory}`,
|
||||||
false,
|
false,
|
||||||
/\.ts$/
|
/\.ts$/
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
3. **Translate Each Attribute Value**
|
## 3. **Translate Each Attribute Value**
|
||||||
|
|
||||||
- Open the `.ts` file in the **new directory**.
|
- Open the `.ts` file in the **new directory**.
|
||||||
- Translate the value of each key into your target language.
|
- 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.
|
```ts
|
||||||
- Your new language configuration is now ready for use!
|
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.texttospeech': 'Текст в речь',
|
||||||
'playground.audio.speechtotext': 'Речь в текст',
|
'playground.audio.speechtotext': 'Речь в текст',
|
||||||
'playground.audio.texttospeech.tips': 'Здесь появится сгенерированная речь',
|
'playground.audio.texttospeech.tips': 'Здесь появится сгенерированная речь',
|
||||||
'playground.audio.speechtotext.tips':
|
'playground.audio.speechtotext.tips': 'Загрузите аудио или начните запись',
|
||||||
'Загрузите аудио или начните запись',
|
|
||||||
'playground.audio.enablemic':
|
'playground.audio.enablemic':
|
||||||
'Разрешите доступ к микрофону в настройках браузера.',
|
'Разрешите доступ к микрофону в настройках браузера.',
|
||||||
'playground.audio.enablemic.doc': 'Инструкция',
|
'playground.audio.enablemic.doc': 'Инструкция',
|
||||||
'playground.audio.startrecord': 'Начать запись',
|
'playground.audio.startrecord': 'Начать запись',
|
||||||
'playground.audio.stoprecord': 'Остановить запись',
|
'playground.audio.stoprecord': 'Остановить запись',
|
||||||
'playground.audio.generating.tips': 'Здесь появится распознанный текст',
|
'playground.audio.generating.tips': 'Здесь появится распознанный текст',
|
||||||
'playground.audio.uploadfile.tips':
|
'playground.audio.uploadfile.tips': 'Поддерживаемые форматы: {formats}',
|
||||||
'Поддерживаемые форматы: {formats}',
|
|
||||||
'playground.input.multiplePaste': 'Пакетный ввод',
|
'playground.input.multiplePaste': 'Пакетный ввод',
|
||||||
'playground.input.multiplePaste.tips':
|
'playground.input.multiplePaste.tips':
|
||||||
'Многострочный текст будет автоматически разделён на отдельные записи.',
|
'Многострочный текст будет автоматически разделён на отдельные записи.',
|
||||||
@@ -127,8 +125,7 @@ export default {
|
|||||||
'playground.documents.verify.rerank': 'Документы не могут быть пустыми.',
|
'playground.documents.verify.rerank': 'Документы не могут быть пустыми.',
|
||||||
'playground.image.guidance.tip':
|
'playground.image.guidance.tip':
|
||||||
'Уровень контроля: влияет на качество и разнообразие изображений.',
|
'Уровень контроля: влияет на качество и разнообразие изображений.',
|
||||||
'playground.image.cfg_scale.tip':
|
'playground.image.cfg_scale.tip': 'Уровень соответствия промпту.',
|
||||||
'Уровень соответствия промпту.',
|
|
||||||
'playground.image.strength.tip':
|
'playground.image.strength.tip':
|
||||||
'Чем выше значение — тем сильнее изменения исходного изображения.',
|
'Чем выше значение — тем сильнее изменения исходного изображения.',
|
||||||
'playground.image.edit.tips': 'Перетащите изображение для загрузки',
|
'playground.image.edit.tips': 'Перетащите изображение для загрузки',
|
||||||
@@ -141,5 +138,9 @@ 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': 'Загрузить маску'
|
'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',
|
label: '--image-free-compute-memory-immediately',
|
||||||
value: '--image-free-compute-memory-immediately'
|
value: '--image-free-compute-memory-immediately'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '--jinja',
|
||||||
|
value: '--jinja'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user