Skip to content

Commit 06502bf

Browse files
committed
Rename translation keys from apply-context to context-restoration across commands
- fix translation keys
1 parent 11102b6 commit 06502bf

3 files changed

Lines changed: 43 additions & 29 deletions

File tree

‎apps/editor/src/commands/search-files-command/utils/show-results-and-apply.ts‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,14 @@ export const show_results_and_apply = async (params: {
167167

168168
const quick_pick_options = [
169169
{
170-
label: t('command.apply-context.action.replace.label'),
171-
description: t('command.apply-context.action.replace.description')
170+
label: t('command.context-restoration.action.replace.label'),
171+
description: t(
172+
'command.context-restoration.action.replace.description'
173+
)
172174
},
173175
{
174-
label: t('command.apply-context.action.merge.label'),
175-
description: t('command.apply-context.action.merge.description')
176+
label: t('command.context-restoration.action.merge.label'),
177+
description: t('command.context-restoration.action.merge.description')
176178
}
177179
]
178180

@@ -183,9 +185,12 @@ export const show_results_and_apply = async (params: {
183185

184186
const quick_pick_merge = vscode.window.createQuickPick()
185187
quick_pick_merge.items = quick_pick_options
186-
quick_pick_merge.placeholder = t('command.apply-context.unstaged.apply', {
187-
count: selected_paths.length
188-
})
188+
quick_pick_merge.placeholder = t(
189+
'command.context-restoration.unstaged.apply',
190+
{
191+
count: selected_paths.length
192+
}
193+
)
189194
quick_pick_merge.buttons = [vscode.QuickInputButtons.Back]
190195

191196
if (last_choice_label) {
@@ -229,7 +234,9 @@ export const show_results_and_apply = async (params: {
229234
choice.label
230235
)
231236

232-
if (choice.label == t('command.apply-context.action.merge.label')) {
237+
if (
238+
choice.label == t('command.context-restoration.action.merge.label')
239+
) {
233240
paths_to_apply = [
234241
...new Set([
235242
...currently_checked.filter((p) => !unchecked_paths.includes(p)),

‎apps/editor/src/commands/select-commit-files-command.ts‎

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const select_commit_files_command = (
3939

4040
if (!log_output) {
4141
vscode.window.showInformationMessage(
42-
t('command.apply-context.commit.no-commits')
42+
t('command.context-restoration.commit.no-commits')
4343
)
4444
return
4545
}
@@ -57,9 +57,11 @@ export const select_commit_files_command = (
5757
const quick_pick = vscode.window.createQuickPick<
5858
vscode.QuickPickItem & { hash: string }
5959
>()
60-
quick_pick.title = t('command.apply-context.commit.title')
60+
quick_pick.title = t('command.context-restoration.commit.title')
6161
quick_pick.items = commits
62-
quick_pick.placeholder = t('command.apply-context.commit.select')
62+
quick_pick.placeholder = t(
63+
'command.context-restoration.commit.select'
64+
)
6365
quick_pick.matchOnDetail = true
6466
quick_pick.buttons = [
6567
{ iconPath: new vscode.ThemeIcon('close'), tooltip: 'Close' }
@@ -124,7 +126,7 @@ export const select_commit_files_command = (
124126

125127
if (!files_output) {
126128
vscode.window.showInformationMessage(
127-
t('command.apply-context.commit.no-modified')
129+
t('command.context-restoration.commit.no-modified')
128130
)
129131
continue
130132
}
@@ -149,7 +151,7 @@ export const select_commit_files_command = (
149151

150152
if (valid_files.length == 0) {
151153
vscode.window.showInformationMessage(
152-
t('command.apply-context.commit.no-valid')
154+
t('command.context-restoration.commit.no-valid')
153155
)
154156
continue
155157
}
@@ -188,7 +190,7 @@ export const select_commit_files_command = (
188190
quick_pick_files.items = file_items
189191
quick_pick_files.selectedItems = file_items.filter((i) => i.picked)
190192
quick_pick_files.title = t(
191-
'command.apply-context.commit.files-modified',
193+
'command.context-restoration.commit.files-modified',
192194
{
193195
hash: selected_commit.hash.substring(0, 7)
194196
}
@@ -203,7 +205,7 @@ export const select_commit_files_command = (
203205
total > 0
204206
? ` (totalling ${display_token_count(total)} tokens)`
205207
: ''
206-
quick_pick_files.placeholder = `${t('command.apply-context.commit.select-files')}${total_text}`
208+
quick_pick_files.placeholder = `${t('command.context-restoration.commit.select-files')}${total_text}`
207209
}
208210
update_placeholder()
209211
quick_pick_files.onDidChangeSelection(update_placeholder)
@@ -270,15 +272,17 @@ export const select_commit_files_command = (
270272
if (!is_identical) {
271273
const quick_pick_options = [
272274
{
273-
label: t('command.apply-context.action.replace.label'),
275+
label: t(
276+
'command.context-restoration.action.replace.label'
277+
),
274278
description: t(
275-
'command.apply-context.action.replace.description'
279+
'command.context-restoration.action.replace.description'
276280
)
277281
},
278282
{
279-
label: t('command.apply-context.action.merge.label'),
283+
label: t('command.context-restoration.action.merge.label'),
280284
description: t(
281-
'command.apply-context.action.merge.description'
285+
'command.context-restoration.action.merge.description'
282286
)
283287
}
284288
]
@@ -291,7 +295,7 @@ export const select_commit_files_command = (
291295
const quick_pick_merge = vscode.window.createQuickPick()
292296
quick_pick_merge.items = quick_pick_options
293297
quick_pick_merge.placeholder = t(
294-
'command.apply-context.commit.apply',
298+
'command.context-restoration.commit.apply',
295299
{
296300
hash: selected_commit.hash.substring(0, 7)
297301
}
@@ -341,7 +345,7 @@ export const select_commit_files_command = (
341345

342346
if (
343347
choice.label ==
344-
t('command.apply-context.action.merge.label')
348+
t('command.context-restoration.action.merge.label')
345349
) {
346350
paths_to_apply = [
347351
...new Set([...currently_checked, ...selected_paths])

‎apps/editor/src/commands/select-unstaged-files-command.ts‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ export const select_unstaged_files_command = (
115115
const quick_pick = vscode.window.createQuickPick<
116116
vscode.QuickPickItem & { file_path: string }
117117
>()
118-
quick_pick.title = t('command.apply-context.unstaged.title')
119-
quick_pick.placeholder = t('command.apply-context.unstaged.include')
118+
quick_pick.title = t('command.context-restoration.unstaged.title')
119+
quick_pick.placeholder = t(
120+
'command.context-restoration.unstaged.include'
121+
)
120122
quick_pick.canSelectMany = true
121123
quick_pick.items = quick_pick_items
122124
quick_pick.ignoreFocusOut = true
@@ -189,15 +191,15 @@ export const select_unstaged_files_command = (
189191
if (!is_identical) {
190192
const quick_pick_options = [
191193
{
192-
label: t('command.apply-context.action.replace.label'),
194+
label: t('command.context-restoration.action.replace.label'),
193195
description: t(
194-
'command.apply-context.action.replace.description'
196+
'command.context-restoration.action.replace.description'
195197
)
196198
},
197199
{
198-
label: t('command.apply-context.action.merge.label'),
200+
label: t('command.context-restoration.action.merge.label'),
199201
description: t(
200-
'command.apply-context.action.merge.description'
202+
'command.context-restoration.action.merge.description'
201203
)
202204
}
203205
]
@@ -210,7 +212,7 @@ export const select_unstaged_files_command = (
210212
const quick_pick_merge = vscode.window.createQuickPick()
211213
quick_pick_merge.items = quick_pick_options
212214
quick_pick_merge.placeholder = t(
213-
'command.apply-context.unstaged.apply',
215+
'command.context-restoration.unstaged.apply',
214216
{
215217
count: selected_paths.length
216218
}
@@ -259,7 +261,8 @@ export const select_unstaged_files_command = (
259261
)
260262

261263
if (
262-
choice.label == t('command.apply-context.action.merge.label')
264+
choice.label ==
265+
t('command.context-restoration.action.merge.label')
263266
) {
264267
paths_to_apply = [
265268
...new Set([...currently_checked, ...selected_paths])

0 commit comments

Comments
 (0)