Skip to content

Commit a781309

Browse files
author
baiqing
committed
Merge pull request #124 from Cooper-X-Oak/codex/volcengine-asr-field-mapping
fix(settings): clarify Volcengine ASR credential mapping 火山 ASR credential 字段命名统一:App Key/Access Key/Resource ID → 用 volcengine* 前缀的 i18n key 标明对应 APP ID/Access Token/Resource ID, 加 mappingNote 一行说明 Secret Key 当前不需要、Resource ID 默认值。 Settings.tsx 冲突解决:保留 #124 的多行 JSX + volcengine* key 写法 (main 上 #122 加的 appIdLabel 等老 key 留着不删,避免影响其他引用)。
2 parents 949c511 + 46134eb commit a781309

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

openless-all/app/src/i18n/en.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ export const en: typeof zhCN = {
285285
asrSiliconflow: 'SiliconFlow SenseVoice',
286286
asrWhisper: 'OpenAI Whisper (compatible)',
287287
},
288+
volcengineAppKeyLabel: 'APP ID',
289+
volcengineAccessKeyLabel: 'Access Token',
290+
volcengineResourceIdLabel: 'Resource ID',
291+
volcengineMappingNote: 'Secret Key is not required right now. Resource ID defaults to volc.bigasr.sauc.duration.',
288292
fillDefault: 'Fill default value',
289293
readFailed: 'Read failed',
290294
apiKeyLabel: 'API Key',

openless-all/app/src/i18n/zh-CN.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ export const zhCN = {
283283
asrSiliconflow: '硅基流动 SenseVoice',
284284
asrWhisper: 'OpenAI Whisper(兼容)',
285285
},
286+
volcengineAppKeyLabel: 'APP ID',
287+
volcengineAccessKeyLabel: 'Access Token',
288+
volcengineResourceIdLabel: 'Resource ID',
289+
volcengineMappingNote: 'Secret Key 当前无需填写。Resource ID 默认使用 volc.bigasr.sauc.duration。',
286290
fillDefault: '填入默认值',
287291
readFailed: '读取失败',
288292
apiKeyLabel: 'API 密钥',

openless-all/app/src/pages/Settings.tsx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,29 @@ function ProvidersSection() {
369369
</SettingRow>
370370
{asrProvider === 'volcengine' ? (
371371
<>
372-
<CredentialField key={`${asrProvider}:app_key`} label={t('settings.providers.appIdLabel')} account="volcengine.app_key" mono mask />
373-
<CredentialField key={`${asrProvider}:access_key`} label={t('settings.providers.accessKeyLabel')} account="volcengine.access_key" mono mask />
374-
<CredentialField key={`${asrProvider}:resource_id`} label={t('settings.providers.resourceIdLabel')} account="volcengine.resource_id" mono
372+
<CredentialField
373+
key={`${asrProvider}:app_key`}
374+
label={t('settings.providers.volcengineAppKeyLabel')}
375+
account="volcengine.app_key"
376+
mono
377+
mask
378+
/>
379+
<CredentialField
380+
key={`${asrProvider}:access_key`}
381+
label={t('settings.providers.volcengineAccessKeyLabel')}
382+
account="volcengine.access_key"
383+
mono
384+
mask
385+
/>
386+
<CredentialField
387+
key={`${asrProvider}:resource_id`}
388+
label={t('settings.providers.volcengineResourceIdLabel')}
389+
account="volcengine.resource_id"
390+
mono
375391
placeholder={ASR_DEFAULT_RESOURCE_ID} defaultValue={ASR_DEFAULT_RESOURCE_ID} />
392+
<div style={{ marginTop: 2, fontSize: 11.5, color: 'var(--ol-ink-4)', lineHeight: 1.6 }}>
393+
{t('settings.providers.volcengineMappingNote')}
394+
</div>
376395
</>
377396
) : (
378397
<>

0 commit comments

Comments
 (0)