Skip to content

Commit 6de3756

Browse files
committed
Internationalize continue in browser message in prompt handlers
- place 'continue in the selected browser.' instances (with dot) in `apps/editor/src/i18n/translations/common.ts` - in `apps/editor/src/i18n/translations/views/prompt/handlers` create common.ts for 'continue in the browser' translation (without a dot) └── apps └── editor └── src ├── i18n │ └── translations │ ├── common.ts │ └── views │ └── prompt │ ├── handlers │ │ ├── common.ts │ │ ├── copy-prompt.ts │ │ ├── delete-task.ts │ │ ├── handle-patch-repair.ts │ │ ├── handle-pick-api-reasoning-effort.ts │ │ ├── handle-template-quick-pick.ts │ │ ├── handle-undo.ts │ │ ├── hash-sign.ts │ │ ├── index.ts │ │ ├── make-api-call.ts │ │ ├── select-edit-format-instructions.ts │ │ ├── utils │ │ │ ├── index.ts │ │ │ └── symbols │ │ │ ├── git │ │ │ │ ├── index.ts │ │ │ │ └── replace-git-symbols.ts │ │ │ └── index.ts │ │ └── voice-input.ts │ └── index.ts ├── utils │ └── changes-integration │ └── diff-processor │ └── test-cases │ └── generic-6 │ ├── expected.txt │ └── original.txt └── views └── prompt └── backend └── message-handlers ├── handle-autofill.ts └── handle-preview-web-configuration.ts
1 parent b6735ee commit 6de3756

4 files changed

Lines changed: 26 additions & 2 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export const translations = {
2+
'views.prompt.handlers.common.continue-in-browser': {
3+
en: 'Continue in the browser',
4+
pl: 'Kontynuuj w przeglądarce',
5+
'zh-cn': '在浏览器中继续',
6+
ja: 'ブラウザで続行',
7+
'zh-tw': '在瀏覽器中繼續',
8+
de: 'Im Browser fortfahren',
9+
es: 'Continuar en el navegador',
10+
fr: 'Continuer dans le navigateur',
11+
'pt-br': 'Continuar no navegador',
12+
ru: 'Продолжить в браузере',
13+
ko: '브라우저에서 계속',
14+
it: 'Continua nel browser',
15+
tr: 'Tarayıcıda devam et',
16+
cs: 'Pokračovat v prohlížeči',
17+
hu: 'Folytatás a böngészőben',
18+
bg: 'Продължете в браузъра'
19+
}
20+
} as const

‎apps/editor/src/i18n/translations/views/prompt/handlers/index.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ import { translations as utils } from './utils'
99
import { translations as handle_pick_api_reasoning_effort } from './handle-pick-api-reasoning-effort'
1010
import { translations as handle_template_quick_pick } from './handle-template-quick-pick'
1111
import { translations as handle_patch_repair } from './handle-patch-repair'
12+
import { translations as common } from './common'
1213

1314
export const translations = {
15+
...common,
1416
...delete_task,
1517
...hash_sign,
1618
...make_api_call,

‎apps/editor/src/views/prompt/backend/message-handlers/handle-autofill.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { handle_update_last_used_web_configuration } from './handle-update-last-
1616
import { show_configurations_quick_pick } from '@/utils/show-configurations-quick-pick'
1717
import { PromptBuilder } from '@/utils/prompt-builder'
1818
import { show_no_configurations_warning } from '@/utils/show-no-configurations-warning'
19+
import { t } from '@/i18n'
1920

2021
export const handle_autofill = async (params: {
2122
prompt_view_provider: PromptViewProvider
@@ -106,7 +107,7 @@ export const handle_autofill = async (params: {
106107
if (sent) {
107108
params.prompt_view_provider.send_message({
108109
command: 'SHOW_AUTO_CLOSING_MODAL',
109-
title: 'Continue in the connected browser',
110+
title: t('views.prompt.handlers.common.continue-in-browser'),
110111
type: 'success'
111112
})
112113
}

‎apps/editor/src/views/prompt/backend/message-handlers/handle-preview-web-configuration.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
EDIT_FORMAT_INSTRUCTIONS_DIFF
1111
} from '@/constants/edit-format-instructions'
1212
import { PromptBuilder } from '@/utils/prompt-builder'
13+
import { t } from '@/i18n'
1314

1415
export const handle_preview_web_configuration = async (
1516
prompt_view_provider: PromptViewProvider,
@@ -78,7 +79,7 @@ export const handle_preview_web_configuration = async (
7879
if (sent) {
7980
prompt_view_provider.send_message({
8081
command: 'SHOW_AUTO_CLOSING_MODAL',
81-
title: 'Continue in the connected browser',
82+
title: t('views.prompt.handlers.common.continue-in-browser'),
8283
type: 'success'
8384
})
8485
}

0 commit comments

Comments
 (0)