From 872a1428076a02b49d391a86f7bc3f2a311c92d5 Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 3 Nov 2025 11:09:15 +0100 Subject: [PATCH 01/27] missing negative button interpolation in apos confirm modal --- .../modal/ui/apos/components/AposModalConfirm.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue b/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue index 1ac5b3fc72..4e9ad6ebac 100644 --- a/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue +++ b/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue @@ -61,7 +61,7 @@ v-if="mode !== 'alert'" :attrs="{'data-apos-focus-priority': mode !== 'alert' ? true : null}" class="apos-confirm__btn" - :label="content.negativeLabel || 'apostrophe:cancel'" + :label="negativeLabel" @click="cancel" /> Date: Mon, 3 Nov 2025 11:09:21 +0100 Subject: [PATCH 02/27] adds translation keys --- modules/@apostrophecms/i18n/i18n/en.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/@apostrophecms/i18n/i18n/en.json b/modules/@apostrophecms/i18n/i18n/en.json index 5a09e4e285..0d237cad71 100644 --- a/modules/@apostrophecms/i18n/i18n/en.json +++ b/modules/@apostrophecms/i18n/i18n/en.json @@ -87,9 +87,9 @@ "clearSelection": "Clear Selection", "close": "Close", "closeGlobal": "Close Global Site Settings", + "collapseAll": "Collapse all", "colorFieldClickToSelect": "Click to select a color", "colorFieldColorValue": "Color {{ color }}.", - "collapseAll": "Collapse all", "commandMenuArchiveSelected": "Archive selected", "commandMenuContent": "Content", "commandMenuCreateNew": "Create new {{ type }}", @@ -116,6 +116,7 @@ "commandMenuWidgetDuplicate": "Duplicate Widget", "commandMenuWidgetPaste": "Paste Widget", "commandMenuWidgetRemove": "Remove Widget", + "confirm": "Confirm", "confirmArchive": "You are going to archive the {{ type }} {{ title }}.", "confirmSettings": "Confirm Settings", "contentArchived": "Content Archived", @@ -380,6 +381,7 @@ "next": "Next", "nextPage": "Next Page", "no": "No", + "noCreateBlankDoc": "No, create a blank {{ docType }}", "noDraftSubmissions": "No Draft Submissions to Manage", "noItemsAdded": "No Items Added", "noItemsSelected": "No Items Selected", @@ -395,6 +397,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Page not found", "notInLocale": "The current page doesn’t exist in {{ label }}. Localize the version from {{ currentLocale }}?", + "notInLocaleDoc": "The current {{ docType }} doesn’t exist in {{ label }}. Localize the version from {{ currentLocale }}?", "notYetPublished": "This document hasn't been published yet.", "notificationClearEventError": "There was an error clearing a registered notification event.", "nudgeDown": "Nudge Down", @@ -404,6 +407,7 @@ "oembedTypeNotSupported": "Embed type not supported", "oembedVideoUrlInvalid": "Video URL invalid", "office": "Office", + "ok": "OK", "openGlobal": "Open Global Site Settings", "openLinkInNewTab": "Open link in new tab", "page": "Page", @@ -578,6 +582,7 @@ "suggestionsHeader": "Try one of these suggestions:", "superscript": "Superscript", "switchLocalesAndLocalizePage": "Switch locales and localize page to {{ label }}?", + "switchLocalesAndLocalizeDoc": "Switch locales and localize {{ docType }} to {{ label }}?", "table": "Table", "tableDescription": "Add tabular content to your page", "tableImport": "Import Table", @@ -658,6 +663,7 @@ "willMoveImageToArchive": "This will move the image to the archive.", "yes": "Yes", "yesLocalizeAndSwitchLocales": "Yes, localize this page and switch locales", + "yesLocalizeAndSwitchLocalesDoc": "Yes, localize this {{ docType }} and switch locales", "youTookControl": "You took control of this document in another tab or window. A document can only be edited in one place at a time.", "yourDevice": "your device" } From ec69bdcaeff163a1e4af0c2bacc5ab2c3c2f710b Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 3 Nov 2025 11:09:52 +0100 Subject: [PATCH 03/27] adds confirmation modal in AposDocLocalePicker to ask for doc localization --- .../apos/components/AposDocLocalePicker.vue | 44 +++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue index 235d19ba96..f01c462b78 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue @@ -16,7 +16,7 @@ > { @@ -91,7 +90,7 @@ async function open() { const docs = await apos.http.get( `${props.moduleOptions.action}/${props.docId}/locales`, { busy: true } ); - localized.value = Object.fromEntries( + docLocalized.value = Object.fromEntries( docs.results .filter(doc => doc.aposLocale.endsWith(':draft')) .map(doc => [ doc.aposLocale.split(':')[0], doc ]) @@ -106,7 +105,7 @@ async function open() { async function checkCreatePermission() { const localesWithNoDocs = Object.keys(apos.i18n.locales) - .filter((locale) => !localized.value[locale]); + .filter((locale) => !docLocalized.value[locale]); const allowed = await apos.http.get(`${i18nAction}/locales-permissions`, { qs: { @@ -134,16 +133,16 @@ async function switchLocale(locale) { const save = props.isModified ? await apos.confirm({ heading: 'apostrophe:unsavedChanges', - description: $t( - 'apostrophe:localeSwitcherDiscardChangesPrompt', - { docType: props.moduleOptions.label.toLowerCase() } - ), + description: 'apostrophe:localeSwitcherDiscardChangesPrompt', negativeLabel: 'apostrophe:localeSwitcherDiscardChangesNegative', affirmativeLabel: 'apostrophe:localeSwitcherDiscardChangesAffirmative', icon: false }, { hasCloseButton: true, - tiny: true + tiny: true, + interpolate: { + docType + } }) : false; @@ -151,9 +150,28 @@ async function switchLocale(locale) { return; } + const isDocLocalized = docLocalized.value[locale.name]; + const shouldLocalize = !isDocLocalized + ? await apos.confirm({ + heading: 'apostrophe:switchLocalesAndLocalizeDoc', + description: 'apostrophe:notInLocaleDoc', + negativeLabel: 'apostrophe:noCreateBlankDoc', + affirmativeLabel: 'apostrophe:yesLocalizeAndSwitchLocalesDoc' + }, { + hasCloseButton: true, + tiny: true, + interpolate: { + docType, + label: locale.label, + currentLocale: props.locale + } + }) + : false; + emit('switch-locale', { locale: locale.name, - localized: localized.value[locale.name], + localized: docLocalized.value[locale.name], + shouldLocalize, save }); } From 49f523b2c5d5cf382f99180667c0c0fcd382562e Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 3 Nov 2025 15:40:25 +0100 Subject: [PATCH 04/27] rename shouldLocalize toLocalize, passes entire locale (name, label) to parent component --- .../doc-type/ui/apos/components/AposDocLocalePicker.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue index f01c462b78..163ab2b33f 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue @@ -151,7 +151,7 @@ async function switchLocale(locale) { } const isDocLocalized = docLocalized.value[locale.name]; - const shouldLocalize = !isDocLocalized + const toLocalize = !isDocLocalized ? await apos.confirm({ heading: 'apostrophe:switchLocalesAndLocalizeDoc', description: 'apostrophe:notInLocaleDoc', @@ -169,9 +169,9 @@ async function switchLocale(locale) { : false; emit('switch-locale', { - locale: locale.name, + locale, localized: docLocalized.value[locale.name], - shouldLocalize, + toLocalize, save }); } From 54669ba656f0979fbef1541d700cb42013335439 Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 3 Nov 2025 15:40:44 +0100 Subject: [PATCH 05/27] updaes AposDocEditor switchLocale method --- .../ui/apos/components/AposDocEditor.vue | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index 5068ba165a..2d6a366ceb 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -860,8 +860,9 @@ export default { this.modal.showModal = false; }, async switchLocale({ - locale, localized, save + locale, save, localized, toLocalize }) { + console.log('=====> switch locale in doc editor <====='); if (save) { const saved = await this.saveHandler('onSave', { keepOpen: true, @@ -874,17 +875,36 @@ export default { this.referenceDocId = saved._id; } } - this.updateModalData(this.modalData.id, { locale }); - this.localeSwitched = locale !== apos.i18n.locale; - this.published = null; if (localized) { this.currentId = localized._id; await this.instantiateExistingDoc(); - } else { + this.switchModalLocale(locale.name); + return; + } + if (!toLocalize) { this.currentId = ''; this.docType = this.moduleName; await this.instantiateNewDoc(); + this.switchModalLocale(locale.name); + return; } + + await apos.bus.$emit('admin-menu-click', { + itemName: '@apostrophecms/i18n:localize', + props: { + doc: this.docFields.data, + locale + } + }); + + console.log('=====> UPDATINGLOCALEDATA <====='); + this.switchModalLocale(locale.name); + }, + switchModalLocale(locale) { + console.log('locale', locale); + this.updateModalData(this.modalData.id, { locale }); + this.localeSwitched = locale !== apos.i18n.locale; + this.published = null; }, getRequestBody({ newInstance = false, update = false }) { const body = newInstance From df3ee5a82f6ae04fa7346f57302a938a7cc7d63b Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 3 Nov 2025 17:54:14 +0100 Subject: [PATCH 06/27] removes logs --- .../doc-type/ui/apos/components/AposDocEditor.vue | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index 2d6a366ceb..9dc5dd6723 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -862,7 +862,6 @@ export default { async switchLocale({ locale, save, localized, toLocalize }) { - console.log('=====> switch locale in doc editor <====='); if (save) { const saved = await this.saveHandler('onSave', { keepOpen: true, @@ -896,8 +895,6 @@ export default { locale } }); - - console.log('=====> UPDATINGLOCALEDATA <====='); this.switchModalLocale(locale.name); }, switchModalLocale(locale) { From b4e3fe3e94f89a8f4779010ce3a900b1d24408ba Mon Sep 17 00:00:00 2001 From: Jed Date: Mon, 3 Nov 2025 17:56:14 +0100 Subject: [PATCH 07/27] passes isManager props in AposDocLocaleSwitcher to handle different behavior, emit entire locale --- .../ui/apos/components/AposDocLocalePicker.vue | 11 ++++++++--- .../page/ui/apos/components/AposPagesManager.vue | 2 +- .../piece-type/ui/apos/components/AposDocsManager.vue | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue index 163ab2b33f..063d068ca4 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue @@ -20,7 +20,7 @@ :forbidden="forbidden" :forbidden-tooltip="forbiddenTooltip" :is-open="isOpen" - :show-localized="showLocalized" + :show-localized="!isManager" @switch-locale="switchLocale" /> @@ -53,9 +53,9 @@ const props = defineProps({ type: Boolean, required: true }, - showLocalized: { + isManager: { type: Boolean, - default: true + default: false } }); @@ -130,6 +130,11 @@ async function switchLocale(locale) { return; } + if (props.isManager) { + emit('switch-locale', { locale }); + return; + } + const save = props.isModified ? await apos.confirm({ heading: 'apostrophe:unsavedChanges', diff --git a/modules/@apostrophecms/page/ui/apos/components/AposPagesManager.vue b/modules/@apostrophecms/page/ui/apos/components/AposPagesManager.vue index 983649e7a2..156eb35276 100644 --- a/modules/@apostrophecms/page/ui/apos/components/AposPagesManager.vue +++ b/modules/@apostrophecms/page/ui/apos/components/AposPagesManager.vue @@ -29,7 +29,7 @@ :locale="modalData.locale" :module-options="moduleOptions" :is-modified="false" - :show-localized="false" + :is-manager="true" @switch-locale="switchLocale" /> diff --git a/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue b/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue index 2607ef7cde..b47a796533 100644 --- a/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue +++ b/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue @@ -30,7 +30,7 @@ :locale="modalData.locale" :module-options="moduleOptions" :is-modified="false" - :show-localized="false" + :is-manager="true" @switch-locale="switchLocale" /> @@ -585,9 +585,9 @@ export default { } } }, - async switchLocale({ locale, localized }) { - this.updateModalData(this.modalData.id, { locale }); - this.localeSwitched = locale !== apos.i18n.locale; + async switchLocale({ locale }) { + this.updateModalData(this.modalData.id, { locale: locale.name }); + this.localeSwitched = locale.name !== apos.i18n.locale; this.currentPage = 1; From 0bd99b54f17bbf5ca4837a936ef8a6e8e4d9cdd3 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 11:03:50 +0100 Subject: [PATCH 08/27] gets current locale from modalData in localize modal --- .../i18n/ui/apos/components/AposI18nLocalize.vue | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue index 96a4cd6ddd..b5bc243296 100644 --- a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +++ b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue @@ -3,6 +3,7 @@ class="apos-wizard apos-i18n-localize" :class="{ 'apos-wizard-busy': wizard.busy }" :modal="modal" + :modal-data="modalData" @esc="close" @inactive="modal.active = false" @show-modal="modal.showModal = true" @@ -324,6 +325,10 @@ export default { moduleName: { required: true, type: String + }, + modalData: { + type: Object, + required: true } }, emits: [ 'modal-result' ], @@ -484,13 +489,6 @@ export default { isBatchMode() { return this.batchOptions.enabled; }, - currentLocale() { - // We need to grab the locale from the modal data, because it can change - // while in modal (switch locale in editor modal). - // Exposing `modalData` property breaks the internally used AposModal - // component for some unknown reason, so we need to use the attrs. - return this.$attrs['modal-data']?.locale ?? this.moduleOptions.locale; - }, action() { return this.doc.slug.startsWith('/') ? apos.page.action @@ -693,7 +691,7 @@ export default { return this.wizard.step === name; }, isCurrentLocale(locale) { - return this.currentLocale === locale.name; + return this.modalData.locale === locale.name; }, canEditLocale(locale) { return !!locale._edit; From e7e3d3df4f29cd4131b6ff2ae3a8b36c40cfc1cd Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 15:03:23 +0100 Subject: [PATCH 09/27] emits modal result when localizing document if has been done or not --- .../ui/apos/components/AposI18nLocalize.vue | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue index b5bc243296..870203aec3 100644 --- a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +++ b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue @@ -4,7 +4,7 @@ :class="{ 'apos-wizard-busy': wizard.busy }" :modal="modal" :modal-data="modalData" - @esc="close" + @esc="close(false)" @inactive="modal.active = false" @show-modal="modal.showModal = true" > @@ -28,7 +28,7 @@ type="default" label="apostrophe:cancel" :modifiers="[ 'block' ]" - @click="close" + @click="close(false)" /> @@ -329,6 +329,10 @@ export default { modalData: { type: Object, required: true + }, + redirect: { + type: Boolean, + default: true } }, emits: [ 'modal-result' ], @@ -660,9 +664,10 @@ export default { this.toLocalizeChoices = this.toLocalizeChoicesStandalone; } }, - close() { + close(hasBeenSubmitted = false) { if (!this.modal.busy) { this.modal.showModal = false; + this.$emit('modal-result', hasBeenSubmitted); } }, goTo(name) { @@ -849,7 +854,7 @@ export default { locale: locale.name } }); - if (result.redirectTo) { + if (this.redirect && result.redirectTo) { window.location.assign(result.redirectTo); } } @@ -876,7 +881,7 @@ export default { if (notifications.some(({ type }) => type === 'error')) { this.modal.busy = false; - this.close(); + this.close(true); await apos.report( { @@ -938,7 +943,7 @@ export default { // Prevent flashing of the UI if the request returns quickly setTimeout(() => { this.modal.busy = false; - this.close(); + this.close(true); }, 250); }, async submitBatch() { From 6d6cd156860411d2c8067c4cb73ebe5bb3df8cea Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 15:03:50 +0100 Subject: [PATCH 10/27] if toLocalize is null (the use closed the modal) just do nothing --- .../doc-type/ui/apos/components/AposDocLocalePicker.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue index 063d068ca4..286f44e5ae 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue @@ -173,6 +173,10 @@ async function switchLocale(locale) { }) : false; + if (toLocalize === null) { + return; + } + emit('switch-locale', { locale, localized: docLocalized.value[locale.name], From 37fe79a2e33aaadd784d0243e257a256c52045ac Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 15:29:02 +0100 Subject: [PATCH 11/27] set currentId in instantiateExistingDoc method, no more slug conflicts when localizing --- .../ui/apos/components/AposDocEditor.vue | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index 9dc5dd6723..93b1dad0b3 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -533,7 +533,7 @@ export default { } const canEdit = docData._edit || this.moduleOptions.canEdit; this.readOnly = canEdit === false; - if (canEdit && !await this.lock(this.getOnePath, this.currentId)) { + if (canEdit && !await this.lock(this.getOnePath, docData._id)) { this.lockNotAvailable(); } } catch { @@ -548,6 +548,7 @@ export default { if (docData.type !== this.docType) { this.docType = docData.type; } + this.currentId = docData._id; this.original = klona(docData); this.docFields.data = docData; // TODO: Is this block even useful since published is fetched after @@ -875,30 +876,32 @@ export default { } } if (localized) { - this.currentId = localized._id; - await this.instantiateExistingDoc(); this.switchModalLocale(locale.name); + await this.instantiateExistingDoc(); return; } if (!toLocalize) { + this.switchModalLocale(locale.name); this.currentId = ''; this.docType = this.moduleName; await this.instantiateNewDoc(); - this.switchModalLocale(locale.name); return; } - await apos.bus.$emit('admin-menu-click', { - itemName: '@apostrophecms/i18n:localize', - props: { - doc: this.docFields.data, - locale - } + const doc = save ? this.docFields.data : this.original; + const isLocalized = await apos.modal.execute('AposI18nLocalize', { + doc, + locale, + redirect: false }); - this.switchModalLocale(locale.name); + + if (isLocalized) { + this.switchModalLocale(locale.name); + await this.$nextTick(); + await this.instantiateExistingDoc(); + } }, switchModalLocale(locale) { - console.log('locale', locale); this.updateModalData(this.modalData.id, { locale }); this.localeSwitched = locale !== apos.i18n.locale; this.published = null; From ee84a64594ee856269706b74a68dcb0f956318f9 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 15:37:24 +0100 Subject: [PATCH 12/27] adds translation in all locales --- modules/@apostrophecms/i18n/i18n/de.json | 12 +++++++++--- modules/@apostrophecms/i18n/i18n/es.json | 10 ++++++++-- modules/@apostrophecms/i18n/i18n/fr.json | 10 ++++++++-- modules/@apostrophecms/i18n/i18n/it.json | 10 ++++++++-- modules/@apostrophecms/i18n/i18n/pt-BR.json | 10 ++++++++-- modules/@apostrophecms/i18n/i18n/sk.json | 10 ++++++++-- 6 files changed, 49 insertions(+), 13 deletions(-) diff --git a/modules/@apostrophecms/i18n/i18n/de.json b/modules/@apostrophecms/i18n/i18n/de.json index d5be4a4604..b9e21f5d34 100644 --- a/modules/@apostrophecms/i18n/i18n/de.json +++ b/modules/@apostrophecms/i18n/i18n/de.json @@ -62,9 +62,9 @@ "batchPublishCompleted": "{{ count }} {{ type }} veröffentlicht.", "batchPublishProgress": "Veröffentlichung {{ type }}...", "batchRestoreCompleted": "{{ count }} {{ type }} wiederhergestellt.", + "batchRestoreProgress": "Wiederherstellung {{ type }}...", "batchTagProgress": "Taggen von {{ count }} {{ type }}...", "batchUntagProgress": "Entfernen der Markierung von {{ count }} {{ type }}...", - "batchRestoreProgress": "Wiederherstellung {{ type }}...", "breakpointPreviewClear": "Klarer Haltepunkt", "breakpointPreviewDesktop": "Desktop", "breakpointPreviewExit": "Beenden", @@ -85,9 +85,9 @@ "clearSelection": "Auswahl löschen", "close": "Schliessen", "closeGlobal": "Globale Einstellungen schliessen", + "collapseAll": "Alles einklappen", "colorFieldClickToSelect": "Klicken, um eine Farbe auszuwählen", "colorFieldColorValue": "Farbe {{ color }}.", - "collapseAll": "Alles einklappen", "commandMenuArchiveSelected": "Archiv ausgewählt", "commandMenuContent": "Inhalt", "commandMenuCreateNew": "Neuen {{ type }} erstellenCreate new {{ type }}", @@ -114,6 +114,7 @@ "commandMenuWidgetDuplicate": "Duplizieren Widget", "commandMenuWidgetPaste": "Einfügen Widget", "commandMenuWidgetRemove": "Entfernen Widget", + "confirm": "Bestätigen", "confirmArchive": "{{ type }} {{ title }} archivieren?", "confirmSettings": "Einstellungen bestätigen", "contentArchived": "Inhalt archiviert", @@ -337,8 +338,8 @@ "mergeCells": "Zellen zusammenführen", "minLabel": "Min:", "minSize": "Minimale Grösse {{ width }}x{{ height }}", - "minimumSize": "Mindestgröße von {{ width }} x {{ height }} px", "minUi": "Min: {{ number }}", + "minimumSize": "Mindestgröße von {{ width }} x {{ height }} px", "modalBreadcrumbsDefaultLabel": "Eine Bezeichnung festlegen", "modalTabsError": "Fehler", "modalTabsErrors": "Fehler", @@ -358,6 +359,7 @@ "next": "Weiter", "nextPage": "Nächste Seite", "no": "Nein", + "noCreateBlankDoc": "Nein, leeres {{ docType }} erstellen", "noDraftSubmissions": "Keine Entwürfe", "noItemsAdded": "Keine Elemente hinzugefügt", "noItemsSelected": "Keine Elemente ausgewählt", @@ -373,6 +375,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Seite nicht gefunden", "notInLocale": "Die Seite existiert nicht in {{ label }}. Aus {{ currentLocale }} übersetzen?", + "notInLocaleDoc": "Das aktuelle {{ docType }} existiert nicht in {{ label }}. Version aus {{ currentLocale }} lokalisieren?", "notYetPublished": "Dieses Dokument wurde noch nicht veröffentlicht.", "notificationClearEventError": "Fehler beim Löschen der Benachrichtigung", "nudgeDown": "Nach unten verschieben", @@ -382,6 +385,7 @@ "oembedTypeNotSupported": "Einbettungstyp nicht unterstützt", "oembedVideoUrlInvalid": "Video-URL ungültig", "office": "Büro", + "ok": "OK", "openGlobal": "Globale Einstellungen öffnen", "openLinkInNewTab": "Link in neuem Tab öffnen", "page": "Seite", @@ -555,6 +559,7 @@ "subscript": "Tiefgestellt", "suggestionsHeader": "Probiere einen der folgenden Vorschläge:", "superscript": "Hochgestellt", + "switchLocalesAndLocalizeDoc": "Sprache wechseln und {{ docType }} für {{ label }} lokalisieren?", "switchLocalesAndLocalizePage": "Sprache ändern zu {{ label }}?", "table": "Tabelle", "tableDescription": "Fügen Sie tabellarische Inhalte zu Ihrer Seite hinzu", @@ -634,6 +639,7 @@ "willMoveImageToArchive": "Bild ins Archiv verschieben.", "yes": "Ja", "yesLocalizeAndSwitchLocales": "Ja, diese Seite übersetzen und zu der Sprache wechseln.", + "yesLocalizeAndSwitchLocalesDoc": "Ja, dieses {{ docType }} lokalisieren und Sprache wechseln", "youTookControl": "Du hast die Kontrolle über dieses Dokument in einer anderen Registerkarte oder einem anderen Fenster übernommen. Ein Dokument kann immer nur an einer Stelle bearbeitet werden.", "yourDevice": "Ihr Gerät" } diff --git a/modules/@apostrophecms/i18n/i18n/es.json b/modules/@apostrophecms/i18n/i18n/es.json index 547e897d93..7f38ebc51f 100644 --- a/modules/@apostrophecms/i18n/i18n/es.json +++ b/modules/@apostrophecms/i18n/i18n/es.json @@ -85,9 +85,9 @@ "clearSelection": "Borrar Selección", "close": "Cerrar", "closeGlobal": "Cerrar Configuración Global del Sitio", + "collapseAll": "Colapsar todo", "colorFieldClickToSelect": "Haz clic para seleccionar un color", "colorFieldColorValue": "Color {{ color }}.", - "collapseAll": "Colapsar todo", "commandMenuArchiveSelected": "Archivo seleccionado", "commandMenuContent": "Contenido", "commandMenuCreateNew": "Nuevo {{ type }}", @@ -114,6 +114,7 @@ "commandMenuWidgetDuplicate": "Duplicar Componente", "commandMenuWidgetPaste": "Pegar Componente", "commandMenuWidgetRemove": "Eliminar Componente", + "confirm": "Confirmar", "confirmArchive": "Va a archivar el {{ type }} {{ title }}.", "confirmSettings": "Confirmar Configuración", "contentArchived": "Contenido Archivado", @@ -337,8 +338,8 @@ "mergeCells": "Combinar celdas", "minLabel": "Mín:", "minSize": "Tamaño mínimo de {{ width }}x{{ height }}", - "minimumSize": "Tamaño mínimo de {{ ancho }} x {{ alto }} px", "minUi": "Mín: {{ number }}", + "minimumSize": "Tamaño mínimo de {{ ancho }} x {{ alto }} px", "modalBreadcrumbsDefaultLabel": "Establecer una etiqueta", "modalTabsError": "Error", "modalTabsErrors": "Errores", @@ -358,6 +359,7 @@ "next": "Siguiente", "nextPage": "Siguiente Página", "no": "No", + "noCreateBlankDoc": "No, crear un {{ docType }} en blanco", "noDraftSubmissions": "Ninguna Propuesta de Borrador a Administrar", "noItemsAdded": "No se añadieron elementos", "noItemsSelected": "Ningún Elemento Seleccionado", @@ -373,6 +375,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Página no encontrada", "notInLocale": "La página actual no existe en {{ label }}. ¿Traducir la versión desde la configuración regional {{ currentLocale }}?", + "notInLocaleDoc": "El {{ docType }} actual no existe en {{ label }}. ¿Localizar la versión desde {{ currentLocale }}?", "notYetPublished": "Este documento aún no ha sido publicado.", "notificationClearEventError": "Hubo un error al limpiar un evento de notificación registrado.", "nudgeDown": "Mover Hacia Arriba", @@ -382,6 +385,7 @@ "oembedTypeNotSupported": "Tipo de inserción no soportado", "oembedVideoUrlInvalid": "URL de video inválido", "office": "Oficina", + "ok": "OK", "openGlobal": "Abrir Configuración Global del Sitio", "openLinkInNewTab": "Abrir enlace en una nueva pestaña", "page": "Página", @@ -555,6 +559,7 @@ "subscript": "Subíndice", "suggestionsHeader": "Intente una de estas sugerencias:", "superscript": "Superíndice", + "switchLocalesAndLocalizeDoc": "¿Cambiar idiomas y localizar {{ docType }} a {{ label }}?", "switchLocalesAndLocalizePage": "¿Cambiar de configuracion regional y traducir la página a la configuracion regional {{ label }}?", "table": "Tabla", "tableDescription": "Agregar contenido tabular a tu página", @@ -634,6 +639,7 @@ "willMoveImageToArchive": "Esto moverá la imagen al archivo de documentos.", "yes": "Sí", "yesLocalizeAndSwitchLocales": "Sí, traducir esta página y cambiar de configuración regional", + "yesLocalizeAndSwitchLocalesDoc": "Sí, localizar este {{ docType }} y cambiar idiomas", "youTookControl": "Tomó el control de este documento en otra pestaña o ventana. Un documento sólo puede ser editado en un lugar a la vez.", "yourDevice": "su dispositivo" } diff --git a/modules/@apostrophecms/i18n/i18n/fr.json b/modules/@apostrophecms/i18n/i18n/fr.json index 46b4ca2058..4aa41352fd 100644 --- a/modules/@apostrophecms/i18n/i18n/fr.json +++ b/modules/@apostrophecms/i18n/i18n/fr.json @@ -85,9 +85,9 @@ "clearSelection": "Effacer la sélection", "close": "Fermer", "closeGlobal": "Fermer les paramètres globaux du site", + "collapseAll": "Tout réduire", "colorFieldClickToSelect": "Cliquez pour sélectionner une couleur", "colorFieldColorValue": "Couleur {{ color }}.", - "collapseAll": "Tout réduire", "commandMenuArchiveSelected": "Archiver la sélection.", "commandMenuContent": "Contenu", "commandMenuCreateNew": "Nouveau: {{ type }}", @@ -114,6 +114,7 @@ "commandMenuWidgetDuplicate": "Dupliquer Widget", "commandMenuWidgetPaste": "Coller Widget", "commandMenuWidgetRemove": "Supprimer Widget", + "confirm": "Confirmer", "confirmArchive": "Vous vous apprêtez à archiver {{ type }} {{ title }}.", "confirmSettings": "Confirmer les paramètres", "contentArchived": "Contenu archivé", @@ -337,8 +338,8 @@ "mergeCells": "Fusionner les cellules", "minLabel": "Min :", "minSize": "Taille minimale de {{ width }}x{{ height }}", - "minimumSize": "Taille minimale de {{ width }} x {{ height }} px", "minUi": "Min : {{ number }}", + "minimumSize": "Taille minimale de {{ width }} x {{ height }} px", "modalBreadcrumbsDefaultLabel": "Définir une étiquette", "modalTabsError": "Erreur", "modalTabsErrors": "Erreurs", @@ -358,6 +359,7 @@ "next": "Suivant", "nextPage": "Page suivante", "no": "Non", + "noCreateBlankDoc": "Non, créer un {{ docType }} vierge", "noDraftSubmissions": "Pas de soumission de brouillon à gérer", "noItemsAdded": "Aucun élément ajouté", "noItemsSelected": "Pas d'élément sélectionné", @@ -373,6 +375,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Page non trouvée", "notInLocale": "La page courante n'existe pas en {{ label }}. Changez la langue en {{ currentLocale }} ?", + "notInLocaleDoc": "Le {{ docType }} actuel n'existe pas en {{ label }}. Localiser la version depuis {{ currentLocale }} ?", "notYetPublished": "Ce document n'a pas encore été publié.", "notificationClearEventError": "Une erreur s'est produite lors de la suppression d'un événement de notification enregistré.", "nudgeDown": "Déplacer vers le bas", @@ -382,6 +385,7 @@ "oembedTypeNotSupported": "Type d'intégration non pris en charge", "oembedVideoUrlInvalid": "URL de la vidéo invalide", "office": "Bureau", + "ok": "OK", "openGlobal": "Ouvrir les paramètres globaux du site", "openLinkInNewTab": "Ouvrir le lien dans un nouvel onglet", "page": "Page", @@ -555,6 +559,7 @@ "subscript": "Indice", "suggestionsHeader": "Essayez l'une de ces suggestions :", "superscript": "Exposant", + "switchLocalesAndLocalizeDoc": "Changer de langue et localiser {{ docType }} en {{ label }} ?", "switchLocalesAndLocalizePage": "Changer la langue et basculer la page vers {{ label }} ?", "table": "Tableau", "tableDescription": "Ajouter du contenu tabulaire à votre page", @@ -634,6 +639,7 @@ "willMoveImageToArchive": "Cela déplacera l'image vers l'archive.", "yes": "Oui", "yesLocalizeAndSwitchLocales": "Oui, changer la langue de cette page et basculer de langue", + "yesLocalizeAndSwitchLocalesDoc": "Oui, localiser ce {{ docType }} et changer de langue", "youTookControl": "Vous avez pris le contrôle de ce document dans un autre onglet ou une autre fenêtre. Un document ne peut être modifié qu'à un seul endroit à la fois.", "yourDevice": "votre appareil" } diff --git a/modules/@apostrophecms/i18n/i18n/it.json b/modules/@apostrophecms/i18n/i18n/it.json index 43cb46e1f0..8e24d555f8 100644 --- a/modules/@apostrophecms/i18n/i18n/it.json +++ b/modules/@apostrophecms/i18n/i18n/it.json @@ -85,9 +85,9 @@ "clearSelection": "Cancella selezione", "close": "Chiudi", "closeGlobal": "Chiudi impostazioni globali del sito", + "collapseAll": "Collassa tutto", "colorFieldClickToSelect": "Fai clic per selezionare un colore", "colorFieldColorValue": "Colore {{ color }}.", - "collapseAll": "Collassa tutto", "commandMenuArchiveSelected": "Archivia selezionato", "commandMenuContent": "Contenuto", "commandMenuCreateNew": "Crea nuovo/a {{ type }}", @@ -114,6 +114,7 @@ "commandMenuWidgetDuplicate": "Duplica Widget", "commandMenuWidgetPaste": "Incolla Widget", "commandMenuWidgetRemove": "Rimuovi Widget", + "confirm": "Conferma", "confirmArchive": "Stai per archiviare {{ type }} {{ title }}.", "confirmSettings": "Conferma le impostazioni", "contentArchived": "Contenuto archiviato", @@ -337,8 +338,8 @@ "mergeCells": "Unisci celle", "minLabel": "Minimo:", "minSize": "Dimensione minima di {{ width }}x{{ height }}", - "minimumSize": "Dimensione minima di {{ width }} x {{ height }} px", "minUi": "Minimo: {{ number }}", + "minimumSize": "Dimensione minima di {{ width }} x {{ height }} px", "modalBreadcrumbsDefaultLabel": "Imposta un'etichetta", "modalTabsError": "Errore", "modalTabsErrors": "Errori", @@ -358,6 +359,7 @@ "next": "Successivo", "nextPage": "Pagina successiva", "no": "No", + "noCreateBlankDoc": "No, crea un {{ docType }} vuoto", "noDraftSubmissions": "Nessuna proposta in bozza da gestire", "noItemsAdded": "Nessun elemento aggiunto", "noItemsSelected": "Nessun elemento selezionato", @@ -373,6 +375,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Pagina non trovata", "notInLocale": "La pagina attuale non esiste in {{ label }}. Localizza la versione da {{ currentLocale }}?", + "notInLocaleDoc": "Il {{ docType }} corrente non esiste in {{ label }}. Localizzare la versione da {{ currentLocale }}?", "notYetPublished": "Questo documento non è ancora stato pubblicato.", "notificationClearEventError": "Si è verificato un errore durante la cancellazione di un evento di notifica registrato.", "nudgeDown": "Spostamento in giù", @@ -382,6 +385,7 @@ "oembedTypeNotSupported": "Tipo di incorporamento non supportato", "oembedVideoUrlInvalid": "URL video non valido", "office": "Ufficio", + "ok": "OK", "openGlobal": "Apri le impostazioni globali del sito", "openLinkInNewTab": "Apri il link in una nuova scheda", "page": "Pagina", @@ -555,6 +559,7 @@ "subscript": "Pedice", "suggestionsHeader": "Prova uno di questi suggerimenti:", "superscript": "Apice", + "switchLocalesAndLocalizeDoc": "Cambiare lingua e localizzare {{ docType }} in {{ label }}?", "switchLocalesAndLocalizePage": "Passare alle località e localizzare la pagina su {{ label }}?", "table": "Tabella", "tableDescription": "Aggiungi una tabella alla tua pagina", @@ -634,6 +639,7 @@ "willMoveImageToArchive": "Ciò sposterà l'immagine nell'archivio.", "yes": "Sì", "yesLocalizeAndSwitchLocales": "Sì, localizza questa pagina e passa alle località", + "yesLocalizeAndSwitchLocalesDoc": "Sì, localizza questo {{ docType }} e cambia lingua", "youTookControl": "Hai preso il controllo di questo documento in un'altra scheda o finestra. Un documento può essere modificato in un solo luogo alla volta.", "yourDevice": "il tuo dispositivo" } diff --git a/modules/@apostrophecms/i18n/i18n/pt-BR.json b/modules/@apostrophecms/i18n/i18n/pt-BR.json index 7f7798a64b..b19fdb3f66 100644 --- a/modules/@apostrophecms/i18n/i18n/pt-BR.json +++ b/modules/@apostrophecms/i18n/i18n/pt-BR.json @@ -85,9 +85,9 @@ "clearSelection": "Limpar Seleção", "close": "Fechar", "closeGlobal": "Fechar Configurações Globais do Site", + "collapseAll": "Colapsar todos", "colorFieldClickToSelect": "Clique para selecionar uma cor", "colorFieldColorValue": "Cor {{ color }}.", - "collapseAll": "Colapsar todos", "commandMenuArchiveSelected": "Arquivo selecionado", "commandMenuContent": "Conteúdo", "commandMenuCreateNew": "Novo(a) {{ type }}", @@ -114,6 +114,7 @@ "commandMenuWidgetDuplicate": "Duplicar Widget", "commandMenuWidgetPaste": "Colar Widget", "commandMenuWidgetRemove": "Remover Widget", + "confirm": "Confirmar", "confirmArchive": "Você vai arquivar o(a) {{ type }} {{ title }}.", "confirmSettings": "Confirmar Configurações", "contentArchived": "Conteúdo Arquivado", @@ -337,8 +338,8 @@ "mergeCells": "Mesclar Células", "minLabel": "Mín:", "minSize": "Tamanho mínimo de {{ width }}x{{ height }}", - "minimumSize": "Tamanho mínimo de {{ width }} x {{ height }} px", "minUi": "Mín: {{ number }}", + "minimumSize": "Tamanho mínimo de {{ width }} x {{ height }} px", "modalBreadcrumbsDefaultLabel": "Defina uma etiqueta", "modalTabsError": "Erro", "modalTabsErrors": "Erros", @@ -358,6 +359,7 @@ "next": "Próximo(a)", "nextPage": "Próxima Página", "no": "Não", + "noCreateBlankDoc": "Não, criar um {{ docType }} em branco", "noDraftSubmissions": "Nenhum envio de rascunho para gerenciar", "noItemsAdded": "Nenhum Item Adicionado", "noItemsSelected": "Nenhum item selecionado", @@ -373,6 +375,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Página não encontrada", "notInLocale": "A página atual não existe em {{ label }}. Fazer a localização de {{ currentLocale }}?", + "notInLocaleDoc": "O {{ docType }} atual não existe em {{ label }}. Localizar a versão de {{ currentLocale }}?", "notYetPublished": "Este documento ainda não foi publicado.", "notificationClearEventError": "Ocorreu um erro ao limpar um evento de notificação registrado.", "nudgeDown": "Arrastar para baixo", @@ -382,6 +385,7 @@ "oembedTypeNotSupported": "Tipo de incorporação não suportado", "oembedVideoUrlInvalid": "URL do vídeo inválido", "office": "Office", + "ok": "OK", "openGlobal": "Abrir Configurações Globais do Site", "openLinkInNewTab": "Abrir link em nova aba", "page": "Página", @@ -555,6 +559,7 @@ "subscript": "Subscrito", "suggestionsHeader": "Tente uma dessas sugestões:", "superscript": "Sobrescrito", + "switchLocalesAndLocalizeDoc": "Trocar idiomas e localizar {{ docType }} para {{ label }}?", "switchLocalesAndLocalizePage": "Mudar de localidade e localizar página para {{ label }}?", "table": "Tabela", "tableDescription": "Adicionar conteúdo tabular à sua página", @@ -634,6 +639,7 @@ "willMoveImageToArchive": "Isso moverá a imagem para o arquivo.", "yes": "Sim", "yesLocalizeAndSwitchLocales": "Sim, localize esta página e mude de local", + "yesLocalizeAndSwitchLocalesDoc": "Sim, localizar este {{ docType }} e trocar idiomas", "youTookControl": "Você assumiu o controle deste documento em outra guia ou janela. Um documento só pode ser editado em um lugar de cada vez.", "yourDevice": "seu dispositivo" } diff --git a/modules/@apostrophecms/i18n/i18n/sk.json b/modules/@apostrophecms/i18n/i18n/sk.json index f77d4ce7bb..90918d5774 100644 --- a/modules/@apostrophecms/i18n/i18n/sk.json +++ b/modules/@apostrophecms/i18n/i18n/sk.json @@ -85,9 +85,9 @@ "clearSelection": "Vymazať Výber", "close": "Zavrieť", "closeGlobal": " Zatvorte globálne nastavenia webu", + "collapseAll": "Zbaliť všetko", "colorFieldClickToSelect": "Kliknite pre výber farby", "colorFieldColorValue": "Farba {{ color }}.", - "collapseAll": "Zbaliť všetko", "commandMenuArchiveSelected": "Vybratý archív", "commandMenuContent": "Obsah", "commandMenuCreateNew": "Vytvoriť {{ type }}", @@ -114,6 +114,7 @@ "commandMenuWidgetDuplicate": "Duplikovať Prvok Stránky", "commandMenuWidgetPaste": "Prilepiť Prvok Stránky", "commandMenuWidgetRemove": "Odstrániť Prvok Stránky", + "confirm": "Confirmar", "confirmArchive": " Budete archivovať súbor {{ type }} {{ title }}.", "confirmSettings": "Potvrďiť nastavenia", "contentArchived": "Obsah archivovaný", @@ -337,8 +338,8 @@ "mergeCells": "Zlúčiť bunky", "minLabel": "Min:", "minSize": "Minimálna veľkosť {{ width }}x{{ height }}", - "minimumSize": "Minimálna veľkosť {{ šírka }} x {{ výška }} px", "minUi": "Min: {{ number }}", + "minimumSize": "Minimálna veľkosť {{ šírka }} x {{ výška }} px", "modalBreadcrumbsDefaultLabel": "Nastaviť názov", "modalTabsError": "Chyba", "modalTabsErrors": "Chyby", @@ -358,6 +359,7 @@ "next": "Ďalej", "nextPage": "Ďalšia strana", "no": "Nie", + "noCreateBlankDoc": "Não, criar um {{ docType }} em branco", "noDraftSubmissions": "Žiadne návrhy, ktoré by bolo možné spravovať", "noItemsAdded": "Nebol pridaný žiadny prvok", "noItemsSelected": "Nie sú vybraté žiadne položky", @@ -373,6 +375,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Stránka nenájdená", "notInLocale": "Aktuálna stránka v {{ label }} neexistuje. Preložte verziu z {{ currentLocale }}?", + "notInLocaleDoc": "O {{ docType }} atual não existe em {{ label }}. Localizar a versão de {{ currentLocale }}?", "notYetPublished": "Tento dokument ešte nebol zverejnený.", "notificationClearEventError": "Pri vymazávaní zaregistrovanej notifikačnej udalosti sa vyskytla chyba.", "nudgeDown": "Posunúť nadol", @@ -382,6 +385,7 @@ "oembedTypeNotSupported": "Typ vloženia nie je podporovaný", "oembedVideoUrlInvalid": "Neplatná URL videa", "office": "Kancelária", + "ok": "OK", "openGlobal": "Otvorte globálne nastavenia webu", "openLinkInNewTab": "Otvoriť odkaz v novej karte", "page": "Stránka", @@ -555,6 +559,7 @@ "subscript": "Dolný index", "suggestionsHeader": "Skúste jednu z týchto možností:", "superscript": "Horný index", + "switchLocalesAndLocalizeDoc": "Trocar idiomas e localizar {{ docType }} para {{ label }}?", "switchLocalesAndLocalizePage": "Prepnúť jazyk a preložiť stránku na {{ label }}?", "table": "Tabuľka", "tableDescription": "Pridať tabuľkový obsah na vašu stránku", @@ -634,6 +639,7 @@ "willMoveImageToArchive": "Tým sa obrázok presunie do archívu.", "yes": "Áno", "yesLocalizeAndSwitchLocales": "Áno, preložte túto stránku a prepnite jazykovú mutáciu", + "yesLocalizeAndSwitchLocalesDoc": "Sim, localizar este {{ docType }} e trocar idiomas", "youTookControl": "Nad týmto dokumentom ste prevzali kontrolu na inej karte alebo v inom okne. Dokument je možné naraz upravovať iba na jednom mieste.", "yourDevice": "vaše zariadenie" } From a4fa926303477dbef29dcb5fd1028188d4120943 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 15:39:36 +0100 Subject: [PATCH 13/27] adds changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 708b98a881..13989824a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## UNRELEASED + +### Adds + +* When switching locale from the doc editor, ask the user if he wants to localize the current one in the target locale or want to start a blank document. + ## 4.23.0 (2025-10-30) ### Adds From 097f45369957b4a1f5b500f1f3593902cd7393f0 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 15:45:07 +0100 Subject: [PATCH 14/27] fixes translation key --- .../modal/ui/apos/components/AposModalConfirm.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue b/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue index 4e9ad6ebac..a43222894f 100644 --- a/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue +++ b/modules/@apostrophecms/modal/ui/apos/components/AposModalConfirm.vue @@ -128,7 +128,7 @@ export default { this.localize(this.content.affirmativeLabel) || this.$t('apostrophe:confirm') ); } - return this.localize(this.content.affirmativeLabel) || this.$t('apostrohe:ok'); + return this.localize(this.content.affirmativeLabel) || this.$t('apostrophe:ok'); }, negativeLabel() { return this.localize(this.content.negativeLabel) || this.$t('apostrophe:cancel'); From 53960bfd3d6c54f54cdddfcc4d36d2bd57a7f7c4 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 16:30:48 +0100 Subject: [PATCH 15/27] fixes pages manager --- .../@apostrophecms/page/ui/apos/logic/AposPagesManager.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/@apostrophecms/page/ui/apos/logic/AposPagesManager.js b/modules/@apostrophecms/page/ui/apos/logic/AposPagesManager.js index 3592b0a9a2..eee25a3042 100644 --- a/modules/@apostrophecms/page/ui/apos/logic/AposPagesManager.js +++ b/modules/@apostrophecms/page/ui/apos/logic/AposPagesManager.js @@ -587,9 +587,9 @@ export default { } } }, - async switchLocale({ locale, localized }) { - this.updateModalData(this.modalData.id, { locale }); - this.localeSwitched = locale !== apos.i18n.locale; + async switchLocale({ locale }) { + this.updateModalData(this.modalData.id, { locale: locale.name }); + this.localeSwitched = locale.name !== apos.i18n.locale; this.currentPage = 1; From 6ce2cec130cc924e91ac386392b56f1106fe1b54 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 17:05:58 +0100 Subject: [PATCH 16/27] do not ask to localize if doc doesn't exist in current locale --- .../doc-type/ui/apos/components/AposDocLocalePicker.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue index 286f44e5ae..07ca8b5257 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue @@ -155,8 +155,9 @@ async function switchLocale(locale) { return; } + const docExist = docLocalized.value[props.locale]; const isDocLocalized = docLocalized.value[locale.name]; - const toLocalize = !isDocLocalized + const toLocalize = (docExist && !isDocLocalized) ? await apos.confirm({ heading: 'apostrophe:switchLocalesAndLocalizeDoc', description: 'apostrophe:notInLocaleDoc', From 3482501c8e137678bc14395ed66ff2277dd13697 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 19:34:13 +0100 Subject: [PATCH 17/27] removes duplicated updateModalData method instantiation --- .../piece-type/ui/apos/components/AposDocsManager.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue b/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue index b47a796533..acc049e9c4 100644 --- a/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue +++ b/modules/@apostrophecms/piece-type/ui/apos/components/AposDocsManager.vue @@ -194,7 +194,7 @@ export default { }; }, computed: { - ...mapState(useModalStore, [ 'activeModal', 'updateModalData' ]), + ...mapState(useModalStore, [ 'activeModal' ]), moduleOptions() { return window.apos.modules[this.moduleName]; }, From b82443deca1490fa3ca5147603c4581247e2865d Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 4 Nov 2025 19:35:05 +0100 Subject: [PATCH 18/27] uses saved doc to localize (if saved before to switch), passes moduleName to localize modal, sets missing currentId --- .../doc-type/ui/apos/components/AposDocEditor.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index 93b1dad0b3..51a1f28ef0 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -863,8 +863,9 @@ export default { async switchLocale({ locale, save, localized, toLocalize }) { + let saved; if (save) { - const saved = await this.saveHandler('onSave', { + saved = await this.saveHandler('onSave', { keepOpen: true, andPublish: false }); @@ -876,6 +877,7 @@ export default { } } if (localized) { + this.currentId = localized._id; this.switchModalLocale(locale.name); await this.instantiateExistingDoc(); return; @@ -888,10 +890,10 @@ export default { return; } - const doc = save ? this.docFields.data : this.original; const isLocalized = await apos.modal.execute('AposI18nLocalize', { - doc, + doc: saved || this.original, locale, + moduleName: this.moduleName, redirect: false }); From c15518017aed7d31629da1fa0edff62c1b20e700 Mon Sep 17 00:00:00 2001 From: Jed Date: Wed, 5 Nov 2025 11:41:13 +0100 Subject: [PATCH 19/27] fixes sk translations --- modules/@apostrophecms/i18n/i18n/sk.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/@apostrophecms/i18n/i18n/sk.json b/modules/@apostrophecms/i18n/i18n/sk.json index 90918d5774..9465acfbc6 100644 --- a/modules/@apostrophecms/i18n/i18n/sk.json +++ b/modules/@apostrophecms/i18n/i18n/sk.json @@ -114,7 +114,7 @@ "commandMenuWidgetDuplicate": "Duplikovať Prvok Stránky", "commandMenuWidgetPaste": "Prilepiť Prvok Stránky", "commandMenuWidgetRemove": "Odstrániť Prvok Stránky", - "confirm": "Confirmar", + "confirm": "Potvrdiť", "confirmArchive": " Budete archivovať súbor {{ type }} {{ title }}.", "confirmSettings": "Potvrďiť nastavenia", "contentArchived": "Obsah archivovaný", @@ -359,7 +359,7 @@ "next": "Ďalej", "nextPage": "Ďalšia strana", "no": "Nie", - "noCreateBlankDoc": "Não, criar um {{ docType }} em branco", + "noCreateBlankDoc": "Nie, vytvoriť prázdny {{ docType }}", "noDraftSubmissions": "Žiadne návrhy, ktoré by bolo možné spravovať", "noItemsAdded": "Nebol pridaný žiadny prvok", "noItemsSelected": "Nie sú vybraté žiadne položky", @@ -375,7 +375,7 @@ "notFoundPageStatusCode": "404", "notFoundPageTitle": "404 - Stránka nenájdená", "notInLocale": "Aktuálna stránka v {{ label }} neexistuje. Preložte verziu z {{ currentLocale }}?", - "notInLocaleDoc": "O {{ docType }} atual não existe em {{ label }}. Localizar a versão de {{ currentLocale }}?", + "notInLocaleDoc": "Aktuálny {{ docType }} neexistuje v {{ label }}. Lokalizovať verziu z {{ currentLocale }}?", "notYetPublished": "Tento dokument ešte nebol zverejnený.", "notificationClearEventError": "Pri vymazávaní zaregistrovanej notifikačnej udalosti sa vyskytla chyba.", "nudgeDown": "Posunúť nadol", @@ -559,7 +559,7 @@ "subscript": "Dolný index", "suggestionsHeader": "Skúste jednu z týchto možností:", "superscript": "Horný index", - "switchLocalesAndLocalizeDoc": "Trocar idiomas e localizar {{ docType }} para {{ label }}?", + "switchLocalesAndLocalizeDoc": "Prepnúť jazyk a lokalizovať {{ docType }} do {{ label }}?", "switchLocalesAndLocalizePage": "Prepnúť jazyk a preložiť stránku na {{ label }}?", "table": "Tabuľka", "tableDescription": "Pridať tabuľkový obsah na vašu stránku", @@ -639,7 +639,7 @@ "willMoveImageToArchive": "Tým sa obrázok presunie do archívu.", "yes": "Áno", "yesLocalizeAndSwitchLocales": "Áno, preložte túto stránku a prepnite jazykovú mutáciu", - "yesLocalizeAndSwitchLocalesDoc": "Sim, localizar este {{ docType }} e trocar idiomas", + "yesLocalizeAndSwitchLocalesDoc": "Áno, lokalizovať tento {{ docType }} a prepnúť jazyk", "youTookControl": "Nad týmto dokumentom ste prevzali kontrolu na inej karte alebo v inom okne. Dokument je možné naraz upravovať iba na jednom mieste.", "yourDevice": "vaše zariadenie" } From c03f0e3f1a93a66bc0c5758a7cdb50e23c886384 Mon Sep 17 00:00:00 2001 From: Jed Date: Wed, 5 Nov 2025 11:42:06 +0100 Subject: [PATCH 20/27] feedback changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13989824a3..06d7c6bef3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Adds -* When switching locale from the doc editor, ask the user if he wants to localize the current one in the target locale or want to start a blank document. +* When switching locale from the doc editor, ask if the user wants to localize the current document in the target locale or want to start a blank document. ## 4.23.0 (2025-10-30) From 439ed9373fd929185d9dcb81a6e20b34dca52701 Mon Sep 17 00:00:00 2001 From: Jed Date: Wed, 5 Nov 2025 14:50:41 +0100 Subject: [PATCH 21/27] fixes locale switcher localize modal translation for pages --- .../doc-type/ui/apos/components/AposDocLocalePicker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue index 07ca8b5257..7cba0405e7 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocLocalePicker.vue @@ -61,7 +61,7 @@ const props = defineProps({ const $t = inject('i18n'); const i18nAction = apos.modules['@apostrophecms/i18n'].action; -const docType = props.moduleOptions.label.toLowerCase(); +const docType = $t(props.moduleOptions.label)?.toLowerCase(); const forbiddenTooltip = $t('apostrophe:localeSwitcherPermissionToCreate', { docType }); const menu = ref(null); const docLocalized = ref({}); From 71b3579ec1a222af88f913c4f4c65da402a2e4b8 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 11 Nov 2025 09:36:42 +0100 Subject: [PATCH 22/27] feedback: removes last occurence of currentLocale in AposI18nLocalize (we use modalData.locale instead) --- .../@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue index 870203aec3..8e29d2ebf8 100644 --- a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +++ b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue @@ -1166,7 +1166,7 @@ export default { this.wizard.values.translateTargets.data = []; return; } - const sourceLocale = this.currentLocale; + const sourceLocale = this.modalData.locale; const targets = this.wizard.values.toLocales.data; let response; From acc79ac061e2d30983fa0112bed81cca9a73962d Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 11 Nov 2025 09:50:12 +0100 Subject: [PATCH 23/27] fixes call to lock method (1 param) and set currentId before that --- .../doc-type/ui/apos/components/AposDocEditor.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index 51a1f28ef0..40ddd7d1b7 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -526,6 +526,7 @@ export default { draft: true }); + this.currentId = docData._id; if (docData.archived) { this.restoreOnly = true; } else { @@ -533,7 +534,7 @@ export default { } const canEdit = docData._edit || this.moduleOptions.canEdit; this.readOnly = canEdit === false; - if (canEdit && !await this.lock(this.getOnePath, docData._id)) { + if (canEdit && !await this.lock(this.getOnePath)) { this.lockNotAvailable(); } } catch { @@ -548,7 +549,6 @@ export default { if (docData.type !== this.docType) { this.docType = docData.type; } - this.currentId = docData._id; this.original = klona(docData); this.docFields.data = docData; // TODO: Is this block even useful since published is fetched after From b30af9ac28787f1f4070bc66bc20ec8f0a613ccd Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 11 Nov 2025 10:29:43 +0100 Subject: [PATCH 24/27] removes useless nextTick await --- .../@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index 40ddd7d1b7..f1a4f3c3e2 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -899,7 +899,6 @@ export default { if (isLocalized) { this.switchModalLocale(locale.name); - await this.$nextTick(); await this.instantiateExistingDoc(); } }, From a544263ed2a35f1f49e76c3ad3e6c65926504da3 Mon Sep 17 00:00:00 2001 From: Jed Date: Tue, 11 Nov 2025 11:31:08 +0100 Subject: [PATCH 25/27] feedback: renaming, close / cance / confirm methods in localize modal, no call to redirect route --- .../ui/apos/components/AposDocEditor.vue | 2 +- .../ui/apos/components/AposI18nLocalize.vue | 32 +++++++++++++------ 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue index f1a4f3c3e2..d7e2e7e9fa 100644 --- a/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue +++ b/modules/@apostrophecms/doc-type/ui/apos/components/AposDocEditor.vue @@ -894,7 +894,7 @@ export default { doc: saved || this.original, locale, moduleName: this.moduleName, - redirect: false + shouldRedirect: false }); if (isLocalized) { diff --git a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue index 8e29d2ebf8..3aff624fa5 100644 --- a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +++ b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue @@ -4,7 +4,7 @@ :class="{ 'apos-wizard-busy': wizard.busy }" :modal="modal" :modal-data="modalData" - @esc="close(false)" + @esc="close()" @inactive="modal.active = false" @show-modal="modal.showModal = true" > @@ -28,7 +28,7 @@ type="default" label="apostrophe:cancel" :modifiers="[ 'block' ]" - @click="close(false)" + @click="cancel()" /> @@ -330,7 +330,7 @@ export default { type: Object, required: true }, - redirect: { + shouldRedirect: { type: Boolean, default: true } @@ -664,10 +664,22 @@ export default { this.toLocalizeChoices = this.toLocalizeChoicesStandalone; } }, - close(hasBeenSubmitted = false) { + confirm() { if (!this.modal.busy) { this.modal.showModal = false; - this.$emit('modal-result', hasBeenSubmitted); + this.$emit('modal-result', true); + } + }, + cancel() { + if (!this.modal.busy) { + this.modal.showModal = false; + this.$emit('modal-result', false); + } + }, + close() { + if (!this.modal.busy) { + this.modal.showModal = false; + this.$emit('modal-result', null); } }, goTo(name) { @@ -845,7 +857,7 @@ export default { relationship: doc._id === this.fullDoc._id }); - if (this.locale) { + if (this.locale && this.shouldRedirect) { // Ask for the redirect URL, this way it still works if we // need to carry a session across hostnames const result = await apos.http.post(`${this.moduleOptions.action}/locale`, { @@ -854,7 +866,7 @@ export default { locale: locale.name } }); - if (this.redirect && result.redirectTo) { + if (result.redirectTo) { window.location.assign(result.redirectTo); } } @@ -881,7 +893,7 @@ export default { if (notifications.some(({ type }) => type === 'error')) { this.modal.busy = false; - this.close(true); + this.close(); await apos.report( { @@ -943,7 +955,7 @@ export default { // Prevent flashing of the UI if the request returns quickly setTimeout(() => { this.modal.busy = false; - this.close(true); + this.confirm(); }, 250); }, async submitBatch() { @@ -975,7 +987,7 @@ export default { }); } finally { this.modal.busy = false; - this.close(); + this.confirm(); } }, getRelatedSchemaTypes(types) { From 50e78953ff449b2c0aeef850d1c4c1a428e2d50d Mon Sep 17 00:00:00 2001 From: Jed Date: Wed, 12 Nov 2025 10:57:17 +0100 Subject: [PATCH 26/27] rollbacks weird buggy code --- .../ui/apos/components/AposI18nLocalize.vue | 20 ++++++++++--------- .../modal/ui/apos/components/AposModal.vue | 2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue index 3aff624fa5..538f26424e 100644 --- a/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue +++ b/modules/@apostrophecms/i18n/ui/apos/components/AposI18nLocalize.vue @@ -3,8 +3,7 @@ class="apos-wizard apos-i18n-localize" :class="{ 'apos-wizard-busy': wizard.busy }" :modal="modal" - :modal-data="modalData" - @esc="close()" + @esc="close" @inactive="modal.active = false" @show-modal="modal.showModal = true" > @@ -28,7 +27,7 @@ type="default" label="apostrophe:cancel" :modifiers="[ 'block' ]" - @click="cancel()" + @click="cancel" /> @@ -326,10 +325,6 @@ export default { required: true, type: String }, - modalData: { - type: Object, - required: true - }, shouldRedirect: { type: Boolean, default: true @@ -493,6 +488,13 @@ export default { isBatchMode() { return this.batchOptions.enabled; }, + currentLocale() { + // We need to grab the locale from the modal data, because it can change + // while in modal (switch locale in editor modal). + // Exposing `modalData` property breaks the internally used AposModal + // component for some unknown reason, so we need to use the attrs. + return this.$attrs['modal-data']?.locale ?? this.moduleOptions.locale; + }, action() { return this.doc.slug.startsWith('/') ? apos.page.action @@ -708,7 +710,7 @@ export default { return this.wizard.step === name; }, isCurrentLocale(locale) { - return this.modalData.locale === locale.name; + return this.currentLocale === locale.name; }, canEditLocale(locale) { return !!locale._edit; @@ -1178,7 +1180,7 @@ export default { this.wizard.values.translateTargets.data = []; return; } - const sourceLocale = this.modalData.locale; + const sourceLocale = this.currentLocale; const targets = this.wizard.values.toLocales.data; let response; diff --git a/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue b/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue index d9f058a203..0c8aa4ebb8 100644 --- a/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue +++ b/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue @@ -171,6 +171,8 @@ const props = defineProps({ } }); +console.log('props.modalData', props.modalData); + const store = useModalStore(); const slots = useSlots(); From ef897ca95be2e10be793a3216d9196bf77164832 Mon Sep 17 00:00:00 2001 From: Jed Date: Wed, 12 Nov 2025 11:05:50 +0100 Subject: [PATCH 27/27] removes console --- modules/@apostrophecms/modal/ui/apos/components/AposModal.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue b/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue index 0c8aa4ebb8..d9f058a203 100644 --- a/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue +++ b/modules/@apostrophecms/modal/ui/apos/components/AposModal.vue @@ -171,8 +171,6 @@ const props = defineProps({ } }); -console.log('props.modalData', props.modalData); - const store = useModalStore(); const slots = useSlots();