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

Re: How do convert release notes sources from .dbk to .po format?



On Mon, 31 Jan 2011, Marcelo Santana wrote:

Please, does anyone can say me what is the correct way to convert release notes sources from .dbk to .po format?

I'm trying to update Brazilian Portuguese translation of Squeeze release notes and I'm using po4a 0.34-2 (as recommended on Makefile) as bellow but I'm getting a wrong formatting.

po4a-gettextize -f docbook -m en/FILE.dbk -p pt_BR/FILE.po

in the release-notes directory:
$ make updatepo LINGUA=pt_BR

the command behind the scene is in Makefile in the same repository.

updatepo:       $(patsubst en/%.dbk,$(LINGUA)/%.po-force,$(wildcard en/*.dbk))
# The next is just a PHONY target and forcible updates the PO files
#
# Note to translators: For the time begin: we can only work with po4a 0.34-2
# because that one is the one available at www-master. Different po4a bring
# different behaviours so if you are in sid please downgrade to this version
# (and put it on hold) so that you get the "right" PO files.
$(LINGUA)/%.po-force: FORCE
        @po4a_version=$$(dpkg-query -W -f '$${Version}\n' po4a); \
        if [ "$$po4a_version" != "0.34-2" ]; then \
            echo "po4a version: '$$po4a_version'"; \
            echo ""; \
            echo "PO files must be updated with po4a 0.34-2 (Lenny)!"; \
            echo ""; \
            exit 1; \
        fi
        $(UPDATEPO) --master en/$*.dbk --po $(LINGUA)/$*.po

I've added the following two to my workflow

for i in $(ls *.po); do msgcat $i > temp; mv temp $i; done
to get nice looking files (better use the validate target of make though, see the documentation in README.translators)

and
for i in $(ls *.po); do echo $i; msgfmt --statistics -o /dev/null $i; done

both of these must be executed inside the language code directory, pt_BR in your case - sv in mine =)

--
/brother
http://martin.bagge.nu
Bruce Schneier's online purchases are so secure, his shopping cart is an M-1 tank.


Reply to: