Skip to content

Commit 5e96f0b

Browse files
committed
Internationalize hash-sign quick pick menu items and UI elements
- add mising translations
1 parent d67d316 commit 5e96f0b

2 files changed

Lines changed: 323 additions & 16 deletions

File tree

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

Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,294 @@ export const translations = {
162162
cs: 'Pro {0} nebyly nalezeny žádné dovednosti.',
163163
hu: 'Nem találhatók képességek a(z) {0} számára.',
164164
bg: 'Не са намерени умения за {0}.'
165+
},
166+
'views.prompt.handlers.hash-sign.quick-pick.selection.label': {
167+
en: 'Selection',
168+
pl: 'Zaznaczenie',
169+
'zh-cn': '选择',
170+
ja: '選択',
171+
'zh-tw': '選擇',
172+
de: 'Auswahl',
173+
es: 'Selección',
174+
fr: 'Sélection',
175+
'pt-br': 'Seleção',
176+
ru: 'Выделение',
177+
ko: '선택',
178+
it: 'Selezione',
179+
tr: 'Seçim',
180+
cs: 'Výběr',
181+
hu: 'Kijelölés',
182+
bg: 'Селекция'
183+
},
184+
'views.prompt.handlers.hash-sign.quick-pick.selection.description': {
185+
en: 'Text selection from the active editor',
186+
pl: 'Zaznaczenie tekstu z aktywnego edytora',
187+
'zh-cn': '来自活动编辑器的文本选择',
188+
ja: 'アクティブなエディターからのテキスト選択',
189+
'zh-tw': '來自活動編輯器的文本選擇',
190+
de: 'Textauswahl aus dem aktiven Editor',
191+
es: 'Selección de texto del editor activo',
192+
fr: "Sélection de texte de l'éditeur actif",
193+
'pt-br': 'Seleção de texto do editor ativo',
194+
ru: 'Выделение текста из активного редактора',
195+
ko: '활성 편집기의 텍스트 선택',
196+
it: "Selezione di testo dall'editor attivo",
197+
tr: 'Aktif editörden metin seçimi',
198+
cs: 'Výběr textu z aktivního editoru',
199+
hu: 'Szövegkijelölés az aktív szerkesztőből',
200+
bg: 'Избор на текст от активния редактор'
201+
},
202+
'views.prompt.handlers.hash-sign.quick-pick.changes.label': {
203+
en: 'Changes',
204+
pl: 'Zmiany',
205+
'zh-cn': '更改',
206+
ja: '変更',
207+
'zh-tw': '變更',
208+
de: 'Änderungen',
209+
es: 'Cambios',
210+
fr: 'Modifications',
211+
'pt-br': 'Alterações',
212+
ru: 'Изменения',
213+
ko: '변경 사항',
214+
it: 'Modifiche',
215+
tr: 'Değişiklikler',
216+
cs: 'Změny',
217+
hu: 'Változások',
218+
bg: 'Промени'
219+
},
220+
'views.prompt.handlers.hash-sign.quick-pick.changes.description': {
221+
en: 'Diff with the selected branch',
222+
pl: 'Różnica z wybraną gałęzią',
223+
'zh-cn': '与选定分支的差异',
224+
ja: '選択したブランチとの差分',
225+
'zh-tw': '與選定分支的差異',
226+
de: 'Diff mit dem ausgewählten Zweig',
227+
es: 'Diferencia con la rama seleccionada',
228+
fr: 'Différence avec la branche sélectionnée',
229+
'pt-br': 'Diferença com a branch selecionada',
230+
ru: 'Различия с выбранной веткой',
231+
ko: '선택한 브랜치와의 차이',
232+
it: 'Differenza con il ramo selezionato',
233+
tr: 'Seçili dal ile fark',
234+
cs: 'Rozdíl s vybranou větví',
235+
hu: 'Különbség a kiválasztott ággal',
236+
bg: 'Разлика с избрания клон'
237+
},
238+
'views.prompt.handlers.hash-sign.quick-pick.commit.label': {
239+
en: 'Commit',
240+
pl: 'Zatwierdzenie',
241+
'zh-cn': '提交',
242+
ja: 'コミット',
243+
'zh-tw': '提交',
244+
de: 'Commit',
245+
es: 'Confirmación',
246+
fr: 'Commit',
247+
'pt-br': 'Commit',
248+
ru: 'Коммит',
249+
ko: '커밋',
250+
it: 'Commit',
251+
tr: 'İşleme',
252+
cs: 'Odevzdání',
253+
hu: 'Commit',
254+
bg: 'Къмит'
255+
},
256+
'views.prompt.handlers.hash-sign.quick-pick.commit.description': {
257+
en: 'Changes from a specific commit',
258+
pl: 'Zmiany z określonego zatwierdzenia',
259+
'zh-cn': '来自特定提交的更改',
260+
ja: '特定のコミットからの変更',
261+
'zh-tw': '來自特定提交的變更',
262+
de: 'Änderungen von einem bestimmten Commit',
263+
es: 'Cambios de una confirmación específica',
264+
fr: "Modifications d'un commit spécifique",
265+
'pt-br': 'Alterações de um commit específico',
266+
ru: 'Изменения из определенного коммита',
267+
ko: '특정 커밋의 변경 사항',
268+
it: 'Modifiche da un commit specifico',
269+
tr: 'Belirli bir işlemeden değişiklikler',
270+
cs: 'Změny z konkrétního odevzdání',
271+
hu: 'Változások egy adott commitból',
272+
bg: 'Промени от специфичен къмит'
273+
},
274+
'views.prompt.handlers.hash-sign.quick-pick.saved-context.label': {
275+
en: 'Saved context',
276+
pl: 'Zapisany kontekst',
277+
'zh-cn': '保存的上下文',
278+
ja: '保存されたコンテキスト',
279+
'zh-tw': '儲存的上下文',
280+
de: 'Gespeicherter Kontext',
281+
es: 'Contexto guardado',
282+
fr: 'Contexte enregistré',
283+
'pt-br': 'Contexto salvo',
284+
ru: 'Сохраненный контекст',
285+
ko: '저장된 컨텍스트',
286+
it: 'Contesto salvato',
287+
tr: 'Kaydedilmiş bağlam',
288+
cs: 'Uložený kontext',
289+
hu: 'Mentett kontextus',
290+
bg: 'Запазен контекст'
291+
},
292+
'views.prompt.handlers.hash-sign.quick-pick.saved-context.description': {
293+
en: 'Files from the workspace',
294+
pl: 'Pliki z obszaru roboczego',
295+
'zh-cn': '来自工作区的文件',
296+
ja: 'ワークスペースからのファイル',
297+
'zh-tw': '來自工作區的文件',
298+
de: 'Dateien aus dem Arbeitsbereich',
299+
es: 'Archivos del espacio de trabajo',
300+
fr: "Fichiers de l'espace de travail",
301+
'pt-br': 'Arquivos do espaço de trabalho',
302+
ru: 'Файлы из рабочей области',
303+
ko: '작업 공간의 파일',
304+
it: "File dall'area di lavoro",
305+
tr: 'Çalışma alanındaki dosyalar',
306+
cs: 'Soubory z pracovního prostoru',
307+
hu: 'Fájlok a munkaterületről',
308+
bg: 'Файлове от работното пространство'
309+
},
310+
'views.prompt.handlers.hash-sign.quick-pick.skill.label': {
311+
en: 'Skill',
312+
pl: 'Umiejętność',
313+
'zh-cn': '技能',
314+
ja: 'スキル',
315+
'zh-tw': '技能',
316+
de: 'Skill',
317+
es: 'Habilidad',
318+
fr: 'Compétence',
319+
'pt-br': 'Habilidade',
320+
ru: 'Навык',
321+
ko: '스킬',
322+
it: 'Competenza',
323+
tr: 'Yetenek',
324+
cs: 'Dovednost',
325+
hu: 'Képesség',
326+
bg: 'Умение'
327+
},
328+
'views.prompt.handlers.hash-sign.quick-pick.skill.description': {
329+
en: 'Files of a selected skill',
330+
pl: 'Pliki wybranej umiejętności',
331+
'zh-cn': '选定技能的文件',
332+
ja: '選択したスキルのファイル',
333+
'zh-tw': '選定技能的文件',
334+
de: 'Dateien eines ausgewählten Skills',
335+
es: 'Archivos de una habilidad seleccionada',
336+
fr: "Fichiers d'une compétence sélectionnée",
337+
'pt-br': 'Arquivos de uma habilidade selecionada',
338+
ru: 'Файлы выбранного навыка',
339+
ko: '선택한 스킬의 파일',
340+
it: 'File di una competenza selezionata',
341+
tr: 'Seçilen bir yeteneğin dosyaları',
342+
cs: 'Soubory vybrané dovednosti',
343+
hu: 'Egy kiválasztott képesség fájljai',
344+
bg: 'Файлове на избрано умение'
345+
},
346+
'views.prompt.handlers.hash-sign.quick-pick.skill.tooltip': {
347+
en: 'Discover skills at skills.sh',
348+
pl: 'Odkryj umiejętności na skills.sh',
349+
'zh-cn': '在 skills.sh 发现技能',
350+
ja: 'skills.sh でスキルを見つける',
351+
'zh-tw': '在 skills.sh 發現技能',
352+
de: 'Entdecke Skills auf skills.sh',
353+
es: 'Descubre habilidades en skills.sh',
354+
fr: 'Découvrez des compétences sur skills.sh',
355+
'pt-br': 'Descubra habilidades em skills.sh',
356+
ru: 'Откройте для себя навыки на skills.sh',
357+
ko: 'skills.sh에서 스킬 발견하기',
358+
it: 'Scopri le competenze su skills.sh',
359+
tr: "skills.sh'de yetenekleri keşfedin",
360+
cs: 'Objevte dovednosti na skills.sh',
361+
hu: 'Fedezz fel képességeket a skills.sh oldalon',
362+
bg: 'Открийте умения на skills.sh'
363+
},
364+
'views.prompt.handlers.hash-sign.quick-pick.clipboard-paths.label': {
365+
en: 'Clipboard paths',
366+
pl: 'Ścieżki ze schowka',
367+
'zh-cn': '剪贴板路径',
368+
ja: 'クリップボードのパス',
369+
'zh-tw': '剪貼板路徑',
370+
de: 'Zwischenablage-Pfade',
371+
es: 'Rutas del portapapeles',
372+
fr: 'Chemins du presse-papiers',
373+
'pt-br': 'Caminhos da área de transferência',
374+
ru: 'Пути из буфера обмена',
375+
ko: '클립보드 경로',
376+
it: 'Percorsi negli appunti',
377+
tr: 'Pano yolları',
378+
cs: 'Cesty ze schránky',
379+
hu: 'Vágólap útvonalak',
380+
bg: 'Пътища от клипборда'
381+
},
382+
'views.prompt.handlers.hash-sign.quick-pick.clipboard-paths.description': {
383+
en: 'Files matching paths found in the clipboard',
384+
pl: 'Pliki pasujące do ścieżek znalezionych w schowku',
385+
'zh-cn': '与在剪贴板中找到的路径匹配的文件',
386+
ja: 'クリップボードに見つかったパスに一致するファイル',
387+
'zh-tw': '與在剪貼板中找到的路徑匹配的文件',
388+
de: 'Dateien, die mit den in der Zwischenablage gefundenen Pfaden übereinstimmen',
389+
es: 'Archivos que coinciden con las rutas encontradas en el portapapeles',
390+
fr: 'Fichiers correspondant aux chemins trouvés dans le presse-papiers',
391+
'pt-br':
392+
'Arquivos que correspondem aos caminhos encontrados na área de transferência',
393+
ru: 'Файлы, соответствующие путям, найденным в буфере обмена',
394+
ko: '클립보드에서 찾은 경로와 일치하는 파일',
395+
it: 'File corrispondenti ai percorsi trovati negli appunti',
396+
tr: 'Panoda bulunan yollarla eşleşen dosyalar',
397+
cs: 'Soubory odpovídající cestám nalezeným ve schránce',
398+
hu: 'A vágólapon található útvonalaknak megfelelő fájlok',
399+
bg: 'Файлове, съвпадащи с пътищата, намерени в клипборда'
400+
},
401+
'views.prompt.handlers.hash-sign.quick-pick.placeholder': {
402+
en: 'Select symbol to insert',
403+
pl: 'Wybierz symbol do wstawienia',
404+
'zh-cn': '选择要插入的符号',
405+
ja: '挿入するシンボルを選択',
406+
'zh-tw': '選擇要插入的符號',
407+
de: 'Symbol zum Einfügen auswählen',
408+
es: 'Seleccione un símbolo para insertar',
409+
fr: 'Sélectionner le symbole à insérer',
410+
'pt-br': 'Selecione o símbolo para inserir',
411+
ru: 'Выберите символ для вставки',
412+
ko: '삽입할 기호 선택',
413+
it: 'Seleziona il simbolo da inserire',
414+
tr: 'Eklenecek sembolü seçin',
415+
cs: 'Vyberte symbol pro vložení',
416+
hu: 'Válassza ki a beszúrandó szimbólumot',
417+
bg: 'Изберете символ за вмъкване'
418+
},
419+
'views.prompt.handlers.hash-sign.quick-pick.title': {
420+
en: 'Symbols',
421+
pl: 'Symbole',
422+
'zh-cn': '符号',
423+
ja: 'シンボル',
424+
'zh-tw': '符號',
425+
de: 'Symbole',
426+
es: 'Símbolos',
427+
fr: 'Symboles',
428+
'pt-br': 'Símbolos',
429+
ru: 'Символы',
430+
ko: '기호',
431+
it: 'Simboli',
432+
tr: 'Semboller',
433+
cs: 'Symboly',
434+
hu: 'Szimbólumok',
435+
bg: 'Символи'
436+
},
437+
'views.prompt.handlers.hash-sign.quick-pick.close': {
438+
en: 'Close',
439+
pl: 'Zamknij',
440+
'zh-cn': '关闭',
441+
ja: '閉じる',
442+
'zh-tw': '關閉',
443+
de: 'Schließen',
444+
es: 'Cerrar',
445+
fr: 'Fermer',
446+
'pt-br': 'Fechar',
447+
ru: 'Закрыть',
448+
ko: '닫기',
449+
it: 'Chiudi',
450+
tr: 'Kapat',
451+
cs: 'Zavřít',
452+
hu: 'Bezárás',
453+
bg: 'Затвори'
165454
}
166455
} as const

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

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as vscode from 'vscode'
2+
import { t } from '@/i18n'
23
import { PromptViewProvider } from '@/views/prompt/backend/prompt-view-provider'
34
import { LAST_SELECTED_SYMBOL_STATE_KEY } from '@/constants/state-keys'
45
import {
@@ -10,12 +11,12 @@ import {
1011
handle_clipboard_paths_item
1112
} from './symbols'
1213

13-
const selection_label = '$(list-flat) Selection'
14-
const changes_label = '$(git-pull-request-draft) Changes'
15-
const commit_label = '$(git-commit) Commit'
16-
const saved_context_label = '$(checklist) Saved context'
17-
const skill_label = '$(thinking) Skill'
18-
const clipboard_paths_label = '$(clippy) Clipboard paths'
14+
const selection_label = `$(list-flat) ${t('views.prompt.handlers.hash-sign.quick-pick.selection.label')}`
15+
const changes_label = `$(git-pull-request-draft) ${t('views.prompt.handlers.hash-sign.quick-pick.changes.label')}`
16+
const commit_label = `$(git-commit) ${t('views.prompt.handlers.hash-sign.quick-pick.commit.label')}`
17+
const saved_context_label = `$(checklist) ${t('views.prompt.handlers.hash-sign.quick-pick.saved-context.label')}`
18+
const skill_label = `$(thinking) ${t('views.prompt.handlers.hash-sign.quick-pick.skill.label')}`
19+
const clipboard_paths_label = `$(clippy) ${t('views.prompt.handlers.hash-sign.quick-pick.clipboard-paths.label')}`
1920

2021
const hash_sign_quick_pick = async (params: {
2122
extension_context: vscode.ExtensionContext
@@ -24,33 +25,45 @@ const hash_sign_quick_pick = async (params: {
2425
const items: vscode.QuickPickItem[] = [
2526
{
2627
label: selection_label,
27-
description: 'Text selection from the active editor'
28+
description: t(
29+
'views.prompt.handlers.hash-sign.quick-pick.selection.description'
30+
)
2831
},
2932
{
3033
label: changes_label,
31-
description: 'Diff with the selected branch'
34+
description: t(
35+
'views.prompt.handlers.hash-sign.quick-pick.changes.description'
36+
)
3237
},
3338
{
3439
label: commit_label,
35-
description: 'Changes from a specific commit'
40+
description: t(
41+
'views.prompt.handlers.hash-sign.quick-pick.commit.description'
42+
)
3643
},
3744
{
3845
label: saved_context_label,
39-
description: 'Files from the workspace'
46+
description: t(
47+
'views.prompt.handlers.hash-sign.quick-pick.saved-context.description'
48+
)
4049
},
4150
{
4251
label: skill_label,
43-
description: 'Files of a selected skill',
52+
description: t(
53+
'views.prompt.handlers.hash-sign.quick-pick.skill.description'
54+
),
4455
buttons: [
4556
{
4657
iconPath: new vscode.ThemeIcon('globe'),
47-
tooltip: 'Discover skills at skills.sh'
58+
tooltip: t('views.prompt.handlers.hash-sign.quick-pick.skill.tooltip')
4859
}
4960
]
5061
},
5162
{
5263
label: clipboard_paths_label,
53-
description: 'Files matching paths found in the clipboard'
64+
description: t(
65+
'views.prompt.handlers.hash-sign.quick-pick.clipboard-paths.description'
66+
)
5467
}
5568
]
5669

@@ -65,11 +78,16 @@ const hash_sign_quick_pick = async (params: {
6578
while (true) {
6679
const quick_pick = vscode.window.createQuickPick()
6780
quick_pick.items = items
68-
quick_pick.placeholder = 'Select symbol to insert'
81+
quick_pick.placeholder = t(
82+
'views.prompt.handlers.hash-sign.quick-pick.placeholder'
83+
)
6984
quick_pick.matchOnDescription = true
70-
quick_pick.title = 'Symbols'
85+
quick_pick.title = t('views.prompt.handlers.hash-sign.quick-pick.title')
7186
quick_pick.buttons = [
72-
{ iconPath: new vscode.ThemeIcon('close'), tooltip: 'Close' }
87+
{
88+
iconPath: new vscode.ThemeIcon('close'),
89+
tooltip: t('views.prompt.handlers.hash-sign.quick-pick.close')
90+
}
7391
]
7492

7593
if (last_selected_item) {

0 commit comments

Comments
 (0)