superficial xrc changes...

Kai-Uwe Behrmann ku.b at gmx.de
Thu Nov 6 13:20:37 GMT 2003


Am 05.11.03, 20:25 -0500 schrieb Ed Halley:

> I really have no good experience dealing with PO strings, so any ideas
> you have would be helpful.  All I know is that tranlatable strings
> belong in _() macros to help generate the base language version.

In C sources it is usually _(). Most texts goes to xrc. There we have only
one continue think the label of the widget:
<object class="wxTextCtrl" name="lens_val_v">

till the next /object is the text included:
                    <object class="wxTextCtrl" name="lens_val_v">
                      <help>Horizontal Field of View</help>
                      <longhelp>Horizontal Field of View</longhelp>
                      <tooltip>Horizontal Field of View</tooltip>
                      <value></value>
                      <style>wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB</style>
                    </object>

or between two <label>Label Name</label>.


> > One thing I can imagine is You create a file and put the new strings
> > under the old ones and let an empty row. So I can tell vim via an macro to
> > update de.po . (An sed script should do as well.) The translator can check
> > if all is ok then.
> > Otherwise an translator would need the old string from the old xrc file
> > and search for the new place in the new xrc file and exchange in the po
> > translation file. ... too much work.
>
> Well, when the work is repetitive, automate it.  If I knew just what
> needed to be coordinated, I could find/write some Perl scripts for the
> task.

If You can easy build an perl script which puts the translation strings
into an po file, that would be great. So I only have to reorder and to
comment out. Mostly this is smaller work. If You use vim You can see the
syntax highlighted of the de.po example.
in the following string You can put the "name" string:
#: lens_panel.xrc:66 name="lens_val_v"

followed by :
msgid "here the english strings You found"
and an empty:
msgid ""
this is then translators work

maybe a free line before the next   #:


Would be nice.
Later it could be made using two xrc files , the old - the new, and
exchange the old against the new tags if changed and not empty.

I have no perl experiences, (C++ was enough this year) ...looking forward ;)
Kai-Uwe



More information about the ptX mailing list