Skip to content

Commit 54d76f7

Browse files
committed
Add descriptions and pre-select the current option in the edit format quick pick
- when opening the quick pick, should highlight currently selected edit format - add appropriate descriptions to each edit format - add missing translations
1 parent 69a0450 commit 54d76f7

2 files changed

Lines changed: 93 additions & 0 deletions

File tree

‎apps/editor/src/i18n/translations/views/panel/handlers/select-edit-format.ts‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,24 @@ export const translations = {
1717
hu: 'Teljes fájl felülírása',
1818
bg: 'Презаписване на целия файл'
1919
},
20+
'views.panel.handlers.select-edit-format.items.whole.description': {
21+
en: 'Output file contents in full',
22+
pl: 'Wypisz pełną zawartość pliku',
23+
'zh-cn': '完整输出文件内容',
24+
ja: 'ファイルの内容をすべて出力する',
25+
'zh-tw': '完整輸出檔案內容',
26+
de: 'Dateiinhalt vollständig ausgeben',
27+
es: 'Mostrar el contenido completo del archivo',
28+
fr: 'Afficher le contenu du fichier en entier',
29+
'pt-br': 'Exibir o conteúdo do arquivo na íntegra',
30+
ru: 'Вывод содержимого файла целиком',
31+
ko: '전체 파일 내용 출력',
32+
it: 'Output completo del contenuto del file',
33+
tr: 'Dosya içeriğini tam olarak çıkar',
34+
cs: 'Vypsat celý obsah souboru',
35+
hu: 'A fájl teljes tartalmának megjelenítése',
36+
bg: 'Извеждане на пълното съдържание на файла'
37+
},
2038
'views.panel.handlers.select-edit-format.items.search-replace': {
2139
en: 'Search & Replace',
2240
pl: 'Wyszukaj i zamień',
@@ -35,6 +53,26 @@ export const translations = {
3553
hu: 'Keresés és csere',
3654
bg: 'Търсене и заместване'
3755
},
56+
'views.panel.handlers.select-edit-format.items.search-replace.description': {
57+
en: 'Isolate changed blocks with delimiters <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
58+
pl: 'Wydziel zmienione bloki za pomocą ograniczników <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
59+
'zh-cn': '使用分隔符 <<<<<<< SEARCH, =======, >>>>>>> REPLACE 隔离更改的块',
60+
ja: '変更されたブロックを区切り文字 <<<<<<< SEARCH, =======, >>>>>>> REPLACE で分離する',
61+
'zh-tw':
62+
'使用分隔符 <<<<<<< SEARCH, =======, >>>>>>> REPLACE 隔離更改的區塊',
63+
de: 'Geänderte Blöcke mit Trennzeichen <<<<<<< SEARCH, =======, >>>>>>> REPLACE isolieren',
64+
es: 'Aislar los bloques cambiados con delimitadores <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
65+
fr: 'Isoler les blocs modifiés avec les délimiteurs <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
66+
'pt-br':
67+
'Isolar blocos alterados com delimitadores <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
68+
ru: 'Изолировать измененные блоки с помощью разделителей <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
69+
ko: '<<<<<<< SEARCH, =======, >>>>>>> REPLACE 구분 기호를 사용하여 변경된 블록 격리',
70+
it: 'Isola i blocchi modificati con i delimitatori <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
71+
tr: 'Değiştirilen blokları <<<<<<< SEARCH, =======, >>>>>>> REPLACE sınırlayıcılarıyla ayır',
72+
cs: 'Izolovat změněné bloky pomocí oddělovačů <<<<<<< SEARCH, =======, >>>>>>> REPLACE',
73+
hu: 'Módosított blokkok elkülönítése <<<<<<< SEARCH, =======, >>>>>>> REPLACE elválasztókkal',
74+
bg: 'Изолиране на променените блокове с разделители <<<<<<< SEARCH, =======, >>>>>>> REPLACE'
75+
},
3876
'views.panel.handlers.select-edit-format.items.diff': {
3977
en: 'Unified Diff',
4078
pl: 'Zunifikowany Diff',
@@ -53,6 +91,25 @@ export const translations = {
5391
hu: 'Egyesített Diff',
5492
bg: 'Обединен Diff (Unified Diff)'
5593
},
94+
'views.panel.handlers.select-edit-format.items.diff.description': {
95+
en: 'Represent changes line-by-line using deletion - and addition + markers',
96+
pl: 'Przedstaw zmiany wiersz po wierszu za pomocą znaczników usunięcia - i dodania +',
97+
'zh-cn': '使用删除 - 和添加 + 标记逐行表示更改',
98+
ja: '削除 - と追加 + マーカーを使用して、変更を1行ずつ表す',
99+
'zh-tw': '使用刪除 - 和新增 + 標記逐行表示更改',
100+
de: 'Änderungen Zeile für Zeile mit Lösch- (-) und Hinzufüge-Markierungen (+) darstellen',
101+
es: 'Representar cambios línea por línea usando marcadores de eliminación - y adición +',
102+
fr: "Représenter les modifications ligne par ligne en utilisant les marqueurs de suppression - et d'ajout +",
103+
'pt-br':
104+
'Representar alterações linha por linha usando marcadores de exclusão - e adição +',
105+
ru: 'Представлять изменения построчно, используя маркеры удаления - и добавления +',
106+
ko: '삭제 - 및 추가 + 마커를 사용하여 줄 단위로 변경 사항 표시',
107+
it: 'Rappresenta le modifiche riga per riga utilizzando i marcatori di eliminazione - e aggiunta +',
108+
tr: 'Değişiklikleri silme - ve ekleme + işaretlerini kullanarak satır satır temsil et',
109+
cs: 'Představovat změny řádek po řádku pomocí značek pro odstranění - a přidání +',
110+
hu: 'Változások soronkénti megjelenítése törlés - és hozzáadás + jelölőkkel',
111+
bg: 'Представяне на промените ред по ред чрез маркери за изтриване - и добавяне +'
112+
},
56113
'views.panel.handlers.select-edit-format.items.truncated': {
57114
en: 'Ellipsis truncations',
58115
pl: 'Skrócenie za pomocą wielokropka',
@@ -71,6 +128,24 @@ export const translations = {
71128
hu: 'Csonkítás ellipszissel',
72129
bg: 'Съкращения с многоточие'
73130
},
131+
'views.panel.handlers.select-edit-format.items.truncated.description': {
132+
en: 'Use ellipsis truncations for unchanged parts',
133+
pl: 'Użyj skrócenia wielokropkiem dla niezmienionych fragmetów',
134+
'zh-cn': '对未更改的部分使用省略号截断',
135+
ja: '変更されていない部分には省略記号を使用する',
136+
'zh-tw': '對未更改的部分使用省略號截斷',
137+
de: 'Auslassungspunkte für unveränderte Teile verwenden',
138+
es: 'Usar truncamiento con elipsis para las partes sin cambios',
139+
fr: 'Utiliser des points de suspension pour les parties non modifiées',
140+
'pt-br': 'Usar truncamento por elipse para partes não alteradas',
141+
ru: 'Использовать усечение с многоточием для неизмененных частей',
142+
ko: '변경되지 않은 부분에 줄임표 자르기 사용',
143+
it: 'Usa i troncamenti con ellissi per le parti non modificate',
144+
tr: 'Değişmeyen kısımlar için üç nokta ile kesilmeleri kullanın',
145+
cs: 'Použít zkrácení výpustkou pro nezměněné části',
146+
hu: 'Csonkítás ellipszissel a változatlan részekhez',
147+
bg: 'Използване на съкращения с многоточие за непроменените части'
148+
},
74149
'views.panel.handlers.select-edit-format.placeholder': {
75150
en: 'Select edit format',
76151
pl: 'Wybierz format edycji',

‎apps/editor/src/views/panel/backend/message-handlers/handle-select-edit-format.ts‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,38 @@ export const handle_select_edit_format = async (
1212
panel_view_provider: PanelViewProvider,
1313
message: SelectEditFormatMessage
1414
): Promise<void> => {
15+
const current_format =
16+
message.target == 'chat'
17+
? panel_view_provider.chat_edit_format
18+
: panel_view_provider.api_edit_format
19+
1520
const items: (vscode.QuickPickItem & { value: EditFormat })[] = [
1621
{
1722
label: t('views.panel.handlers.select-edit-format.items.whole'),
23+
detail: t(
24+
'views.panel.handlers.select-edit-format.items.whole.description'
25+
),
1826
value: 'whole'
1927
},
2028
{
2129
label: t('views.panel.handlers.select-edit-format.items.search-replace'),
30+
detail: t(
31+
'views.panel.handlers.select-edit-format.items.search-replace.description'
32+
),
2233
value: 'search-replace'
2334
},
2435
{
2536
label: t('views.panel.handlers.select-edit-format.items.diff'),
37+
detail: t(
38+
'views.panel.handlers.select-edit-format.items.diff.description'
39+
),
2640
value: 'diff'
2741
},
2842
{
2943
label: t('views.panel.handlers.select-edit-format.items.truncated'),
44+
detail: t(
45+
'views.panel.handlers.select-edit-format.items.truncated.description'
46+
),
3047
value: 'truncated'
3148
}
3249
]
@@ -35,6 +52,7 @@ export const handle_select_edit_format = async (
3552
vscode.QuickPickItem & { value: EditFormat }
3653
>()
3754
quick_pick.items = items
55+
quick_pick.activeItems = items.filter((item) => item.value == current_format)
3856
quick_pick.placeholder = t(
3957
'views.panel.handlers.select-edit-format.placeholder'
4058
)

0 commit comments

Comments
 (0)