diff --git a/Build/Sources/Core13/localization.js b/Build/Sources/Core13/localization.js
new file mode 100644
index 00000000..8ed6f31e
--- /dev/null
+++ b/Build/Sources/Core13/localization.js
@@ -0,0 +1,13 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+import DocumentService from"@typo3/core/document-service.js";import $ from"jquery";import{SeverityEnum}from"@typo3/backend/enum/severity.js";import AjaxRequest from"@typo3/core/ajax/ajax-request.js";import Icons from"@typo3/backend/icons.js";import Modal from"@typo3/backend/modal.js";import MultiStepWizard from"@typo3/backend/multi-step-wizard.js";import"@typo3/backend/element/icon-element.js";import{MarkupIdentifiers}from"@typo3/backend/enum/icon-types.js";class Localization{constructor(){this.triggerButton=".t3js-localize",DocumentService.ready().then((()=>{this.initialize()}))}async initialize(){const e=await Icons.getIcon("actions-localize",Icons.sizes.large),t=await Icons.getIcon("actions-edit-copy",Icons.sizes.large),a=await Icons.getIcon("actions-localize-deepl",Icons.sizes.large,null,null,MarkupIdentifiers.inline);$(this.triggerButton).removeClass("disabled"),$(document).on("click",this.triggerButton,(async l=>{l.preventDefault();const o=$(l.currentTarget),n=[],i=[];if(0===o.data("allowTranslate")&&0===o.data("allowCopy"))return void Modal.confirm(TYPO3.lang["window.localization.mixed_mode.title"],TYPO3.lang["window.localization.mixed_mode.message"],SeverityEnum.warning,[{text:TYPO3?.lang?.["button.ok"]||"OK",btnClass:"btn-warning",name:"ok",trigger:(e,t)=>t.hideModal()}]);const c=await(await this.loadAvailableLanguages(parseInt(o.data("pageId"),10),parseInt(o.data("languageId"),10))).resolve();if(o.data("allowTranslate")&&(n.push('
"),MultiStepWizard.getComponent().on("change",".t3js-language-option",(e=>{MultiStepWizard.set("sourceLanguage",$(e.currentTarget).val()),MultiStepWizard.unlockNextStep()}));const a=$("",{class:"row"});for(const e of c){const t="language"+e.uid,l=$("",{type:"radio",name:"language",id:t,value:e.uid,class:"btn-check t3js-language-option"}),o=$("",{class:"btn btn-default btn-block",for:t}).text(" "+e.title).prepend(e.flagIcon);a.append($("",{class:"col-sm-4"}).append(l).append(o))}e.empty().append(a)})),MultiStepWizard.addSlide("localize-summary",TYPO3.lang["localize.view.summary"],"",SeverityEnum.notice,TYPO3.lang["localize.wizard.step.selectRecords"],(async(e,t)=>{e.empty().html('
"),MultiStepWizard.getComponent().on("change",".t3js-language-option",(e=>{MultiStepWizard.set("sourceLanguage",$(e.currentTarget).val()),MultiStepWizard.unlockNextStep()}));const a=$("",{class:"row"});for(const e of c){const t="language"+e.uid,l=$("",{type:"radio",name:"language",id:t,value:e.uid,class:"btn-check t3js-language-option"}),o=$("",{class:"btn btn-default btn-block",for:t}).text(" "+e.title).prepend(e.flagIcon);a.append($("",{class:"col-sm-4"}).append(l).append(o))}e.empty().append(a)})),MultiStepWizard.addSlide("localize-summary",TYPO3.lang["localize.view.summary"],"",SeverityEnum.notice,TYPO3.lang["localize.wizard.step.selectRecords"],(async(e,t)=>{e.empty().html('
");const a=await(await this.getSummary(parseInt(o.data("pageId"),10),parseInt(o.data("languageId"),10),t.sourceLanguage)).resolve();e.empty(),MultiStepWizard.set("records",[]);const l=a.columns.columns;a.columns.columnList.forEach((o=>{if(void 0===a.records[o])return;const n=l[o],i=document.createElement("div");i.classList.add("row","gy-2"),a.records[o].forEach((e=>{const a=" ("+e.uid+") "+e.title;t.records.push(e.uid);const l=document.createElement("div");l.classList.add("col-sm-6");const o=document.createElement("div");o.classList.add("input-group");const n=document.createElement("span");n.classList.add("input-group-text");const c=document.createElement("span");c.classList.add("form-check","form-check-type-toggle");const d=document.createElement("input");d.type="checkbox",d.id="record-uid-"+e.uid,d.classList.add("form-check-input","t3js-localization-toggle-record"),d.checked=!0,d.dataset.uid=e.uid.toString(),d.ariaLabel=a;const s=document.createElement("label");s.classList.add("form-control"),s.htmlFor="record-uid-"+e.uid,s.innerHTML=e.icon,s.appendChild(document.createTextNode(a)),c.appendChild(d),n.appendChild(c),o.appendChild(n),o.appendChild(s),l.appendChild(o),i.appendChild(l)}));const c=document.createElement("fieldset");c.classList.add("localization-fieldset");const d=document.createElement("div");d.classList.add("form-check","form-check-type-toggle");const s=document.createElement("input");s.classList.add("form-check-input","t3js-localization-toggle-column"),s.id="records-column-"+o,s.type="checkbox",s.checked=!0;const r=document.createElement("label");r.classList.add("form-check-label"),r.htmlFor="records-column-"+o,r.textContent=n,d.appendChild(s),d.appendChild(r),c.appendChild(d),c.appendChild(i),e.append(c)})),MultiStepWizard.unlockNextStep(),MultiStepWizard.getComponent().on("change",".t3js-localization-toggle-record",(e=>{const a=$(e.currentTarget),l=a.data("uid"),o=a.closest("fieldset"),n=o.find(".t3js-localization-toggle-column");if(a.is(":checked"))t.records.push(l);else{const e=t.records.indexOf(l);e>-1&&t.records.splice(e,1)}const i=o.find(".t3js-localization-toggle-record"),c=o.find(".t3js-localization-toggle-record:checked");n.prop("checked",c.length>0),n.prop("__indeterminate",c.length>0&&c.length0?MultiStepWizard.unlockNextStep():MultiStepWizard.lockNextStep()})).on("change",".t3js-localization-toggle-column",(e=>{const t=$(e.currentTarget),a=t.closest("fieldset").find(".t3js-localization-toggle-record");a.prop("checked",t.is(":checked")),a.trigger("change")}))})),MultiStepWizard.addFinalProcessingSlide((async(e,t)=>{await this.localizeRecords(parseInt(o.data("pageId"),10),parseInt(o.data("languageId"),10),t.sourceLanguage,t.localizationMode,t.records),MultiStepWizard.dismiss(),document.location.reload()})).then((()=>{MultiStepWizard.show(),MultiStepWizard.getComponent().on("change",".t3js-localization-option",(e=>{const t=$(e.currentTarget).val(),a=window.parent.document.querySelector("#deeplText .alert"),l=window.parent.document.querySelector("#deeplTextAuto .alert");if("localizedeepl"===t||"localizedeeplauto"===t){const o="localizedeepl"==t?"#deeplText .alert":"#deeplTextAuto .alert",n=window.parent.document.querySelector(o);this.deeplSettings().then((async t=>{!1===(await t.resolve()).status?(MultiStepWizard.lockNextStep(),a.hidden=!0,l.hidden=!0,n.hidden=!1):(a.hidden=!0,l.hidden=!0,MultiStepWizard.set("localizationMode",$(e.currentTarget).val()),MultiStepWizard.unlockNextStep())}))}else a.hidden=!0,l.hidden=!0,MultiStepWizard.set("localizationMode",$(e.currentTarget).val()),MultiStepWizard.unlockNextStep()}))}))}))}loadAvailableLanguages(e,t){return new AjaxRequest(TYPO3.settings.ajaxUrls.page_languages).withQueryArguments({pageId:e,languageId:t}).get()}getSummary(e,t,a){return new AjaxRequest(TYPO3.settings.ajaxUrls.records_localize_summary).withQueryArguments({pageId:e,destLanguageId:t,languageId:a}).get()}localizeRecords(e,t,a,l,o){return new AjaxRequest(TYPO3.settings.ajaxUrls.records_localize).withQueryArguments({pageId:e,srcLanguageId:a,destLanguageId:t,action:l,uidList:o}).get()}deeplSettings(){return new AjaxRequest(TYPO3.settings.ajaxUrls.deepl_check_configuration).get()}}export default new Localization;
diff --git a/ext_localconf.php b/ext_localconf.php
index daf82a17..8e4eeda9 100644
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -42,6 +42,21 @@
}
}
+ // TYPO3 v13 changed the markup and UX of the PageLayout translation modal which breaks with longer icon labels.
+ // This has been reported to the core and a bugfix is in the making, but we ship a workaround for now but load
+ // the custom backend css only.
+ //
+ // Using custom backend css loading introduced with: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/12.3/Feature-100232-LoadAdditionalStylesheetsInTYPO3Backend.html
+ //
+ // @todo Remove this with TYPO3 v13.4.3 release => https://review.typo3.org/c/Packages/TYPO3.CMS/+/87576
+ //
+ if ($typo3version->getMajorVersion() === 13
+ && version_compare($typo3version->getVersion(), '13.4.3', '<')
+ ) {
+ $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']['web-vision/deepltranslate-core']
+ = 'EXT:deepltranslate_core/Resources/Public/Css/patch-105853.css';
+ }
+
// We need to provide the global backend javascript module instead of calling page-renderer here directly - which
// cannot be done and checking the context (FE/BE) directly. Instantiating PageRenderer here directly would be
// emitted an exception as the cache configuration manager cannot be retrieved in this early stage.