docs: i18n update

This commit is contained in:
Neko Ayaka
2025-03-19 23:36:57 +08:00
parent 494efe7fb6
commit 6f76310b8c
8 changed files with 121 additions and 46 deletions
@@ -11,6 +11,9 @@ import {
import { useProvidersStore, useSpeechStore } from '@proj-airi/stage-ui/stores'
import { storeToRefs } from 'pinia'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const providerId = 'microsoft-speech'
const defaultModel = 'v1'
@@ -109,8 +112,8 @@ async function handleGenerateSpeech(input: string, voiceId: string, useSSML: boo
<template #basic-settings>
<FieldInput
v-model="region"
label="Region"
description="Speech Service region"
:label="t('settings.pages.providers.provider.microsoft-speech.fields.field.region.label')"
:description="t('settings.pages.providers.provider.microsoft-speech.fields.field.region.description')"
placeholder="eastasia"
required
type="text"
+39 -5
View File
@@ -65,8 +65,6 @@ settings:
title: Map Motions
title: Live2D Settings
microphone: Microphone
model-provider:
title: Model Providers
models: Model
pages:
models:
@@ -122,6 +120,12 @@ settings:
description: Speech synthesis
sections:
section:
playground:
buttons:
stop:
label: Stop
select-voice:
required: Please select a voice
provider-voice-selection:
custom_model_placeholder: Enter custom model name...
custom_voice_placeholder: Enter custom voice ID...
@@ -137,16 +141,26 @@ settings:
show_less: Show less
show_more: Show more
title: Provider
voice-settings:
input-ssml:
placeholder: Enter SSML text...
use-ssml:
description: Enable to input raw SSML instead of plain text
label: Use Custom SSML
title: Speech
title: Modules
x:
description: X / Twitter browsing and usage
title: X / Twitter
vision:
description: Vision
title: Vision
x:
description: X / Twitter browsing and usage
title: X / Twitter
providers:
common:
fields:
field:
api-key:
label: API Key Input
section:
advanced:
fields:
@@ -177,6 +191,20 @@ settings:
api-key:
placeholder: Input Cloudflare Account ID
title: Cloudflare Workers AI
common:
fields:
field:
pitch:
description: >-
Tune the pitch of synthesized speech (e.g., sharper or
coarser)
label: Pitch
speed:
description: Adjust the speed of speech
label: Speed
volume:
description: Adjust the volume of speech
label: Volume
deepseek:
description: deepseek.com
title: DeepSeek
@@ -222,6 +250,12 @@ settings:
fireworks:
description: fireworks.ai
title: Fireworks.ai
microsoft-speech:
fields:
field:
region:
description: Speech Service region
label: Region
mistral:
description: mistral.ai
title: Mistral
+38 -6
View File
@@ -51,8 +51,6 @@ settings:
title: 映射动作
title: Live2D 设置
microphone: 麦克风
model-provider:
title: 模型提供商
models: 模型
pages:
models:
@@ -108,6 +106,12 @@ settings:
description: 语音合成
sections:
section:
playground:
buttons:
stop:
label: 停止
select-voice:
required: 请选择声线
provider-voice-selection:
custom_model_placeholder: 输入指定模型名字...
custom_voice_placeholder: 输入指定声线 ID...
@@ -124,17 +128,27 @@ settings:
search_voices_results: 找到 {count} / {total} 个声线
show_less: 显示更少
show_more: 显示更多
title: 提供商
title: 选择语音合成提供商
voice-settings:
input-ssml:
placeholder: 请输入 SSML 文本
use-ssml:
description: 启用后可以输入原始 SSML 而不是纯文本
label: 选用自定义 SSML
title: 发声
title: 机体模块
x:
description: X / Twitter 的浏览和使用
title: X / Twitter
vision:
description: 视觉
title: 视觉
x:
description: X / Twitter 的浏览和使用
title: X / Twitter
providers:
common:
fields:
field:
api-key:
label: API 密钥
section:
advanced:
fields:
@@ -165,6 +179,18 @@ settings:
api-key:
placeholder: 请输入 Cloudflare Workers AI 的 API Key
title: Workers AI
common:
fields:
field:
pitch:
description: 调节合成语音的音高(比如更尖锐或更粗旷)
label: 音高
speed:
description: 调节说话的语速
label: 语速
volume:
description: 调节语音的响度
label: 响度
deepseek:
description: DeepSeek.com
title: 深度求索 DeepSeek
@@ -210,6 +236,12 @@ settings:
fireworks:
description: Fireworks.ai
title: Fireworks.ai
microsoft-speech:
fields:
field:
region:
description: 服务 Endpoint 地区(比如亚太 eastasia 区域)
label: Endpoint 地区
mistral:
description: mistral.ai
title: Mistral
@@ -28,6 +28,14 @@ const modulesList = computed<Module[]>(() => [
to: '/settings/modules/consciousness',
configured: false,
},
{
id: 'speech',
name: t('settings.pages.modules.speech.title'),
description: t('settings.pages.modules.speech.description'),
icon: 'i-lucide:mic',
to: '/settings/modules/speech',
configured: false,
},
{
id: 'hearing',
name: t('settings.pages.modules.hearing.title'),
@@ -37,21 +45,13 @@ const modulesList = computed<Module[]>(() => [
configured: false,
},
{
id: 'messaging-discord',
name: t('settings.pages.modules.messaging-discord.title'),
description: t('settings.pages.modules.messaging-discord.description'),
icon: 'i-simple-icons:discord',
id: 'vision',
name: t('settings.pages.modules.vision.title'),
description: t('settings.pages.modules.vision.description'),
icon: 'i-lucide:eye',
to: '',
configured: false,
},
{
id: 'speech',
name: t('settings.pages.modules.speech.title'),
description: t('settings.pages.modules.speech.description'),
icon: 'i-lucide:mic',
to: '/settings/modules/speech',
configured: false,
},
{
id: 'memory-short-term',
name: t('settings.pages.modules.memory-short-term.title'),
@@ -69,10 +69,18 @@ const modulesList = computed<Module[]>(() => [
configured: false,
},
{
id: 'vision',
name: t('settings.pages.modules.vision.title'),
description: t('settings.pages.modules.vision.description'),
icon: 'i-lucide:eye',
id: 'messaging-discord',
name: t('settings.pages.modules.messaging-discord.title'),
description: t('settings.pages.modules.messaging-discord.description'),
icon: 'i-simple-icons:discord',
to: '',
configured: false,
},
{
id: 'x',
name: t('settings.pages.modules.x.title'),
description: t('settings.pages.modules.x.description'),
icon: 'i-simple-icons:x',
to: '',
configured: false,
},
@@ -92,14 +100,6 @@ const modulesList = computed<Module[]>(() => [
to: '',
configured: false,
},
{
id: 'x',
name: t('settings.pages.modules.x.title'),
description: t('settings.pages.modules.x.description'),
icon: 'i-simple-icons:x',
to: '',
configured: false,
},
])
</script>
@@ -11,6 +11,9 @@ import {
import { useProvidersStore, useSpeechStore } from '@proj-airi/stage-ui/stores'
import { storeToRefs } from 'pinia'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const providerId = 'microsoft-speech'
const defaultModel = 'v1'
@@ -109,8 +112,8 @@ async function handleGenerateSpeech(input: string, voiceId: string, useSSML: boo
<template #basic-settings>
<FieldInput
v-model="region"
label="Region"
description="Speech Service region"
:label="t('settings.pages.providers.provider.microsoft-speech.fields.field.region.label')"
:description="t('settings.pages.providers.provider.microsoft-speech.fields.field.region.description')"
placeholder="eastasia"
required
type="text"
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import FieldInput from '../Form/Field/FieldInput.vue'
@@ -11,6 +12,8 @@ const props = defineProps<{
description?: string
}>()
const { t } = useI18n()
const modelValue = defineModel<string>({ required: true })
const computedDescription = computed(() => {
@@ -21,7 +24,7 @@ const computedDescription = computed(() => {
<template>
<FieldInput
v-model="modelValue"
:label="label || 'API Key'"
:label="label || t('settings.pages.providers.common.fields.field.api-key.label')"
:description="computedDescription"
:placeholder="placeholder"
:required="required"
@@ -60,7 +60,7 @@ const { t } = useI18n()
const effectiveTitle = computed(() => props.title || props.providerName || '')
// Compute effective category label
const effectiveCategoryLabel = computed(() => props.categoryLabel || t('common.provider'))
const effectiveCategoryLabel = computed(() => props.categoryLabel || t('settings.pages.providers.title'))
// Handle back button click
function handleBackClick() {
@@ -130,8 +130,8 @@ defineExpose({
<div flex="~ col gap-4">
<FieldCheckbox
v-model="useSSML"
label="Use Custom SSML"
description="Enable to input raw SSML instead of plain text"
:label="t('settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label')"
:description="t('settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description')"
/>
<template v-if="!useSSML">
@@ -147,7 +147,7 @@ defineExpose({
<template v-else>
<textarea
v-model="ssmlText"
placeholder="Enter SSML text..."
:placeholder="t('settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder')"
border="neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700"
transition="all duration-250 ease-in-out"
bg="neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"
@@ -218,7 +218,7 @@ defineExpose({
>
<div flex="~ row" items-center gap-2>
<div i-solar:stop-circle-bold-duotone />
<span>Stop</span>
<span>{{ t('settings.pages.modules.speech.sections.section.playground.buttons.stop.label') }}</span>
</div>
</button>
</div>
@@ -227,7 +227,7 @@ defineExpose({
{{ t('settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key') }}
</div>
<div v-if="!selectedVoice" class="mt-2 text-sm text-red-500">
Please select a voice
{{ t('settings.pages.modules.speech.sections.section.playground.select-voice.required') }}
</div>
<div v-if="errorMessage" class="mt-2 text-sm text-red-500">
{{ errorMessage }}