From ad8e80c90a7ce9dcf1e86ad55cd94d34a5bb1348 Mon Sep 17 00:00:00 2001 From: xO-Tx Date: Mon, 22 May 2023 15:55:58 +0000 Subject: [PATCH] [FIX] website: correctly mark translatable attributes Steps to reproduce: - Go to a website page > Add a 'Form' block > Set an input "Placeholder" value. - Go to the page (in 'edit_translations' mode) > The translation of the input "Placeholder" attribute doesn't mark the input as translated and even after saving the translation, the input is still marked as "to_translate". The goal of this commit is to fix this issue by extending the same behaviour on the translated `\ + useful to your readers.

\

<b></b> is an HTML tag & is empty

'); $('iframe:not(.o_ignore_in_tour)').contents().find("#wrap img").attr("title", "test translate image title"); } @@ -141,10 +141,18 @@ wTourUtils.registerWebsitePreviewTour('rte_translator', { content: "translate placeholder", trigger: '.modal-dialog input:first', run: 'text test Parseltongue placeholder', +}, { + content: "translate default value", + trigger: '.modal-dialog input:last', + run: 'text test Parseltongue default value', }, { content: "close modal", trigger: '.modal-footer .btn-primary', extra_trigger: '.modal input:propValue(test Parseltongue placeholder)', +}, { + content: "check: input marked as translated", + trigger: 'iframe input[placeholder="test Parseltongue placeholder"].oe_translated', + run: () => {}, }, { content: "save translation", trigger: 'button[data-action=save]', @@ -162,7 +170,10 @@ wTourUtils.registerWebsitePreviewTour('rte_translator', { content: "check: placeholder translation", trigger: 'iframe input[placeholder="test Parseltongue placeholder"]', run: function () {}, // it's a check - +}, { + content: "check: default value translation", + trigger: 'iframe input[value="test Parseltongue default value"]', + run: () => {}, }, { content: "open language selector", trigger: 'iframe .js_language_selector button:first',