Current status on migration
This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Current status on migration | julien | 05 Sep 20:48 |
Current status on migration | Ulf-D. Ehlert | 06 Sep 21:08 |
Current status on migration | Ulf-D. Ehlert | 07 Sep 11:26 |
Current status on migration | julien | 08 Sep 08:24 |
Current status on migration | Ulf-D. Ehlert | 08 Sep 13:56 |
Current status on migration | julien | 09 Sep 21:37 |
Current status on migration
Hi,
Remember that it's work in progress, don't expect it to work without
any
problems.
We still have to find out when the script fails or when it produces files that we can't use.
I ran
xml2po-support> python tools/split-xml-multi-lang.py --debug -l fr -f
oldsrc/menus/file-new.xml -d DEST
I got two directories, 'en' and 'fr' with file-new.xml in both. OK
I noticed in the 'fr' file: - in and , all language attributes are shown (lang=en;de;es...) even though there are fr para only.
- The tip is in english because it is not translated to 'fr'.
- In the grayscale section, there are 4 'en' para and 2 'fr' para in the source. In the destination 'fr' file, "missing" para are in english.
What is the use of the 'seqnum=' added?
Greetings,
Julien
Current status on migration
Hi Julien,
julien (Freitag, 5. September 2008, 20:48):
I ran
xml2po-support> python tools/split-xml-multi-lang.py --debug -l fr -f oldsrc/menus/file-new.xml -d DESTI got two directories, 'en' and 'fr' with file-new.xml in both. OK
I noticed in the 'fr' file: - in and , all language attributes are shown (lang=en;de;es...) even though there are fr para only.
Yes, 'xml2po' won't care about the "lang" attribute, so I didn't remove or replace them. And they may be useful for finding bugs:
English text
may be ok in a French XML file, but e.g.
English text
would obviously indicate a serious bug in our script.
- The tip is in english because it is not translated to 'fr'.
Yes, that's intended. We need two XML files of the very same structure to use xml2po's "reuse" option. Try
xml2po --output=french.po --reuse=french.xml --language=fr english.xml
xml2po should replace any "translation" which is the same as the English source string with an empty string. (Check this!)
- In the grayscale section, there are 4 'en' para and 2 'fr' para in the source. In the destination 'fr' file, "missing" para are in english.
Hey, nobody is perfect. ;-)
What should the script do? Are the the missing 'fr' (and 'de') paras
intentionally not translated? The 'en' paras may be added just
yesterday, how can the script know?
But maybe it's a good idea to detect these cases and emit a warning.
What is the use of the 'seqnum=' added?
They are internally used to mark a node as "seen". The current script version has been changed to remove these attributes when constructing the destination document.
Ulf
Current status on migration
Ulf-D. Ehlert (Samstag, 6. September 2008, 21:08):
English text
would obviously indicate a serious bug in our script.
s/de;fr/de/
Ulf
Current status on migration
Hi,
After updating xml2po-support, I ran: xml2po-support/DEST> xml2po --output=file-new.po --reuse fr/file-new.xml --language=fr en/file-new.xml
The file-new.po I got is wrong :-(. It is correct up to line 33, "Basic options".
From there, all msgstr are shifted:
#: en/file-new.xml:33(phrase)
msgid "Basic Options"
msgstr "Options de base"
#: en/file-new.xml:18(primary) en/file-new.xml:33(quote)
msgid "New Image"
msgstr "Le dialogue d'une nouvelle image"
#: en/file-new.xml:33(phrase) en/file-new.xml:41(phrase)
msgid "The dialog"
msgstr "Modèle"
#: en/file-new.xml:36(primary) en/file-new.xml:41(term)
en/file-new.xml:42(quote)
msgid "Template"
msgstr "Menu" ####SHOULD BE Modèle
#: en/file-new.xml:36(secondary)
msgid "Menu"
msgstr "Image" #SHOULD BE Menu
#: en/file-new.xml:17(primary) en/file-new.xml:38(primary)
en/file-new.xml:94(primary) en/file-new.xml:171(primary)
msgid "Image"
msgstr "Taille de l'image" ####SHOULD BE Image
#: en/file-new.xml:39(secondary) en/file-new.xml:41(primary)
msgid "Image size"
msgstr "Lors de la création" ####SHOULD BE Taille de l'image
Further in the file, shifting is worse. there is no correspondence
between msgid's and msgstr's.
This po in unusable. I would better write it by hand :-(
Greetings,
Julien
Current status on migration
Hi Julien,
julien (Montag, 8. September 2008, 08:24):
After updating xml2po-support, I ran: xml2po-support/DEST> xml2po --output=file-new.po --reuse fr/file-new.xml --language=fr en/file-new.xml
Thanks for testing it. :-)
The file-new.po I got is wrong :-(. It is correct up to line 33, "Basic options".
From there, all msgstr are shifted:
Yes, I can reproduce it.
My "file-new.po" contains the following output:
#: .../en/file-new.xml:33(phrase) .../en/file-new.xml:41(phrase)
msgid "The dialog"
msgstr "Modèle"
Looking at the relevant lines of "en/file-new.xml" I find
33: ... The New Image dialog 42: ... The Template dialog
It seems that "xml2po" can't handle these lines when "reusing" an XML file even when original XML file and reused XML file both have the same structure.
However, I'm using my own patched version of "xml2po" - see
http://bugzilla.gnome.org/show_bug.cgi?id=545478
for the bugreport and
http://bugzilla.gnome.org/attachment.cgi?id=115553&action=view
for the patch.
Using the patched version of "xml2po" the output is usable. Some messages are not translated, but that's ok.
Apparently we can't rely on the default gnome-doc-utils package, looks like we have to provide a patched version of "xml2po". Hmm, maybe that's not so bad, then we could apply more patches, e.g. producing a useful header for our po files.
Ulf
Current status on migration
http://bugzilla.gnome.org/attachment.cgi?id=115553&action=view
for the patch.
Using the patched version of "xml2po" the output is usable. Some messages are not translated, but that's ok.
Yes, I confirm :-)
Thank you for your work.
Julien