[FIX] website: do not translate code

Header of XML files should not be translated.
Before this commit, some users may translate the XML header and get
invalid XML if translating words like "encoding"

Fixes odoo/odoo#82155

closes odoo/odoo#82439

X-original-commit: aaac6fc04f4e5aa4c9ad68d9e844f3e786044800
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Martin Trigaux
2022-01-10 13:52:53 +00:00
parent 450475e143
commit 94ac3165e1
2 changed files with 451 additions and 94 deletions
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -2135,7 +2135,7 @@
</script>
</template>
<template id="default_xml">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
<t t-translation="off">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</t>
</template>
<template id="default_css">
<style type="text/css">
@@ -2159,7 +2159,7 @@
</style>
</template>
<template id="default_csv">
1,2,3
<t t-translation="off">1,2,3</t>
</template>
<!-- PAGE 404 -->
@@ -2336,18 +2336,19 @@ Sitemap: <t t-esc="url_root"/>sitemap.xml
</url>
</template>
<template id="sitemap_xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<template id="sitemap_xml"><t t-translation="off">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</t>
<urlset t-attf-xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<t t-out="content"/>
</urlset>
</template>
<template id="sitemap_index_xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<template id="sitemap_index_xml"><t t-translation="off">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
<sitemapindex t-attf-xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap t-translation="off" t-foreach="pages" t-as="page">
<loc><t t-esc="url_root"/>sitemap-<t t-esc="page"/>.xml</loc>
</sitemap>
</sitemapindex>
</t>
</template>
<template id="website_search_box" name="Website Searchbox">