[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Conversion instructions (was: Attempts to convert French translation of the Installation Guide to PO)



On Tuesday 31 July 2007 18:52, Holger Wansing wrote:
> Would it be possible to also change the german manual from xml
> to po?

Of course. Here are the steps to do it correctly.

0) Read the translations_po.txt and try to understand the structure of
   existing PO-based translations.

1) Make sure that your translation is *fully up-to-date*.
   './scripts/doc-check de' should not show anything!

2) Fix any places where you know you have deviated from the original in
   your translation. The conversion will only work if the structure and
   markup of the translation and original are *identical*, at least at
   those points where the poxml utilities split out text into separate
   strings.

3) Run the following scripts:
   ./scripts/merge_xml en  # merge English XML files per chapter
   ./scripts/update_pot    # update POT files to match merged XML files
   This will create your base situation for conversion. Do _not_ 'svn up'
   after this or you may have to start from scratch.

4) Merge XML files for the translation:
   ./scripts/merge_xml de

5) Run the actual conversion:
   ./scripts/create_po de

6) Now comes the difficult part of the conversion. Even if the script in
   step 5 completes successfully, you most likely do *not* yet have
   correct PO files. You need to carefully check the *complete output* and
   follow the instructions in the output of the conversion script for
   anomalies, fix them in the German translation and run the conversion
   again until there are no more anomalies.

   Note that some of the "differences" can be quite tricky to spot. You
   will probably have to start with the PO file and find the first point
   where msgid and msgstr no longer match (using clues from the output of
   the conversion script). Then check integrated original and translated
   XML files for the cause of the problem and fix it in the *translation*.
   The fixes can be done either in the regular German XML files, or in the
   "merged" ones. The last will probably be slightly easier and faster as
   it will be easier to match the errors in the PO files to the merged
   files and you won't have to repeat step 4 anymore.

   Note: I see that the "looks untranslated" test needs an update. It can
   currently report certain strings that are translated as untranslated.
   This is probably due to a change in the poxml tools since I wrote the
   scripts.

7) Repeat steps 5 (or 4 and 5) and 6.

8) After you are happy with the conversion, run
   .scripts/create_xml de
   This will generate XML files in ./de.new (not in ./de as that directory
   is still in SVN). This should be without any errors.

9) If that is correct:
   'svn revert -R po/pot/'
   'svn add po/de/'
   'svn del de'
   'svn ci'
   'rm -r ./integrated/ ./de.new/'

Note
Do *not* update POT or PO files yourself after this point! The daily build 
scripts run by Felipe will take care of that.

Attachment: pgpbEkTSvxGMI.pgp
Description: PGP signature


Reply to: