From: Don A. <dal...@us...> - 2002-04-16 12:39:32
|
On Mon, 2002-04-15 at 21:03, Jeffrey C. Ollie wrote: > <?xml version="1.0" encoding="iso-8859-1"?> > <filters> > <filter> > <name lang="en_US">Roquefort</name> > <name lang="fr_FR">Roquefort</name> > <comment lang="en_US">Cheese</comment> > <comment lang="fr_FR">Fromage</comment> > <and> > <rule class="Has a name"> > <arg value=""/> > <arg value="Roquefort"/> > <arg value=""/> > <arg value=""/> > </rule> > </and> > </filter> > </filters> > > I think that something like this will be needed for when I put > together a set of system filters, but this may make life harder for > translators as they'll have to look multiple places to make > translations. But I can't think of a better way to do it using the > standard gettext methods. Actually, I think we can use the standard gettext method for this. I can modify the extraction routines to look at the standard XML files and extract the terms that we need for translation purpose (in this case, the filter name and the filter comment). Since the standard files are only read, not written by gramps, and one way translation should work just fine. This means that you should be able to do: name_en = attrs['name'] filter_en = attrs['comment'] name = _(name_en) filter = _(filter_en) This way, all the translations are in a single place (the .po files) Don -- Don Allingham dal...@us... http://gramps.sourceforge.net |