changeset 7440b62db68a in modules/account_be:default
details: 
https://hg.tryton.org/modules/account_be?cmd=changeset;node=7440b62db68a
description:
        Add language attribute to data tag

        issue9559
        review302061002
diffstat:

 account_be_fr.xml        |  10 +++++-----
 account_be_nl.xml        |  10 +++++-----
 localize.xsl             |   7 +++++++
 tax_be_fr.xml            |   2 +-
 tax_be_nl.xml            |   2 +-
 tests/test_account_be.py |   1 +
 6 files changed, 20 insertions(+), 12 deletions(-)

diffs (148 lines):

diff -r 0361979efcf8 -r 7440b62db68a account_be_fr.xml
--- a/account_be_fr.xml Mon May 04 12:06:15 2020 +0200
+++ b/account_be_fr.xml Fri Sep 18 00:06:31 2020 +0200
@@ -2,7 +2,7 @@
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
 <tryton>
-    <data>
+    <data language="fr">
 
         <record id="be_fr" model="account.account.type.template">
             <field name="name">Plan de types de compte (Belgique)</field>
@@ -1336,7 +1336,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="fr">
 
         <record id="0_fr" model="account.account.template">
             <field name="name">Droits &amp; engagements hors bilan</field>
@@ -1395,7 +1395,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="fr">
 
         <record id="00_fr" model="account.account.template">
             <field name="name">Garanties constituees par des tiers pour compte 
de l'entreprise</field>
@@ -2032,7 +2032,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="fr">
 
         <record id="000_fr" model="account.account.template">
             <field name="name">Créanciers, bénéficiaires de garanties de 
tiers</field>
@@ -4523,7 +4523,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="fr">
 
         <record id="0110_fr" model="account.account.template">
             <field name="name">Effets cédés par l'entreprise sous endos</field>
diff -r 0361979efcf8 -r 7440b62db68a account_be_nl.xml
--- a/account_be_nl.xml Mon May 04 12:06:15 2020 +0200
+++ b/account_be_nl.xml Fri Sep 18 00:06:31 2020 +0200
@@ -2,7 +2,7 @@
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
 <tryton>
-    <data>
+    <data language="nl">
 
         <record id="be_nl" model="account.account.type.template">
             
@@ -1336,7 +1336,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="nl">
 
         <record id="0_nl" model="account.account.template">
             
@@ -1395,7 +1395,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="nl">
 
         <record id="00_nl" model="account.account.template">
             
@@ -2032,7 +2032,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="nl">
 
         <record id="000_nl" model="account.account.template">
             
@@ -4523,7 +4523,7 @@
         </record>
 
     </data>
-    <data grouped="1">
+    <data grouped="1" language="nl">
 
         <record id="0110_nl" model="account.account.template">
             
diff -r 0361979efcf8 -r 7440b62db68a localize.xsl
--- a/localize.xsl      Mon May 04 12:06:15 2020 +0200
+++ b/localize.xsl      Fri Sep 18 00:06:31 2020 +0200
@@ -1,6 +1,13 @@
 <?xml version="1.0"?>
 <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
     <xsl:param name="lang"/>
+    <xsl:template match="data">
+        <xsl:copy>
+            <xsl:apply-templates select="@*"/>
+            <xsl:attribute name="language"><xsl:value-of 
select="$lang"/></xsl:attribute>
+            <xsl:apply-templates select="node()"/>
+        </xsl:copy>
+    </xsl:template>
     <xsl:template match="record[@id]">
         <xsl:copy>
             <xsl:attribute name="id">
diff -r 0361979efcf8 -r 7440b62db68a tax_be_fr.xml
--- a/tax_be_fr.xml     Mon May 04 12:06:15 2020 +0200
+++ b/tax_be_fr.xml     Fri Sep 18 00:06:31 2020 +0200
@@ -2,7 +2,7 @@
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
 <tryton>
-    <data>
+    <data language="fr">
 
         <record id="group_tva_vente_biens_fr" model="account.tax.group">
             <field name="name">T.V.A. Vente de biens</field>
diff -r 0361979efcf8 -r 7440b62db68a tax_be_nl.xml
--- a/tax_be_nl.xml     Mon May 04 12:06:15 2020 +0200
+++ b/tax_be_nl.xml     Fri Sep 18 00:06:31 2020 +0200
@@ -2,7 +2,7 @@
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
 <tryton>
-    <data>
+    <data language="nl">
 
         <record id="group_tva_vente_biens_nl" model="account.tax.group">
             
diff -r 0361979efcf8 -r 7440b62db68a tests/test_account_be.py
--- a/tests/test_account_be.py  Mon May 04 12:06:15 2020 +0200
+++ b/tests/test_account_be.py  Fri Sep 18 00:06:31 2020 +0200
@@ -8,6 +8,7 @@
 class AccountBETestCase(ModuleTestCase):
     'Test Account BE module'
     module = 'account_be'
+    language = 'fr'
 
 
 def suite():

Reply via email to