Derek Atkins schrieb:
I'm trying to wrap my head around where these translations live...

Actually I wanted to point out this very same issue: Translations currently do *only* exist in the po/LANG.po files, *nowhere* else. I would strongly suggest to keep it this way. It shouldn't be too difficult to have some code internally that will pass the option description through gettext once. But you shouldn't start any additionaly place where translations should go.

By the way this structure directly invites option inconsistencies across languages... and also you should probably have at least two different descriptions for one option: One "normal description" which will be displayed as label, and another description that can be displayed as tooltip. I would therefore rather suggest this schema (sorry, I'm not too familiar with xsd right now):

<xsd:complexType name="qofprovider">
  <xsd:sequence>
<xsd:element name="option" type="qofconfig:qofoption" minOccurs="0" maxOccurs="unbounded"/>
  </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="qofoption">
  <xsd:sequence>
<xsd:element name="description" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="tooltip" type="xsd:string" minOccurs="0" maxOccurs="1"/>
  </xsd:sequence>
  <xsd:attribute name="type" type="xsd:string" use="required"/>
  <xsd:attribute name="name" type="xsd:string" use="required"/>
  </xsd:extension>
</xsd:complexType>
</xsd:schema>

Also, you might consider changing the attribute name "name" into something more precise, maybe "key" or similar.

But I really strongly suggest *not* to have any translations anywhere outside the po/LANG.po files.

Christian


<?xml version="1.0" encoding="UTF-8"?>
<qofconfig xmlns="http://qof.sourceforge.net/"; >
 <backend name="GnuCash Backend Version 2">
   <provider xml:lang="en-gb">
       <option type="gint64" name="file_retention_days">
           Number of days to retain old copies of the file.
       </option>
       <option type="boolean" name="file_compression">
           Use compressed files or not?
       </option>
   </provider>
 </backend>
</qofconfig>

If multiple translations are included in one file, the provider tag repeats with the language label. Note that the language specified is the XML version, not the expected en_GB but using a hyphen AND case insensitive.

(Don't you love standards!)

--

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to