Skip to content

Commit ab94caa

Browse files
committed
Update label from "New entry" to "Save new context" for consistency across UI and translations
1 parent 1f06e24 commit ab94caa

3 files changed

Lines changed: 27 additions & 23 deletions

File tree

‎apps/editor/src/commands/apply-context-command/sources/json-file-source.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ export const handle_json_file_source = async (
7676
let { merged: file_contexts, context_to_roots } =
7777
await load_and_merge_file_contexts()
7878
const workspace_folders = vscode.workspace.workspaceFolders || []
79-
const LABEL_NEW_ENTRY = t('command.apply-context.new-entry.label')
79+
const LABEL_SAVE_NEW_CONTEXT = t(
80+
'command.apply-context.save-new-context.label'
81+
)
8082

8183
const sync_button = {
8284
iconPath: new vscode.ThemeIcon('sync'),
@@ -106,7 +108,7 @@ export const handle_json_file_source = async (
106108
buttons?: vscode.QuickInputButton[]
107109
})[] = []
108110

109-
items.push({ label: LABEL_NEW_ENTRY })
111+
items.push({ label: LABEL_SAVE_NEW_CONTEXT })
110112

111113
if (file_contexts.length > 0) {
112114
items.push({
@@ -396,7 +398,7 @@ export const handle_json_file_source = async (
396398
continue
397399
}
398400

399-
if (selection.label === LABEL_NEW_ENTRY) {
401+
if (selection.label === LABEL_SAVE_NEW_CONTEXT) {
400402
const checked_files = workspace_provider.get_checked_files()
401403
if (checked_files.length == 0) {
402404
active_dialog_count++

‎apps/editor/src/commands/apply-context-command/sources/workspace-state-source.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export const handle_workspace_state_source = async (
3232
}
3333

3434
let { merged: internal_contexts, context_to_roots } = refresh_contexts()
35-
const LABEL_NEW_ENTRY = t('command.apply-context.new-entry.label')
35+
const LABEL_SAVE_NEW_CONTEXT = t(
36+
'command.apply-context.save-new-context.label'
37+
)
3638

3739
const sync_button = {
3840
iconPath: new vscode.ThemeIcon('sync'),
@@ -57,7 +59,7 @@ export const handle_workspace_state_source = async (
5759
index?: number
5860
})[] = []
5961

60-
items.push({ label: LABEL_NEW_ENTRY })
62+
items.push({ label: LABEL_SAVE_NEW_CONTEXT })
6163

6264
if (contexts.length > 0) {
6365
items.push({
@@ -152,7 +154,7 @@ export const handle_workspace_state_source = async (
152154
context?: SavedContext
153155
}
154156

155-
if (selectedItem.label === LABEL_NEW_ENTRY) {
157+
if (selectedItem.label === LABEL_SAVE_NEW_CONTEXT) {
156158
const checked_files = workspace_provider.get_checked_files()
157159
if (checked_files.length == 0) {
158160
active_dialog_count++

‎apps/editor/src/i18n/translations/commands/apply-context.ts‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -197,23 +197,23 @@ export const apply_context = {
197197
hu: 'A kiválasztott kontextus összevonása az aktuálissal',
198198
bg: 'Сливане на избрания контекст с текущия'
199199
},
200-
'command.apply-context.new-entry.label': {
201-
en: '$(add) New entry...',
202-
pl: '$(add) Nowy wpis...',
203-
'zh-cn': '$(add) 新条目...',
204-
ja: '$(add) 新規エントリ...',
205-
'zh-tw': '$(add) 新增項目...',
206-
de: '$(add) Neuer Eintrag...',
207-
es: '$(add) Nueva entrada...',
208-
fr: '$(add) Nouvelle entrée...',
209-
'pt-br': '$(add) Nova entrada...',
210-
ru: '$(add) Новая запись...',
211-
ko: '$(add) 새 항목...',
212-
it: '$(add) Nuova voce...',
213-
tr: '$(add) Yeni giriş...',
214-
cs: '$(add) Nový záznam...',
215-
hu: '$(add) Új bejegyzés...',
216-
bg: '$(add) Нов запис...'
200+
'command.apply-context.save-new-context.label': {
201+
en: '$(add) Save new context...',
202+
pl: '$(add) Zapisz nowy kontekst...',
203+
'zh-cn': '$(add) 保存新上下文...',
204+
ja: '$(add) 新しいコンテキストを保存...',
205+
'zh-tw': '$(add) 儲存新上下文...',
206+
de: '$(add) Neuen Kontext speichern...',
207+
es: '$(add) Guardar nuevo contexto...',
208+
fr: '$(add) Enregistrer un nouveau contexte...',
209+
'pt-br': '$(add) Salvar novo contexto...',
210+
ru: '$(add) Сохранить новый контекст...',
211+
ko: '$(add) 새 컨텍스트 저장...',
212+
it: '$(add) Salva nuovo contesto...',
213+
tr: '$(add) Yeni bağlamı kaydet...',
214+
cs: '$(add) Uložit nový kontext...',
215+
hu: '$(add) Új kontextus mentése...',
216+
bg: '$(add) Запазване на нов контекст...'
217217
},
218218
'command.apply-context.recent-entries': {
219219
en: 'recent entries',

0 commit comments

Comments
 (0)