[po] add i18n support

This commit is contained in:
Fabio Erculiani
2010-05-16 15:39:53 +02:00
parent deb751de7f
commit 0eb7ba2ac2
4 changed files with 665 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
DESTDIR =
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALLNLSDIR = $(DESTDIR)/usr/share/locale
top_srcdir = "."
MSGMERGE = intltool-update -x --gettext-package=$(NLSPACKAGE) --dist
NLSPACKAGE = molecule
CATALOGS = $(shell ls *.po)
FMTCATALOGS = $(patsubst %.po,%.mo,$(CATALOGS))
POTFILES = $(wildcard ../molecule/*.py) $(wildcard ../molecule/specs/*.py) $(wildcard ../molecule/specs/plugins/*.py) ../molecule.py
all: $(NLSPACKAGE).pot $(FMTCATALOGS)
POTFILES.in:
for file in $(POTFILES); do \
echo "$${file#../}" ; \
done > $@
$(NLSPACKAGE).pot: $(POTFILES) POTFILES.in
intltool-update --gettext-package=$(NLSPACKAGE) --pot
update-po: Makefile $(NLSPACKAGE).pot refresh-po
refresh-po: Makefile POTFILES.in
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
lang=`basename $$cat .po`; \
cp $$lang.po $$lang.old.po; \
if $(MSGMERGE) $$lang ; then \
rm -f $$lang.old.po ; \
echo "$(MSGMERGE) of $$lang succeeded" ; \
else \
echo "$(MSGMERGE) of $$lang failed" ; \
mv $$lang.old.po $$lang.po ; \
fi \
done
report:
@for cat in *.po ; do \
echo -n "$$cat: "; \
msgfmt --statistics -o /dev/null $$cat; \
done
clean:
@rm -fv *mo *~ .depend *.autosave
distclean: clean
rm -f *mo .depend Makefile $(NLSPACKAGE).pot POTFILES.in
depend:
install: all
mkdir -p $(INSTALLNLSDIR)
for n in $(CATALOGS); do \
l=`basename $$n .po`; \
mo=$$l.mo; \
if [ ! -f $$mo ]; then continue; fi; \
$(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l; \
$(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
$(INSTALL) -m 644 $$mo \
$(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
done
%.mo: %.po
msgfmt -o $@ $<
+16
View File
@@ -0,0 +1,16 @@
molecule/cmdline.py
molecule/exception.py
molecule/handlers.py
molecule/i18n.py
molecule/__init__.py
molecule/output.py
molecule/settings.py
molecule/utils.py
molecule/version.py
molecule/specs/__init__.py
molecule/specs/skel.py
molecule/specs/plugins/builtin.py
molecule/specs/plugins/__init__.py
molecule/specs/plugins/remaster.py
molecule/specs/plugins/tar.py
molecule.py
+293
View File
@@ -0,0 +1,293 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: Molecule 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-16 15:31+0200\n"
"PO-Revision-Date: 2010-05-16 15:39+0100\n"
"Last-Translator: Fabio Erculiani <lxnay@sabayonlinux.org>\n"
"Language-Team: Sabayon <lxnay@sabayon.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n"
"X-Poedit-SourceCharset: utf-8\n"
#: ../molecule/cmdline.py:62
msgid "Basic Options"
msgstr "Opzioni base"
#: ../molecule/cmdline.py:64
msgid "this output"
msgstr "questo output"
#: ../molecule/cmdline.py:65
msgid "disable colorized output"
msgstr "disabilita output colorato"
#: ../molecule/cmdline.py:67
msgid "Application Options"
msgstr "Opzioni applicazione"
#: ../molecule/cmdline.py:69
msgid "execute against specified specification files"
msgstr "esegui utilizzando file di specifica forniti"
#: ../molecule/handlers.py:39
msgid "preparing execution"
msgstr ""
#: ../molecule/handlers.py:45
msgid "executing"
msgstr "esecuzione"
#: ../molecule/handlers.py:83
msgid "All done"
msgstr "Tutto fatto"
#: ../molecule/output.py:664
msgid "Molecule needs your attention"
msgstr ""
#: ../molecule/output.py:749 ../molecule/output.py:986
msgid "Yes"
msgstr "Si"
#: ../molecule/output.py:749
msgid "No"
msgstr "No"
#: ../molecule/output.py:764
msgid "Molecule got a question for you"
msgstr "Molecule ha una domanda"
#: ../molecule/output.py:778
msgid "Interrupted"
msgstr "Interrotto"
#: ../molecule/output.py:838
msgid "Selected number"
msgstr ""
#: ../molecule/output.py:853
msgid "Please select an option"
msgstr ""
#: ../molecule/output.py:855
msgid "Discard all"
msgstr "Annulla tutto"
#: ../molecule/output.py:856
msgid "Confirm"
msgstr "Conferma"
#: ../molecule/output.py:857
msgid "Add item"
msgstr "Aggiungi elemento"
#: ../molecule/output.py:858
msgid "Edit item"
msgstr "Modifica elemento"
#: ../molecule/output.py:859
msgid "Remove item"
msgstr "Rimuovi elemento"
#: ../molecule/output.py:860
msgid "Show current list"
msgstr ""
#: ../molecule/output.py:864
msgid "Your choice (type a number and press enter):"
msgstr ""
#: ../molecule/output.py:896
msgid "You don't have typed a number."
msgstr ""
#: ../molecule/output.py:899
msgid "Invalid action."
msgstr "Azione non valida."
#: ../molecule/output.py:909
msgid "String to add (-1 to go back):"
msgstr ""
#: ../molecule/output.py:919
msgid "Invalid string."
msgstr "Stringa non valida."
#: ../molecule/output.py:927
msgid "Element number to edit (-1 to go back):"
msgstr ""
#: ../molecule/output.py:938
msgid "old"
msgstr "vecchio"
#: ../molecule/output.py:938
msgid "new value:"
msgstr ""
#: ../molecule/output.py:946 ../molecule/output.py:964
msgid "Invalid element."
msgstr "Elemento non valido."
#: ../molecule/output.py:955
msgid "Element number to remove (-1 to go back):"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:42
#: ../molecule/specs/plugins/builtin.py:157
#: ../molecule/specs/plugins/builtin.py:201
#: ../molecule/specs/plugins/builtin.py:298
#: ../molecule/specs/plugins/builtin.py:415
#: ../molecule/specs/plugins/builtin.py:534
#: ../molecule/specs/plugins/builtin.py:560
#: ../molecule/specs/plugins/remaster.py:71
#: ../molecule/specs/plugins/remaster.py:100
msgid "spawning"
msgstr "esecuzione"
#: ../molecule/specs/plugins/builtin.py:76
msgid "inner chroot hook failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:99
#: ../molecule/specs/plugins/builtin.py:191
#: ../molecule/specs/plugins/builtin.py:368
#: ../molecule/specs/plugins/builtin.py:500
#: ../molecule/specs/plugins/remaster.py:59
#: ../molecule/specs/plugins/tar.py:59
msgid "executing pre_run"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:111
msgid "inner_source_chroot_script failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:119
msgid "pre_run completed successfully"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:128
#: ../molecule/specs/plugins/builtin.py:218
#: ../molecule/specs/plugins/builtin.py:382
#: ../molecule/specs/plugins/builtin.py:508
#: ../molecule/specs/plugins/remaster.py:143
#: ../molecule/specs/plugins/tar.py:96
msgid "executing post_run"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:138
#: ../molecule/specs/plugins/builtin.py:317
#: ../molecule/specs/plugins/builtin.py:393
#: ../molecule/specs/plugins/builtin.py:519
#: ../molecule/specs/plugins/remaster.py:151
msgid "executing kill"
msgstr "esecuzione uccisione"
#: ../molecule/specs/plugins/builtin.py:147
msgid "mirroring running"
msgstr "esecuzione mirroring"
#: ../molecule/specs/plugins/builtin.py:164
msgid "mirroring failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:171
msgid "mirroring completed successfully"
msgstr "mirroring completato con successo"
#: ../molecule/specs/plugins/builtin.py:208
#: ../molecule/specs/plugins/builtin.py:541
msgid "outer chroot hook failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:228
msgid "emptying dir"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:249
msgid "removing dir"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:256
msgid "removal failed for"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:269
msgid "release file creation failed, not a file"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:286
msgid "release file creation failed, system error"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:305
msgid "outer chroot hook (after inner) failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:326
#: ../molecule/specs/plugins/remaster.py:232
msgid "hooks running"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:341
msgid "hooks completed succesfully"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:374
msgid "preparing environment"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:402
#: ../molecule/specs/plugins/tar.py:66
msgid "compressing chroot"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:422
#: ../molecule/specs/plugins/tar.py:86
msgid "chroot compression failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:428
msgid "chroot compressed successfully"
msgstr "chroot compresso con successo"
#: ../molecule/specs/plugins/builtin.py:438
msgid "merging livecd root"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:548
msgid "building ISO image"
msgstr "costruzione immagine ISO"
#: ../molecule/specs/plugins/builtin.py:567
msgid "ISO image build failed"
msgstr "Costruzione immagine ISO fallita"
#: ../molecule/specs/plugins/builtin.py:574
msgid "built ISO image"
msgstr "Immagine ISO costruita"
#: ../molecule/specs/plugins/builtin.py:580
msgid "generating md5 for"
msgstr "generazione md5 per"
#: ../molecule/specs/plugins/remaster.py:78
msgid "iso mount failed"
msgstr "mount iso fallito"
#: ../molecule/specs/plugins/remaster.py:107
msgid "squash mount failed"
msgstr "montaggio squash fallito"
#: ../molecule/specs/plugins/remaster.py:119
msgid "iso unpacker running"
msgstr "spacchettamento iso"
+291
View File
@@ -0,0 +1,291 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-05-16 15:31+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../molecule/cmdline.py:62
msgid "Basic Options"
msgstr ""
#: ../molecule/cmdline.py:64
msgid "this output"
msgstr ""
#: ../molecule/cmdline.py:65
msgid "disable colorized output"
msgstr ""
#: ../molecule/cmdline.py:67
msgid "Application Options"
msgstr ""
#: ../molecule/cmdline.py:69
msgid "execute against specified specification files"
msgstr ""
#: ../molecule/handlers.py:39
msgid "preparing execution"
msgstr ""
#: ../molecule/handlers.py:45
msgid "executing"
msgstr ""
#: ../molecule/handlers.py:83
msgid "All done"
msgstr ""
#: ../molecule/output.py:664
msgid "Molecule needs your attention"
msgstr ""
#: ../molecule/output.py:749 ../molecule/output.py:986
msgid "Yes"
msgstr ""
#: ../molecule/output.py:749
msgid "No"
msgstr ""
#: ../molecule/output.py:764
msgid "Molecule got a question for you"
msgstr ""
#: ../molecule/output.py:778
msgid "Interrupted"
msgstr ""
#: ../molecule/output.py:838
msgid "Selected number"
msgstr ""
#: ../molecule/output.py:853
msgid "Please select an option"
msgstr ""
#: ../molecule/output.py:855
msgid "Discard all"
msgstr ""
#: ../molecule/output.py:856
msgid "Confirm"
msgstr ""
#: ../molecule/output.py:857
msgid "Add item"
msgstr ""
#: ../molecule/output.py:858
msgid "Edit item"
msgstr ""
#: ../molecule/output.py:859
msgid "Remove item"
msgstr ""
#: ../molecule/output.py:860
msgid "Show current list"
msgstr ""
#: ../molecule/output.py:864
msgid "Your choice (type a number and press enter):"
msgstr ""
#: ../molecule/output.py:896
msgid "You don't have typed a number."
msgstr ""
#: ../molecule/output.py:899
msgid "Invalid action."
msgstr ""
#: ../molecule/output.py:909
msgid "String to add (-1 to go back):"
msgstr ""
#: ../molecule/output.py:919
msgid "Invalid string."
msgstr ""
#: ../molecule/output.py:927
msgid "Element number to edit (-1 to go back):"
msgstr ""
#: ../molecule/output.py:938
msgid "old"
msgstr ""
#: ../molecule/output.py:938
msgid "new value:"
msgstr ""
#: ../molecule/output.py:946 ../molecule/output.py:964
msgid "Invalid element."
msgstr ""
#: ../molecule/output.py:955
msgid "Element number to remove (-1 to go back):"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:42
#: ../molecule/specs/plugins/builtin.py:157
#: ../molecule/specs/plugins/builtin.py:201
#: ../molecule/specs/plugins/builtin.py:298
#: ../molecule/specs/plugins/builtin.py:415
#: ../molecule/specs/plugins/builtin.py:534
#: ../molecule/specs/plugins/builtin.py:560
#: ../molecule/specs/plugins/remaster.py:71
#: ../molecule/specs/plugins/remaster.py:100
msgid "spawning"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:76
msgid "inner chroot hook failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:99
#: ../molecule/specs/plugins/builtin.py:191
#: ../molecule/specs/plugins/builtin.py:368
#: ../molecule/specs/plugins/builtin.py:500
#: ../molecule/specs/plugins/remaster.py:59
#: ../molecule/specs/plugins/tar.py:59
msgid "executing pre_run"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:111
msgid "inner_source_chroot_script failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:119
msgid "pre_run completed successfully"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:128
#: ../molecule/specs/plugins/builtin.py:218
#: ../molecule/specs/plugins/builtin.py:382
#: ../molecule/specs/plugins/builtin.py:508
#: ../molecule/specs/plugins/remaster.py:143
#: ../molecule/specs/plugins/tar.py:96
msgid "executing post_run"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:138
#: ../molecule/specs/plugins/builtin.py:317
#: ../molecule/specs/plugins/builtin.py:393
#: ../molecule/specs/plugins/builtin.py:519
#: ../molecule/specs/plugins/remaster.py:151
msgid "executing kill"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:147
msgid "mirroring running"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:164
msgid "mirroring failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:171
msgid "mirroring completed successfully"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:208
#: ../molecule/specs/plugins/builtin.py:541
msgid "outer chroot hook failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:228
msgid "emptying dir"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:249
msgid "removing dir"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:256
msgid "removal failed for"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:269
msgid "release file creation failed, not a file"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:286
msgid "release file creation failed, system error"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:305
msgid "outer chroot hook (after inner) failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:326
#: ../molecule/specs/plugins/remaster.py:232
msgid "hooks running"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:341
msgid "hooks completed succesfully"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:374
msgid "preparing environment"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:402
#: ../molecule/specs/plugins/tar.py:66
msgid "compressing chroot"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:422
#: ../molecule/specs/plugins/tar.py:86
msgid "chroot compression failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:428
msgid "chroot compressed successfully"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:438
msgid "merging livecd root"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:548
msgid "building ISO image"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:567
msgid "ISO image build failed"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:574
msgid "built ISO image"
msgstr ""
#: ../molecule/specs/plugins/builtin.py:580
msgid "generating md5 for"
msgstr ""
#: ../molecule/specs/plugins/remaster.py:78
msgid "iso mount failed"
msgstr ""
#: ../molecule/specs/plugins/remaster.py:107
msgid "squash mount failed"
msgstr ""
#: ../molecule/specs/plugins/remaster.py:119
msgid "iso unpacker running"
msgstr ""