<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to XmlTranslationFile</title><link>https://sourceforge.net/p/xml-cpp-class-generator/wiki/XmlTranslationFile/</link><description>Recent changes to XmlTranslationFile</description><atom:link href="https://sourceforge.net/p/xml-cpp-class-generator/wiki/XmlTranslationFile/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 23 Apr 2016 11:22:35 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/xml-cpp-class-generator/wiki/XmlTranslationFile/feed" rel="self" type="application/rss+xml"/><item><title>XmlTranslationFile modified by Johan Luisier</title><link>https://sourceforge.net/p/xml-cpp-class-generator/wiki/XmlTranslationFile/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -25,16 +25,124 @@
 # Contents

 The minimal file is: 
-    
-    
-     
+```xml
+

-&amp;lt;translations xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com Languages.xsd"&amp;gt;
+&amp;lt;translations xmlns="http://www.w3schools.com" +="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +="" xsi:schemaLocation="http://www.w3schools.com Languages.xsd"&amp;gt;

-&amp;lt;translation language="en"&amp;gt; &amp;lt;langName&amp;gt; English &amp;lt;/langName&amp;gt; &amp;lt;nativeName&amp;gt; English &amp;lt;/nativeName&amp;gt; &amp;lt;comments&amp;gt; &amp;lt;stdGetter nbr="1"&amp;gt; /** Allows to access {0}.\n *\n * @return a const reference on {0}.\n */ &amp;lt;/stdGetter&amp;gt; &amp;lt;stdSetter nbr="2"&amp;gt; /** Allows to change the value of {0}.\n *\n * @param {1} new value of {0}.\n */ &amp;lt;/stdSetter&amp;gt; &amp;lt;ptrGetter nbr="1"&amp;gt; /** Allows to get a pointer on {0}.\n *\n * @return a const pointer on {0}.\n */ &amp;lt;/ptrGetter&amp;gt; &amp;lt;ptrSetter nbr="2"&amp;gt; /** Allows to change the value of {0}.\n *\n * @param[in] {1} pointer on new value of {0}.\n */ &amp;lt;/ptrSetter&amp;gt; &amp;lt;/comments&amp;gt; &amp;lt;strings&amp;gt; &amp;lt;constructor&amp;gt; constructor &amp;lt;/constructor&amp;gt; &amp;lt;destructor&amp;gt; destructor &amp;lt;/destructor&amp;gt; &amp;lt;getter&amp;gt; getter &amp;lt;/getter&amp;gt; &amp;lt;setter&amp;gt; setter &amp;lt;/setter&amp;gt; &amp;lt;method&amp;gt; method &amp;lt;/method&amp;gt; &amp;lt;member&amp;gt; member &amp;lt;/member&amp;gt; &amp;lt;copyConstructor&amp;gt; copy constructor &amp;lt;/copyConstructor&amp;gt; &amp;lt;affectationOperator&amp;gt; affectation operator &amp;lt;/affectationOperator&amp;gt; &amp;lt;comparisonOperator&amp;gt; comparison operator &amp;lt;/comparisonOperator&amp;gt; &amp;lt;class&amp;gt; class &amp;lt;/class&amp;gt; &amp;lt;structure&amp;gt; structure &amp;lt;/structure&amp;gt; &amp;lt;/strings&amp;gt; &amp;lt;prgmMessages&amp;gt; &amp;lt;rootElementError nbr="1"&amp;gt; Check your input file &amp;amp;apos;{0}&amp;amp;apos; is not the root element &amp;lt;/rootElementError&amp;gt; &amp;lt;ioError nbr="2"&amp;gt; I/O error({0}) : {1}.\n &amp;lt;/ioError&amp;gt; &amp;lt;objectFound nbr="1"&amp;gt; Found description for a &amp;amp;apos;{0}&amp;amp;apos; object. &amp;lt;/objectFound&amp;gt; &amp;lt;moveInfo nbr="1"&amp;gt; Will save the copy of {0} to {0}.BAK. &amp;lt;/moveInfo&amp;gt; &amp;lt;addItem nbr="2"&amp;gt; Adding a &amp;amp;apos;{0}&amp;amp;apos; {1}. &amp;lt;/addItem&amp;gt; &amp;lt;genMethod nbr="3"&amp;gt; Auto adding a &amp;amp;apos;{0}&amp;amp;apos; {1} for {2}. &amp;lt;/genMethod&amp;gt; &amp;lt;alreadyPresent nbr="2"&amp;gt; A {0} is already present in {1}. &amp;lt;/alreadyPresent&amp;gt; &amp;lt;objExist nbr="1"&amp;gt; An object {0} exists. &amp;lt;/objExist&amp;gt; &amp;lt;objIsFile nbr="1"&amp;gt; The object {0} is a file. &amp;lt;/objIsFile&amp;gt; &amp;lt;objIsOther nbr="1"&amp;gt; The object {0} is not a file, aborting writing process. &amp;lt;/objIsOther&amp;gt; &amp;lt;processing nbr="1"&amp;gt; Processing file {0}. &amp;lt;/processing&amp;gt; &amp;lt;nooutput nbr="0"&amp;gt; No output will be produced. &amp;lt;/nooutput&amp;gt; &amp;lt;validationError nbr="1"&amp;gt; An error occured while trying to check file {0}.\nOutput of xmllint follows: &amp;lt;/validationError&amp;gt; &amp;lt;/prgmMessages&amp;gt; &amp;lt;/translation&amp;gt;
+  

-&amp;lt;/translations&amp;gt;
+  &amp;lt;translation language="en"&amp;gt;
+    
+    &amp;lt;langName&amp;gt; English &amp;lt;/langName&amp;gt;
+    &amp;lt;nativeName&amp;gt; English &amp;lt;/nativeName&amp;gt;
+    &amp;lt;comments&amp;gt;
+      &amp;lt;stdGetter nbr="1"&amp;gt; /** @brief Getter for {0}.\n  *\n  * Allows to access {0}.\n  *\n  * @return a const reference on {0}.\n  */ &amp;lt;/stdGetter&amp;gt;
+      &amp;lt;stdSetter nbr="2"&amp;gt; /** @brief Setter for {0}.\n  *\n  * Allows to change the value of {0}.\n  *\n  * @param {1} new value of {0}.\n  */ &amp;lt;/stdSetter&amp;gt;
+      &amp;lt;ptrGetter nbr="1"&amp;gt; /** @brief Getter for {0}.\n  *\n  * Allows to get a pointer on {0}.\n  *\n  * @return a const pointer on {0}.\n  */ &amp;lt;/ptrGetter&amp;gt;
+      &amp;lt;ptrSetter nbr="2"&amp;gt; /** @brief Setter for {0}.\n  *\n  * Allows to change the value of {0}.\n  *\n  * @param[in] {1} pointer on new value of {0}.\n  */ &amp;lt;/ptrSetter&amp;gt;
+      &amp;lt;refGetter nbr="1"&amp;gt; /** @brief Getter for {0}.\n  *\n  * Allows to access {0}.\n  *\n  * @return a reference on {0}.\n */ &amp;lt;/refGetter&amp;gt;
+    &amp;lt;/comments&amp;gt;
+    &amp;lt;strings&amp;gt;
+      &amp;lt;constructor&amp;gt; constructor &amp;lt;/constructor&amp;gt;
+      &amp;lt;destructor&amp;gt; destructor &amp;lt;/destructor&amp;gt;
+      &amp;lt;getter&amp;gt; getter &amp;lt;/getter&amp;gt;
+      &amp;lt;setter&amp;gt; setter &amp;lt;/setter&amp;gt;
+      &amp;lt;refGetter&amp;gt; reference getter &amp;lt;/refGetter&amp;gt;
+      &amp;lt;method&amp;gt; method &amp;lt;/method&amp;gt;
+      &amp;lt;member&amp;gt; member &amp;lt;/member&amp;gt;
+      &amp;lt;copyConstructor&amp;gt; copy constructor &amp;lt;/copyConstructor&amp;gt;
+      &amp;lt;affectationOperator&amp;gt; affectation operator &amp;lt;/affectationOperator&amp;gt;
+      &amp;lt;comparisonOperator&amp;gt; comparison operator &amp;lt;/comparisonOperator&amp;gt;
+      &amp;lt;class&amp;gt; class &amp;lt;/class&amp;gt;
+      &amp;lt;struct&amp;gt; structure &amp;lt;/struct&amp;gt;
+      &lt;header&gt; header &lt;/header&gt;
+      &amp;lt;implementation&amp;gt; implementation file &amp;lt;/implementation&amp;gt;
+      &amp;lt;local&amp;gt; local &amp;lt;/local&amp;gt;
+      &amp;lt;system&amp;gt; system &amp;lt;/system&amp;gt;
+    &amp;lt;/strings&amp;gt;
+    &amp;lt;prgmMessages&amp;gt;
+      &amp;lt;rootElementError nbr="1"&amp;gt; Check your input file '{0}' is not the root element &amp;lt;/rootElementError&amp;gt;
+      &amp;lt;ioError nbr="2"&amp;gt; I/O error({0}) : {1}.\n &amp;lt;/ioError&amp;gt;
+      &amp;lt;objectFound nbr="1"&amp;gt; Found description for a '{0}' object. &amp;lt;/objectFound&amp;gt;
+      &amp;lt;moveInfo nbr="1"&amp;gt; Will save the copy of {0} to {0}.BAK. &amp;lt;/moveInfo&amp;gt;
+      &amp;lt;addItem nbr="2"&amp;gt; Adding a '{0}' {1}. &amp;lt;/addItem&amp;gt;
+      &amp;lt;genMethod nbr="3"&amp;gt; Auto adding a '{0}' {1} for {2}. &amp;lt;/genMethod&amp;gt;
+      &amp;lt;alreadyPresent nbr="2"&amp;gt; A {0} is already present in {1}. &amp;lt;/alreadyPresent&amp;gt;
+      &amp;lt;objExist nbr="1"&amp;gt; An object {0} exists. &amp;lt;/objExist&amp;gt;
+      &amp;lt;objIsFile nbr="1"&amp;gt; The object {0} is a file. &amp;lt;/objIsFile&amp;gt;
+      &amp;lt;objIsOther nbr="1"&amp;gt; The object {0} is not a file, aborting writing process. &amp;lt;/objIsOther&amp;gt;
+      &amp;lt;processing nbr="1"&amp;gt; Processing file {0}. &amp;lt;/processing&amp;gt;
+      &amp;lt;nooutput nbr="0"&amp;gt; No output will be produced. &amp;lt;/nooutput&amp;gt;
+      &amp;lt;validationError nbr="1"&amp;gt; An error occured while trying to check file {0}.\nOutput of xmllint follows: &amp;lt;/validationError&amp;gt;
+      &amp;lt;undefAccess nbr="2"&amp;gt; {0}: don't know what to do with access '{1}'. &amp;lt;/undefAccess&amp;gt;
+      &amp;lt;templateOutput nbr="2"&amp;gt; The {0} {1} is a template, implementation file won't be generated. &amp;lt;/templateOutput&amp;gt;
+      &amp;lt;processingInclude nbr="3"&amp;gt; A {0} include statement "{1}" added to {2}. &amp;lt;/processingInclude&amp;gt;
+      &amp;lt;credits nbr="2"&amp;gt; // Created with {0} {1}. &amp;lt;/credits&amp;gt;
+      &amp;lt;unknownObjectType nbr="1"&amp;gt; Object type '{0}' is unknown. &amp;lt;/unknownObjectType&amp;gt;
+    &amp;lt;/prgmMessages&amp;gt;
+  &amp;lt;/translation&amp;gt;

+  &amp;lt;translation language="fr"&amp;gt;
+    &amp;lt;langName&amp;gt; French &amp;lt;/langName&amp;gt;
+    &amp;lt;nativeName&amp;gt; Français &amp;lt;/nativeName&amp;gt;
+    
+    &amp;lt;comments&amp;gt;
+      &amp;lt;stdGetter nbr="1"&amp;gt; /** Accesseur pour {0}.\n  *\n  * Permet d'accéder à {0}.\n  *\n  * @return une référence constante sur {0}.\n  */ &amp;lt;/stdGetter&amp;gt;
+      &amp;lt;stdSetter nbr="2"&amp;gt; /** Mutateur pour {0}.\n  *\n  *  Permet de changer la valeur de {0}.\n  *\n  * @param {1} nouvelle valeur de {0}.\n  */ &amp;lt;/stdSetter&amp;gt;
+      &amp;lt;ptrGetter nbr="1"&amp;gt; /** Accesseur pour {0}.\n  *\n  *  Permet de récupérer un pointeur sur {0}.\n  *\n  * @return l'addresse de {0}.\n  */ &amp;lt;/ptrGetter&amp;gt;
+      &amp;lt;ptrSetter nbr="2"&amp;gt; /** Mutateur pour {0}.\n  *\n  *  Permet de changer la valeur de {0}.\n  *\n  * @param[in] {1} pointeur sur la nouvelle valeur de {0}.\n  */ &amp;lt;/ptrSetter&amp;gt;
+      &amp;lt;refGetter nbr="1"&amp;gt; /** Accesseur pour {0}.\n  *\n  *  Permet d''accéder à {0}.\n  *\n  * @return une référence sur {0}.\n */ &amp;lt;/refGetter&amp;gt;
+    &amp;lt;/comments&amp;gt;
+    &amp;lt;strings&amp;gt;
+      &amp;lt;constructor&amp;gt; constructeur &amp;lt;/constructor&amp;gt;
+      &amp;lt;destructor&amp;gt; destructeur &amp;lt;/destructor&amp;gt;
+      &amp;lt;getter&amp;gt; accesseur &amp;lt;/getter&amp;gt;
+      &amp;lt;setter&amp;gt; mutateur &amp;lt;/setter&amp;gt;
+      &amp;lt;refGetter&amp;gt; accesseur par référence &amp;lt;/refGetter&amp;gt;
+      &amp;lt;method&amp;gt; méthode &amp;lt;/method&amp;gt;
+      &amp;lt;member&amp;gt; membre &amp;lt;/member&amp;gt;
+      &amp;lt;copyConstructor&amp;gt; constructeur de copie &amp;lt;/copyConstructor&amp;gt;
+      &amp;lt;affectationOperator&amp;gt; opérateur d'affectation &amp;lt;/affectationOperator&amp;gt;
+      &amp;lt;comparisonOperator&amp;gt; opérateur de comparaison &amp;lt;/comparisonOperator&amp;gt;
+      &amp;lt;class&amp;gt; classe &amp;lt;/class&amp;gt;
+      &amp;lt;struct&amp;gt; structure &amp;lt;/struct&amp;gt;
+      &lt;header&gt; en-tête &lt;/header&gt;
+      &amp;lt;implementation&amp;gt; fichier d'implémentation &amp;lt;/implementation&amp;gt;
+      &amp;lt;local&amp;gt; local &amp;lt;/local&amp;gt;
+      &amp;lt;system&amp;gt; système &amp;lt;/system&amp;gt;
+    &amp;lt;/strings&amp;gt;
+    &amp;lt;prgmMessages&amp;gt;
+      &amp;lt;rootElementError nbr="1"&amp;gt; Vérifier votre fichier d'entrée '{0}' n'est pas l'élément racine. &amp;lt;/rootElementError&amp;gt;
+      &amp;lt;ioError nbr="2"&amp;gt; Erreur E/S ({0}) : {1}.\n &amp;lt;/ioError&amp;gt;
+      &amp;lt;objectFound nbr="1"&amp;gt; Une description d'un objet '{0}' a été trouvée. &amp;lt;/objectFound&amp;gt;
+      &amp;lt;moveInfo nbr="1"&amp;gt; La copie de {0} sera sauvée dans {0}.BAK. &amp;lt;/moveInfo&amp;gt;
+      &amp;lt;addItem nbr="2"&amp;gt; Ajout d'un(e) {1} '{0}'. &amp;lt;/addItem&amp;gt;
+      &amp;lt;genMethod nbr="3"&amp;gt; Ajout auto d'un(e) {1} '{0}' pour {2}. &amp;lt;/genMethod&amp;gt;
+      &amp;lt;alreadyPresent nbr="2"&amp;gt; La classe {1} contient déjà un(e) {0}. &amp;lt;/alreadyPresent&amp;gt;
+      &amp;lt;objExist nbr="1"&amp;gt; Un objet {0} existe. &amp;lt;/objExist&amp;gt;
+      &amp;lt;objIsFile nbr="1"&amp;gt; L'objet {0} est un fichier. &amp;lt;/objIsFile&amp;gt;
+      &amp;lt;objIsOther nbr="1"&amp;gt; L'objet {0} n'est pas un fichier, arrêt de l'écriture. &amp;lt;/objIsOther&amp;gt;
+      &amp;lt;processing nbr="1"&amp;gt; Traitement du fichier {0}. &amp;lt;/processing&amp;gt;
+      &amp;lt;nooutput nbr="0"&amp;gt; Aucun fichier ne sera généré. &amp;lt;/nooutput&amp;gt;
+      &amp;lt;validationError nbr="1"&amp;gt; Une erreur s'est produite lors de la vérification du fichier {0}.\nVoir la sortie de xmllint ci-dessous : &amp;lt;/validationError&amp;gt;
+      &amp;lt;undefAccess nbr="2"&amp;gt; {0} : ne sait pas quoi faire du mode d'accès '{1}'. &amp;lt;/undefAccess&amp;gt;
+      &amp;lt;templateOutput nbr="2"&amp;gt; La {1} {0} est un template, le fichier d'implémentation ne sera pas généré. &amp;lt;/templateOutput&amp;gt;
+      &amp;lt;processingInclude nbr="3"&amp;gt; Ajout d'une directive include {0} "{1}"" pour {2}. &amp;lt;/processingInclude&amp;gt;
+      &amp;lt;credits nbr="2"&amp;gt; // Créé avec {0} {1}. &amp;lt;/credits&amp;gt;
+      &amp;lt;unknownObjectType nbr="1"&amp;gt; Le type d'objet '{0}' est inconnu. &amp;lt;/unknownObjectType&amp;gt;
+    &amp;lt;/prgmMessages&amp;gt;
+  &amp;lt;/translation&amp;gt;
+
+&amp;lt;/translations&amp;gt;
+```
 As can be seen on the previous snippet, many `{0}`, `{1}` are present in the file. They are processed by the python class providing the output (either in a file or in the terminal), and the `{i}` are replaced using the `string.format()` function (link to [documentation](http://docs.python.org/library/stdtypes.html#string-methods)). 

 [Back on top](XmlTranslationFile)
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Johan Luisier</dc:creator><pubDate>Sat, 23 Apr 2016 11:22:35 -0000</pubDate><guid>https://sourceforge.net29e680f72fc24f1df9826a1daaae682c62df3480</guid></item><item><title>XmlTranslationFile modified by Anonymous</title><link>https://sourceforge.net/p/generatecppfomxml/wiki/XmlTranslationFile/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;a class="" href="/p/generatecppfomxml/wiki/WikiMap"&gt;Navigate through the wiki&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this page is discussed the content of the translation file and how to add your favourite language into it. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Contents&lt;ul&gt;
&lt;li&gt;Meaning of {i}&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Adding a translation&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;The translation file contains information which are used to generate : &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the comments (à la doxygen) of the methods, &lt;/li&gt;
&lt;li&gt;specific names, like 'copy constructor', 'std getter', ... &lt;/li&gt;
&lt;li&gt;messages printed in the terminal by the program. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There can be as many language present as wanted in the translation file, the only constraints are: &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;the English translation is present, &lt;/li&gt;
&lt;li&gt;the file can be validated against Language.xsd (i.e. all the needed fields are present). &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a class="" href="/p/generatecppfomxml/wiki/XmlTranslationFile"&gt;Back on top&lt;/a&gt;&lt;/p&gt;
&lt;h1 id="contents"&gt;Contents&lt;/h1&gt;
&lt;p&gt;The minimal file is: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="o"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="nt"&gt;xml&lt;/span&gt; &lt;span class="nt"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"1.0"&lt;/span&gt; &lt;span class="nt"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"UTF-8"&lt;/span&gt;&lt;span class="o"&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&amp;lt;translations xmlns="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com Languages.xsd"&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;translation language="en"&amp;gt; &amp;lt;langName&amp;gt; English &amp;lt;/langName&amp;gt; &amp;lt;nativeName&amp;gt; English &amp;lt;/nativeName&amp;gt; &amp;lt;comments&amp;gt; &amp;lt;stdGetter nbr="1"&amp;gt; /&lt;strong&gt; Allows to access {0}.\n &lt;em&gt;\n * @return a const reference on {0}.\n &lt;/em&gt;/ &amp;lt;/stdGetter&amp;gt; &amp;lt;stdSetter nbr="2"&amp;gt; /&lt;/strong&gt; Allows to change the value of {0}.\n &lt;em&gt;\n * @param {1} new value of {0}.\n &lt;/em&gt;/ &amp;lt;/stdSetter&amp;gt; &amp;lt;ptrGetter nbr="1"&amp;gt; /&lt;strong&gt; Allows to get a pointer on {0}.\n &lt;em&gt;\n * @return a const pointer on {0}.\n &lt;/em&gt;/ &amp;lt;/ptrGetter&amp;gt; &amp;lt;ptrSetter nbr="2"&amp;gt; /&lt;/strong&gt; Allows to change the value of {0}.\n &lt;em&gt;\n * @param&lt;span&gt;&lt;span&gt;[in]&lt;/span&gt;&lt;/span&gt; {1} pointer on new value of {0}.\n &lt;/em&gt;/ &amp;lt;/ptrSetter&amp;gt; &amp;lt;/comments&amp;gt; &amp;lt;strings&amp;gt; &amp;lt;constructor&amp;gt; constructor &amp;lt;/constructor&amp;gt; &amp;lt;destructor&amp;gt; destructor &amp;lt;/destructor&amp;gt; &amp;lt;getter&amp;gt; getter &amp;lt;/getter&amp;gt; &amp;lt;setter&amp;gt; setter &amp;lt;/setter&amp;gt; &amp;lt;method&amp;gt; method &amp;lt;/method&amp;gt; &amp;lt;member&amp;gt; member &amp;lt;/member&amp;gt; &amp;lt;copyConstructor&amp;gt; copy constructor &amp;lt;/copyConstructor&amp;gt; &amp;lt;affectationOperator&amp;gt; affectation operator &amp;lt;/affectationOperator&amp;gt; &amp;lt;comparisonOperator&amp;gt; comparison operator &amp;lt;/comparisonOperator&amp;gt; &amp;lt;class&amp;gt; class &amp;lt;/class&amp;gt; &amp;lt;structure&amp;gt; structure &amp;lt;/structure&amp;gt; &amp;lt;/strings&amp;gt; &amp;lt;prgmMessages&amp;gt; &amp;lt;rootElementError nbr="1"&amp;gt; Check your input file &amp;amp;apos;{0}&amp;amp;apos; is not the root element &amp;lt;/rootElementError&amp;gt; &amp;lt;ioError nbr="2"&amp;gt; I/O error({0}) : {1}.\n &amp;lt;/ioError&amp;gt; &amp;lt;objectFound nbr="1"&amp;gt; Found description for a &amp;amp;apos;{0}&amp;amp;apos; object. &amp;lt;/objectFound&amp;gt; &amp;lt;moveInfo nbr="1"&amp;gt; Will save the copy of {0} to {0}.BAK. &amp;lt;/moveInfo&amp;gt; &amp;lt;addItem nbr="2"&amp;gt; Adding a &amp;amp;apos;{0}&amp;amp;apos; {1}. &amp;lt;/addItem&amp;gt; &amp;lt;genMethod nbr="3"&amp;gt; Auto adding a &amp;amp;apos;{0}&amp;amp;apos; {1} for {2}. &amp;lt;/genMethod&amp;gt; &amp;lt;alreadyPresent nbr="2"&amp;gt; A {0} is already present in {1}. &amp;lt;/alreadyPresent&amp;gt; &amp;lt;objExist nbr="1"&amp;gt; An object {0} exists. &amp;lt;/objExist&amp;gt; &amp;lt;objIsFile nbr="1"&amp;gt; The object {0} is a file. &amp;lt;/objIsFile&amp;gt; &amp;lt;objIsOther nbr="1"&amp;gt; The object {0} is not a file, aborting writing process. &amp;lt;/objIsOther&amp;gt; &amp;lt;processing nbr="1"&amp;gt; Processing file {0}. &amp;lt;/processing&amp;gt; &amp;lt;nooutput nbr="0"&amp;gt; No output will be produced. &amp;lt;/nooutput&amp;gt; &amp;lt;validationError nbr="1"&amp;gt; An error occured while trying to check file {0}.\nOutput of xmllint follows: &amp;lt;/validationError&amp;gt; &amp;lt;/prgmMessages&amp;gt; &amp;lt;/translation&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/translations&amp;gt;&lt;/p&gt;
&lt;p&gt;As can be seen on the previous snippet, many &lt;code&gt;{0}&lt;/code&gt;, &lt;code&gt;{1}&lt;/code&gt; are present in the file. They are processed by the python class providing the output (either in a file or in the terminal), and the &lt;code&gt;{i}&lt;/code&gt; are replaced using the &lt;code&gt;string.format()&lt;/code&gt; function (link to &lt;a class="" href="http://docs.python.org/library/stdtypes.html#string-methods" rel="nofollow"&gt;documentation&lt;/a&gt;). &lt;/p&gt;
&lt;p&gt;&lt;a class="" href="/p/generatecppfomxml/wiki/XmlTranslationFile"&gt;Back on top&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="meaning-of-i"&gt;Meaning of &lt;code&gt;{i}&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;In order to create a valid translation, the meaning of each occurrence of &lt;code&gt;{i}&lt;/code&gt; should be known. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For the &lt;code&gt;comments&lt;/code&gt; section, every &lt;code&gt;{0}&lt;/code&gt; will be replaced by the name of the class member. This means that for a class MyClass having a member MyMember, every &lt;code&gt;{0}&lt;/code&gt; will be replaced by &lt;code&gt;MyMember&lt;/code&gt;, whilst existing &lt;code&gt;{1}&lt;/code&gt; will be replaced by &lt;code&gt;myMember&lt;/code&gt; (i.e. the member name with the first letter lower-cased). Note that the various children of the &lt;code&gt;comments&lt;/code&gt; element node have a mandatory attribute, &lt;code&gt;nbr&lt;/code&gt; which is the number of strings that will be replaced. &lt;/li&gt;
&lt;li&gt;For the &lt;code&gt;strings&lt;/code&gt; element node children, nothing special has to be said. These are just usual strings, which can be used either in the created files or in the terminal output. &lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In the &lt;code&gt;prgmMessages&lt;/code&gt; section, the replacement string is different for each children: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;rootElementError&lt;/code&gt;: &lt;code&gt;{0}&lt;/code&gt; will be replaced by the expected root element name. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;moveInfo&lt;/code&gt;: both occurrences of &lt;code&gt;{0}&lt;/code&gt; are replaced by the name of the copied file. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;genMethod&lt;/code&gt;: the &lt;code&gt;{0}&lt;/code&gt; is replaced by the access type (i.e. &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;protected&lt;/code&gt; or &lt;code&gt;private&lt;/code&gt;), &lt;code&gt;{1}&lt;/code&gt; by the method type (copy constructor, std getter, ...) and &lt;code&gt;{2}&lt;/code&gt; by the member name. The same string is used when automatic methods other than get/set are added, then the &lt;code&gt;{2}&lt;/code&gt; is replaced by the class name. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;alreadyPresent&lt;/code&gt;: &lt;code&gt;{0}&lt;/code&gt; is replaced by the method type and &lt;code&gt;{1}&lt;/code&gt; by the class name. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;objExist&lt;/code&gt;, &lt;code&gt;objIsFile&lt;/code&gt;, &lt;code&gt;objIsOther&lt;/code&gt; and &lt;code&gt;processing&lt;/code&gt;: &lt;code&gt;{0}&lt;/code&gt; is replaced by the name of the file that should be created. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;validationError&lt;/code&gt;: &lt;code&gt;{0}&lt;/code&gt; is replaced by the name of the XML file from which the class description should be loaded. &lt;/li&gt;
&lt;li&gt;&lt;code&gt;ioError&lt;/code&gt;: &lt;code&gt;{0}&lt;/code&gt; is replaced by the error number, and &lt;code&gt;{1}&lt;/code&gt; by the error string. These fields are provided by catching the error when a file cannot be opened for writing with the command &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;try :&lt;br /&gt;
     File = open( fileName, 'w' )&lt;br /&gt;
 except IOError, ( errno, strerror ) :&lt;br /&gt;
     #...&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a class="" href="/p/generatecppfomxml/wiki/XmlTranslationFile"&gt;Back on top&lt;/a&gt;&lt;/p&gt;
&lt;h1 id="adding-a-translation"&gt;Adding a translation&lt;/h1&gt;
&lt;p&gt;If you want to add a translation, you have to add a &lt;code&gt;translation&lt;/code&gt; node to the &lt;code&gt;translations&lt;/code&gt; root element. A simple way to do it is to copy the English version and translate each child one by one. As long as your language can be written using UTF-8 encoding, there is no problem. The value of the &lt;code&gt;language&lt;/code&gt; attribute is the &lt;a class="" href="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes" rel="nofollow"&gt;ISO-639-1 language code&lt;/a&gt;. This last requirement is not strictly speaking mandatory, but in case you want to commit your changes, it will help the package maintainer. The two fields &lt;code&gt;langName&lt;/code&gt; and &lt;code&gt;nativeName&lt;/code&gt; represent the name of the language in English and in the concerned language respectively (i.e. for French, &lt;code&gt;langName=French&lt;/code&gt; whilst &lt;code&gt;nativeName=Français&lt;/code&gt;), this helps the user to know which one is their favourite language and the maintainer to know which languages are present. &lt;/p&gt;
&lt;p&gt;Note that you may need to change the order of appearance of &lt;code&gt;{0}&lt;/code&gt; and &lt;code&gt;{1}&lt;/code&gt; (&lt;code&gt;{2}&lt;/code&gt;, ...) for the new sentence to make sense. For instance, the French translation of &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;genMethod&lt;/span&gt; &lt;span class="na"&gt;nbr=&lt;/span&gt;&lt;span class="s"&gt;"3"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Auto adding a &lt;span class="ni"&gt;&amp;amp;apos;&lt;/span&gt;{0}&lt;span class="ni"&gt;&amp;amp;apos;&lt;/span&gt; {1} for {2}. &lt;span class="nt"&gt;&amp;lt;/genMethod&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;is &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;genMethod&lt;/span&gt; &lt;span class="na"&gt;nbr=&lt;/span&gt;&lt;span class="s"&gt;"3"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Ajout auto d'un(e) {1} &lt;span class="ni"&gt;&amp;amp;apos;&lt;/span&gt;{0}&lt;span class="ni"&gt;&amp;amp;apos;&lt;/span&gt; pour {2}. &lt;span class="nt"&gt;&amp;lt;/genMethod&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;a class="" href="/p/generatecppfomxml/wiki/XmlTranslationFile"&gt;Back on top&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Fri, 13 Mar 2015 07:17:23 -0000</pubDate><guid>https://sourceforge.net97a4e9a4125fea7aca4780fb4165cf8e910e8a7d</guid></item></channel></rss>