Skip to content

Commit f71b47f

Browse files
committed
Localize no saved contexts found message
- move NO_SAVED_CONTEXTS_FOUND to i18n ├── apps │ └── editor │ └── src │ ├── i18n │ │ ├── index.ts │ │ └── translations │ │ └── views │ │ └── prompt │ │ └── handlers │ │ └── hash-sign.ts │ └── views │ └── prompt │ └── backend │ └── message-handlers │ └── handle-hash-sign-quick-pick │ └── symbols │ └── saved-context-symbol.ts └── packages └── shared └── src └── constants └── dictionary.ts
1 parent 3d81c0c commit f71b47f

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

‎apps/editor/src/i18n/translations/views/prompt/handlers/hash-sign.ts‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,24 @@ export const translations = {
3434
cs: 'V repozitáři nebyly nalezeny žádné další větve k porovnání.',
3535
hu: 'Nem találhatók más ágak a tárolóban az összehasonlításhoz.',
3636
bg: 'Няма намерени други клонове в хранилището за сравнение.'
37-
}
37+
},
38+
'views.prompt.handlers.hash-sign.saved-context-symbol.no-saved-contexts-found':
39+
{
40+
en: 'No saved contexts found.',
41+
pl: 'Nie znaleziono zapisanych kontekstów.',
42+
'zh-cn': '未找到保存的上下文。',
43+
ja: '保存されたコンテキストが見つかりません。',
44+
'zh-tw': '未找到儲存的上下文。',
45+
de: 'Keine gespeicherten Kontexte gefunden.',
46+
es: 'No se encontraron contextos guardados.',
47+
fr: 'Aucun contexte enregistré trouvé.',
48+
'pt-br': 'Nenhum contexto salvo encontrado.',
49+
ru: 'Сохраненные контексты не найдены.',
50+
ko: '저장된 컨텍스트를 찾을 수 없습니다.',
51+
it: 'Nessun contesto salvato trovato.',
52+
tr: 'Kaydedilmiş bağlam bulunamadı.',
53+
cs: 'Nebyly nalezeny žádné uložené kontexty.',
54+
hu: 'Nem találhatók mentett kontextusok.',
55+
bg: 'Няма намерени запазени контексти.'
56+
}
3857
} as const

‎apps/editor/src/views/prompt/backend/message-handlers/handle-hash-sign-quick-pick/symbols/saved-context-symbol.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as vscode from 'vscode'
22
import * as path from 'path'
33
import { dictionary } from '@shared/constants/dictionary'
4+
import { t } from '@/i18n'
45
import {
56
load_and_merge_global_contexts,
67
load_and_merge_file_contexts
@@ -46,7 +47,9 @@ export const handle_saved_context_item = async (
4647

4748
if (source_options.length == 0) {
4849
vscode.window.showInformationMessage(
49-
dictionary.information_message.NO_SAVED_CONTEXTS_FOUND
50+
t(
51+
'views.prompt.handlers.hash-sign.saved-context-symbol.no-saved-contexts-found'
52+
)
5053
)
5154
return 'continue'
5255
}

‎packages/shared/src/constants/dictionary.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
export const dictionary = {
22
information_message: {
3-
NO_SAVED_CONTEXTS_FOUND: 'No saved contexts found.',
43
NO_CHANGES_TO_COMMIT: 'No changes to commit.',
54
MODELS_ROUTE_NOT_FOUND: (provider_name: string) =>
65
`The '/models' route was not found for ${provider_name}. This might mean the provider does not support listing models.`,

0 commit comments

Comments
 (0)