Commit graph

4 commits

Author SHA1 Message Date
Lukas Fleischer
e24f82f476 Add "update-pot" target to Makefile.
Can be used to rebuild the message catalog from our source tree.
"po/POTFILES" contains a list of source files to be scanned for
translation strings.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10 16:27:45 +02:00
Lukas Fleischer
501c0875a0 Add Makefile to compile ".po" files.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10 15:40:49 +02:00
Lukas Fleischer
5c5b80e0ed Remove duplicate message definitions from new portable object files.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10 15:40:48 +02:00
Lukas Fleischer
758b7bf054 Convert translation files to gettext compatible portable objects.
Put new gettext compatible files into "po/" while keeping old
translations in "web/lang/".

Conversion was done using following hacky shell script:

----
for f in *.po; do
  # Remove "<?php" shebang and "global" statements.
  sed -i '1d; /^global/d' "$f"
  # Convert former translation strings into real PO statements.
  sed -i 's/^$_t\[\(.*\)\] = \(.*\);.*/msgid \1\nmsgstr \2/' "$f"
  # Ensure there always is an empty line after each msgstr.
  sed -i '/^msgstr/!b; n; /^$/!i\
' "$f"
done
----

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
2011-04-10 15:40:48 +02:00