[Debian-handbook-translators] How to translate pictures and schemas?

AYANOKOUZI, Ryuunosuke i38w7i3 at yahoo.co.jp
Mon Apr 13 18:24:17 UTC 2015


Hi all,

README.translators saying that "there's currently no automatic way to
verify whether your translated schemas/pictures are up-to-date."

But, only for *.dia files, there is a good way to translate text in
the file.  Roughly speaking, translate *.dia file through *.po file,
which is generated by po4a.

I hope this solution is helpful for translators.
The following example is the procedure for translating "autobuilder.dia".


0. Initial setting
DIA_SRC=./en-US/images/autobuilder.dia
XML_SRC=./en-US/images/autobuilder.xml
POT_SRC=./en-US/images/autobuilder.pot
PO_DST=./ja-JP/images/autobuilder.po
XML_DST=./ja-JP/images/autobuilder.xml
PNG_DST=./ja-JP/images/autobuilder.png
DIA_DST=./ja-JP/images/autobuilder.dia

1. Extract dia file (dia file is nothing more than gzipped-xml file).
$ gzip --verbose --stdout --decompress -- ${DIA_SRC} > ${XML_SRC}

2. Pick out messages from the xml file
$ po4a-gettextize --format dia --master ${XML_SRC} --po ${POT_SRC}

3. Generate po file from the pot file or merge po file.
$ if [ -e ${PO_DST} ]; then \
msgmerge --update ${PO_DST} ${POT_SRC} \
else \
msginit --no-translator --input ${POT_SRC} --locale ja_JP --output-file ${PO_DST} \
fi

4. Translate the po file.
$ vi ${PO_DST}

5. Check the translation status.
$ msgfmt --statistics -c -v -o /dev/null ${PO_DST}

6. Generate translated-xml file from the po file.
$ po4a-translate --format dia --master ${XML_SRC} --po ${PO_DST} --keep 0 --localized ${XML_DST}

7. Check the difference between source-xml file and translated-xml file.
$ diff ${XML_SRC} ${XML_DST}

8. Export to png file from the traslated-xml file.
$ dia --export ${PNG_DST} ${XML_DST}

9. Compress the traslated-xml file.
$ gzip --verbose --stdout --best -- ${XML_DST} > ${DIA_DST}

Regards,
AYANOKOUZI, Ryuunosuke
--
AYANOKOUZI, Ryuunosuke <i38w7i3 at yahoo.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-handbook-translators/attachments/20150414/86a1bd43/attachment.sig>


More information about the Debian-handbook-translators mailing list