Skip to content

Commit 8f7df31

Browse files
committed
Relocate imported files translation keys to command namespace
- command-specific translations should be stored in `apps/editor/src/i18n/translations/commands` └── apps └── editor └── src ├── commands │ └── select-imported-files-commands │ ├── index.ts │ ├── select-imported-files-commands.ts │ └── utils │ ├── is-valid-uri.ts │ └── prompt-for-imported-files.ts └── i18n └── translations └── commands ├── index.ts └── select-imported-files.ts
1 parent a3daf6e commit 8f7df31

4 files changed

Lines changed: 194 additions & 196 deletions

File tree

‎apps/editor/src/commands/select-imported-files-commands/utils/prompt-for-imported-files.ts‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const prompt_for_imported_files = async (params: {
3434
await vscode.window.withProgress(
3535
{
3636
location: vscode.ProgressLocation.Notification,
37-
title: t('feature.imported-files.processing'),
37+
title: t('command.select-imported-files.processing'),
3838
cancellable: true
3939
},
4040
async (progress, token) => {
@@ -109,7 +109,7 @@ export const prompt_for_imported_files = async (params: {
109109

110110
const deep_search_button = {
111111
iconPath: new vscode.ThemeIcon('telescope'),
112-
tooltip: t('feature.imported-files.deep-search')
112+
tooltip: t('command.select-imported-files.deep-search')
113113
}
114114

115115
type ImportQuickPickItem = vscode.QuickPickItem & {
@@ -181,7 +181,9 @@ export const prompt_for_imported_files = async (params: {
181181
)
182182

183183
if (valid_immediate.length == 0 && valid_recursive.length == 0) {
184-
vscode.window.showInformationMessage(t('feature.imported-files.no-files'))
184+
vscode.window.showInformationMessage(
185+
t('command.select-imported-files.no-files')
186+
)
185187
return undefined
186188
}
187189

@@ -190,7 +192,7 @@ export const prompt_for_imported_files = async (params: {
190192
if (valid_immediate.length > 0) {
191193
if (valid_recursive.length > 0) {
192194
quick_pick_items.push({
193-
label: t('feature.imported-files.immediate'),
195+
label: t('command.select-imported-files.immediate'),
194196
kind: vscode.QuickPickItemKind.Separator
195197
})
196198
}
@@ -200,7 +202,7 @@ export const prompt_for_imported_files = async (params: {
200202

201203
if (valid_recursive.length > 0) {
202204
quick_pick_items.push({
203-
label: t('feature.imported-files.recursive'),
205+
label: t('command.select-imported-files.recursive'),
204206
kind: vscode.QuickPickItemKind.Separator
205207
})
206208
const recursive_items = await map_to_quick_pick(valid_recursive)
@@ -232,9 +234,9 @@ export const prompt_for_imported_files = async (params: {
232234
quick_pick.selectedItems = current_selected_items
233235
quick_pick.canSelectMany = true
234236
quick_pick.matchOnDescription = true
235-
quick_pick.title = t('feature.imported-files.title')
237+
quick_pick.title = t('command.select-imported-files.title')
236238

237-
const base_placeholder = t('feature.imported-files.placeholder')
239+
const base_placeholder = t('command.select-imported-files.placeholder')
238240
const update_title = () => {
239241
const total = quick_pick.selectedItems.reduce(
240242
(sum, item) => sum + ((item as any).token_count || 0),
@@ -317,7 +319,7 @@ export const prompt_for_imported_files = async (params: {
317319
await vscode.window.showTextDocument(doc, { preview: true })
318320
} catch (error) {
319321
vscode.window.showErrorMessage(
320-
t('feature.imported-files.error-opening', {
322+
t('command.select-imported-files.error-opening', {
321323
error: String(error)
322324
})
323325
)
@@ -389,7 +391,7 @@ export const prompt_for_imported_files = async (params: {
389391
await vscode.window.withProgress(
390392
{
391393
location: vscode.ProgressLocation.Notification,
392-
title: t('feature.imported-files.processing-recursive'),
394+
title: t('command.select-imported-files.processing-recursive'),
393395
cancellable: true
394396
},
395397
async (progress, token) => {

‎apps/editor/src/i18n/translations/commands/select-imported-files.ts‎

Lines changed: 183 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,195 @@
11
export const translations = {
2+
'command.select-imported-files.processing': {
3+
en: 'Processing imports...',
4+
pl: 'Przetwarzanie importów...',
5+
'zh-cn': '正在处理导入...',
6+
ja: 'インポートを処理中...',
7+
'zh-tw': '正在處理匯入...',
8+
de: 'Importe werden verarbeitet...',
9+
es: 'Procesando importaciones...',
10+
fr: 'Traitement des importations...',
11+
'pt-br': 'Processando importações...',
12+
ru: 'Обработка импортов...',
13+
ko: '가져오기 처리 중...',
14+
it: 'Elaborazione delle importazioni...',
15+
tr: 'İçe aktarmalar işleniyor...',
16+
cs: 'Zpracování importů...',
17+
hu: 'Importálások feldolgozása...',
18+
bg: 'Обработка на импортиранията...'
19+
},
20+
'command.select-imported-files.deep-search': {
21+
en: 'Deep Search Imports',
22+
pl: 'Głębokie wyszukiwanie importów',
23+
'zh-cn': '深度搜索导入',
24+
ja: 'インポートのディープ検索',
25+
'zh-tw': '深度搜尋匯入',
26+
de: 'Tiefensuche für Importe',
27+
es: 'Búsqueda profunda de importaciones',
28+
fr: 'Recherche approfondie des importations',
29+
'pt-br': 'Pesquisa profunda de importações',
30+
ru: 'Глубокий поиск импортов',
31+
ko: '가져오기 심층 검색',
32+
it: 'Ricerca approfondita delle importazioni',
33+
tr: 'Derin Arama İçe Aktarmaları',
34+
cs: 'Hloubkové vyhledávání importů',
35+
hu: 'Importálások mélyreható keresése',
36+
bg: 'Дълбоко търсене на импортирания'
37+
},
38+
'command.select-imported-files.immediate': {
39+
en: 'immediate',
40+
pl: 'bezpośrednie',
41+
'zh-cn': '直接',
42+
ja: '直接',
43+
'zh-tw': '直接',
44+
de: 'direkt',
45+
es: 'directo',
46+
fr: 'direct',
47+
'pt-br': 'direto',
48+
ru: 'прямые',
49+
ko: '직접',
50+
it: 'diretto',
51+
tr: 'doğrudan',
52+
cs: 'přímé',
53+
hu: 'közvetlen',
54+
bg: 'преки'
55+
},
56+
'command.select-imported-files.recursive': {
57+
en: 'recursive',
58+
pl: 'rekurencyjne',
59+
'zh-cn': '递归',
60+
ja: '再帰的',
61+
'zh-tw': '遞迴',
62+
de: 'rekursiv',
63+
es: 'recursivo',
64+
fr: 'récursif',
65+
'pt-br': 'recursivo',
66+
ru: 'рекурсивные',
67+
ko: '재귀적',
68+
it: 'ricorsivo',
69+
tr: 'yinelemeli',
70+
cs: 'rekurzivní',
71+
hu: 'rekurzív',
72+
bg: 'рекурсивни'
73+
},
74+
'command.select-imported-files.placeholder-tokens': {
75+
en: 'Select imported files ({tokens})',
76+
pl: 'Wybierz importowane pliki ({tokens})',
77+
'zh-cn': '选择导入的文件 ({tokens})',
78+
ja: 'インポートされたファイルを選択 ({tokens})',
79+
'zh-tw': '選擇匯入的檔案 ({tokens})',
80+
de: 'Importierte Dateien auswählen ({tokens})',
81+
es: 'Seleccionar archivos importados ({tokens})',
82+
fr: 'Sélectionnez les fichiers importés ({tokens})',
83+
'pt-br': 'Selecionar arquivos importados ({tokens})',
84+
ru: 'Выберите импортированные файлы ({tokens})',
85+
ko: '가져온 파일 선택 ({tokens})',
86+
it: 'Seleziona file importati ({tokens})',
87+
tr: 'İçe aktarılan dosyaları seçin ({tokens})',
88+
cs: 'Vyberte importované soubory ({tokens})',
89+
hu: 'Importált fájlok kiválasztása ({tokens})',
90+
bg: 'Изберете импортираните файлове ({tokens})'
91+
},
92+
'command.select-imported-files.placeholder': {
93+
en: 'Select imported files',
94+
pl: 'Wybierz importowane pliki',
95+
'zh-cn': '选择导入的文件',
96+
ja: 'インポートされたファイルを選択',
97+
'zh-tw': '選擇匯入的檔案',
98+
de: 'Importierte Dateien auswählen',
99+
es: 'Seleccionar archivos importados',
100+
fr: 'Sélectionnez les fichiers importés',
101+
'pt-br': 'Selecionar arquivos importados',
102+
ru: 'Выберите импортированные файлы',
103+
ko: '가져온 파일 선택',
104+
it: 'Seleziona i file importati',
105+
tr: 'İçe aktarılan dosyaları seçin',
106+
cs: 'Vyberte importované soubory',
107+
hu: 'Importált fájlok kiválasztása',
108+
bg: 'Изберете импортираните файлове'
109+
},
110+
'command.select-imported-files.title': {
111+
en: 'Imported Files',
112+
pl: 'Importowane pliki',
113+
'zh-cn': '导入的文件',
114+
ja: 'インポートされたファイル',
115+
'zh-tw': '匯入的檔案',
116+
de: 'Importierte Dateien',
117+
es: 'Archivos importados',
118+
fr: 'Fichiers importés',
119+
'pt-br': 'Arquivos importados',
120+
ru: 'Импортированные файлы',
121+
ko: '가져온 파일',
122+
it: 'File importati',
123+
tr: 'İçe Aktarılan Dosyalar',
124+
cs: 'Importované soubory',
125+
hu: 'Importált fájlok',
126+
bg: 'Импортирани файлове'
127+
},
128+
'command.select-imported-files.error-opening': {
129+
en: 'Error opening file: {error}',
130+
pl: 'Błąd otwierania pliku: {error}',
131+
'zh-cn': '打开文件出错:{error}',
132+
ja: 'ファイルを開く際のエラー: {error}',
133+
'zh-tw': '開啟檔案出錯:{error}',
134+
de: 'Fehler beim Öffnen der Datei: {error}',
135+
es: 'Error al abrir el archivo: {error}',
136+
fr: 'Erreur lors de l’ouverture du fichier : {error}',
137+
'pt-br': 'Erro ao abrir arquivo: {error}',
138+
ru: 'Ошибка открытия файла: {error}',
139+
ko: '파일 열기 오류: {error}',
140+
it: 'Errore durante l’apertura del file: {error}',
141+
tr: 'Dosya açma hatası: {error}',
142+
cs: 'Chyba při otevírání souboru: {error}',
143+
hu: 'Hiba a fájl megnyitásakor: {error}',
144+
bg: 'Грешка при отваряне на файл: {error}'
145+
},
146+
'command.select-imported-files.no-files': {
147+
en: 'No imports found.',
148+
pl: 'Nie znaleziono importów.',
149+
'zh-cn': '未找到导入。',
150+
ja: 'インポートが見つかりません。',
151+
'zh-tw': '找不到匯入。',
152+
de: 'Keine Importe gefunden.',
153+
es: 'No se encontraron importaciones.',
154+
fr: 'Aucune importation trouvée.',
155+
'pt-br': 'Nenhuma importação encontrada.',
156+
ru: 'Импорты не найдены.',
157+
ko: '가져오기를 찾을 수 없습니다.',
158+
it: 'Nessuna importazione trovata.',
159+
tr: 'İçe aktarma bulunamadı.',
160+
cs: 'Nebyly nalezeny žádné importy.',
161+
hu: 'Nem találhatók importálások.',
162+
bg: 'Не са намерени импортирания.'
163+
},
164+
'command.select-imported-files.processing-recursive': {
165+
en: 'Processing recursive imports...',
166+
pl: 'Przetwarzanie rekurencyjnych importów...',
167+
'zh-cn': '正在处理递归导入...',
168+
ja: '再帰的なインポートを処理中...',
169+
'zh-tw': '正在處理遞迴匯入...',
170+
de: 'Rekursive Importe werden verarbeitet...',
171+
es: 'Procesando importaciones recursivas...',
172+
fr: 'Traitement des importations récursives...',
173+
'pt-br': 'Processando importações recursivas...',
174+
ru: 'Обработка рекурсивных импортов...',
175+
ko: '재귀적 가져오기 처리 중...',
176+
it: 'Elaborazione delle importazioni ricorsive...',
177+
tr: 'Yinelemeli içe aktarmalar işleniyor...',
178+
cs: 'Zpracování rekurzivních importů...',
179+
hu: 'Rekurzív importálások feldolgozása...',
180+
bg: 'Обработка на рекурсивни импортирания...'
181+
},
2182
'command.select-imported-files.no-valid-files': {
3183
en: 'No valid files found.',
4184
pl: 'Nie znaleziono prawidłowych plików.',
5-
'zh-cn': '未找到有效的文件。',
185+
'zh-cn': '未找到有效文件。',
6186
ja: '有効なファイルが見つかりません。',
7-
'zh-tw': '找不到有效的檔案。',
187+
'zh-tw': '找不到有效檔案。',
8188
de: 'Keine gültigen Dateien gefunden.',
9189
es: 'No se encontraron archivos válidos.',
10190
fr: 'Aucun fichier valide trouvé.',
11191
'pt-br': 'Nenhum arquivo válido encontrado.',
12-
ru: 'Допустимые файлы не найдены.',
192+
ru: 'Действительные файлы не найдены.',
13193
ko: '유효한 파일을 찾을 수 없습니다.',
14194
it: 'Nessun file valido trovato.',
15195
tr: 'Geçerli dosya bulunamadı.',

0 commit comments

Comments
 (0)