Skip to content

Commit f98be62

Browse files
committed
Improve localization across settings, remove unused handlers, and streamline provider API key placeholders
- translate in common [Fragment] └── apps └── editor └── src ├── i18n │ └── translations │ └── common.ts └── views ├── settings │ └── backend │ └── settings-view-provider.ts └── shared └── actions └── agent ├── create.ts └── pick-agent.ts
1 parent 3d8d2ae commit f98be62

6 files changed

Lines changed: 27 additions & 82 deletions

File tree

‎apps/editor/src/i18n/translations/common.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,24 @@ export const translations = {
629629
hu: 'Ügynökök',
630630
bg: 'Агенти'
631631
},
632+
'common.placeholder.select-agent': {
633+
en: 'Select agent',
634+
pl: 'Wybierz agenta',
635+
'zh-cn': '选择智能体',
636+
ja: 'エージェントを選択',
637+
'zh-tw': '選擇智能體',
638+
de: 'Agenten auswählen',
639+
es: 'Seleccionar agente',
640+
fr: 'Sélectionner un agent',
641+
'pt-br': 'Selecionar agente',
642+
ru: 'Выберите агента',
643+
ko: '에이전트 선택',
644+
it: 'Seleziona agente',
645+
tr: 'Aracı seç',
646+
cs: 'Vybrat agenta',
647+
hu: 'Ügynök kiválasztása',
648+
bg: 'Изберете агент'
649+
},
632650
'common.select-parent-folder': {
633651
en: 'Select Parent Folder...',
634652
pl: 'Wybierz folder nadrzędny...',

‎apps/editor/src/views/prompt/backend/message-handlers/handle-pick-agent.ts‎

Lines changed: 0 additions & 53 deletions
This file was deleted.

‎apps/editor/src/views/prompt/backend/message-handlers/index.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,3 @@ export * from './handle-update-cli-configuration'
7777
export * from './handle-delete-cli-configuration'
7878
export * from './handle-reorder-cli-configurations'
7979
export * from './handle-toggle-pinned-cli-configuration'
80-
export * from './handle-pick-agent'

‎apps/editor/src/views/settings/backend/settings-view-provider.ts‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import { webview_html } from '@/views/shared/utils/webview-html'
6161
import { CHATBOTS } from '@shared/constants/chatbots'
6262
import { config_cli_configuration_to_ui_format } from '@/utils/cli-configuration-format-converters'
6363
import { AGENTS } from '@/constants/agents'
64+
import { t } from '@/i18n'
6465

6566
export class SettingsViewProvider {
6667
private _webview_panel: vscode.WebviewPanel | undefined
@@ -341,12 +342,12 @@ export class SettingsViewProvider {
341342
vscode.QuickPickItem & { cli_configuration_name: string }
342343
>()
343344
quick_pick.items = items
344-
quick_pick.title = 'Select default agent'
345-
quick_pick.placeholder = 'Select agent'
345+
quick_pick.title = t('common.title.agents')
346+
quick_pick.placeholder = t('common.placeholder.select-agent')
346347

347348
const close_button: vscode.QuickInputButton = {
348349
iconPath: new vscode.ThemeIcon('close'),
349-
tooltip: 'Close'
350+
tooltip: t('common.close')
350351
}
351352
quick_pick.buttons = [close_button]
352353

@@ -363,8 +364,8 @@ export class SettingsViewProvider {
363364
if (selected) {
364365
const updated = agent_configs.map((c) => {
365366
const new_c = { ...c }
366-
if (message.cli_feature === 'agentic-search') {
367-
if (c.name === selected.cli_configuration_name) {
367+
if (message.cli_feature == 'agentic-search') {
368+
if (c.name == selected.cli_configuration_name) {
368369
new_c.isDefaultForAgenticSearch = true
369370
} else {
370371
delete new_c.isDefaultForAgenticSearch

‎apps/editor/src/views/settings/frontend/forms/EditProviderForm/EditProviderForm.tsx‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,9 @@ export const EditProviderForm: React.FC<Props> = (props) => {
9696
if (val) set_is_api_key_cleared(false)
9797
}}
9898
placeholder={
99-
is_api_key_cleared
100-
? t('edit-provider-form.api-key.placeholder.cleared')
101-
: props.provider.api_key_mask
102-
? `...${props.provider.api_key_mask.slice(-4)}`
103-
: t('edit-provider-form.api-key.placeholder.default')
99+
is_api_key_cleared || !props.provider.api_key_mask
100+
? t('edit-provider-form.api-key.placeholder.default')
101+
: `...${props.provider.api_key_mask.slice(-4)}`
104102
}
105103
/>
106104
</UiField>

‎apps/editor/src/views/settings/frontend/i18n/translations/edit-provider-form.ts‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,24 +107,6 @@ export const translations = {
107107
hu: 'Törlés',
108108
bg: 'Изчистване'
109109
},
110-
'edit-provider-form.api-key.placeholder.cleared': {
111-
en: 'API Key cleared',
112-
pl: 'Klucz API wyczyszczony',
113-
'zh-cn': 'API 密钥已清除',
114-
ja: 'API キーがクリアされました',
115-
'zh-tw': 'API 金鑰已清除',
116-
de: 'API-Schlüssel gelöscht',
117-
es: 'Clave API borrada',
118-
fr: 'Clé API effacée',
119-
'pt-br': 'Chave API apagada',
120-
ru: 'API-ключ очищен',
121-
ko: 'API 키 지워짐',
122-
it: 'Chiave API cancellata',
123-
tr: 'API Anahtarı temizlendi',
124-
cs: 'Klíč API vymazán',
125-
hu: 'API Kulcs törölve',
126-
bg: 'API ключът е изчистен'
127-
},
128110
'edit-provider-form.api-key.placeholder.default': {
129111
en: 'Enter API Key',
130112
pl: 'Wprowadź klucz API',

0 commit comments

Comments
 (0)