fix(i18n): route dirty-guard and html-editor strings through TranslateService
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
window.confirm/window.prompt calls in projectEditorDirtyGuard and MarketplaceHtmlEditorComponent, and the hardcoded Preview/Code toggle label in its template, bypassed the app's translation pipeline. Add builder.confirmLeaveUnsaved, promptLinkUrl, promptImageUrl, htmlEditorCode and htmlEditorPreview keys (en/ru/hy), resolve them via TranslateService.t() before passing to confirm/prompt, and use TranslatePipe for the toggle button label.
This commit is contained in:
@@ -517,6 +517,11 @@ export const en: Translations = {
|
||||
unsavedChanges: 'Unsaved changes',
|
||||
save: 'Save',
|
||||
publish: 'Publish',
|
||||
confirmLeaveUnsaved: 'You have unsaved changes. Leave anyway?',
|
||||
promptLinkUrl: 'URL',
|
||||
promptImageUrl: 'Image URL',
|
||||
htmlEditorCode: 'Code',
|
||||
htmlEditorPreview: 'Preview',
|
||||
},
|
||||
staticPages: {
|
||||
notFound: 'Page not found',
|
||||
|
||||
@@ -517,6 +517,11 @@ export const hy: Translations = {
|
||||
unsavedChanges: 'Չպահված փոփոխություններ',
|
||||
save: 'Պահպանել',
|
||||
publish: 'Հրապարակել',
|
||||
confirmLeaveUnsaved: 'Կան չպահված փոփոխություններ։ Այնուամենայնիվ դուրս գա՞լ։',
|
||||
promptLinkUrl: 'URL',
|
||||
promptImageUrl: 'Նկարի URL',
|
||||
htmlEditorCode: 'Կոդ',
|
||||
htmlEditorPreview: 'Նախադիտում',
|
||||
},
|
||||
staticPages: {
|
||||
notFound: 'Էջը չի գտնվել',
|
||||
|
||||
@@ -517,6 +517,11 @@ export const ru: Translations = {
|
||||
unsavedChanges: 'Есть несохранённые изменения',
|
||||
save: 'Сохранить',
|
||||
publish: 'Опубликовать',
|
||||
confirmLeaveUnsaved: 'Есть несохранённые изменения. Всё равно уйти?',
|
||||
promptLinkUrl: 'URL',
|
||||
promptImageUrl: 'URL изображения',
|
||||
htmlEditorCode: 'Код',
|
||||
htmlEditorPreview: 'Предпросмотр',
|
||||
},
|
||||
staticPages: {
|
||||
notFound: 'Страница не найдена',
|
||||
|
||||
@@ -515,6 +515,11 @@ export interface Translations {
|
||||
unsavedChanges: string;
|
||||
save: string;
|
||||
publish: string;
|
||||
confirmLeaveUnsaved: string;
|
||||
promptLinkUrl: string;
|
||||
promptImageUrl: string;
|
||||
htmlEditorCode: string;
|
||||
htmlEditorPreview: string;
|
||||
};
|
||||
staticPages: {
|
||||
notFound: string;
|
||||
|
||||
Reference in New Issue
Block a user