[Kimchi-devel] [PATCH 6/8] refactor exception: Update gen-pot script to get messages from i18n.py
Aline Manera
alinefm at linux.vnet.ibm.com
Sun Feb 9 22:48:00 UTC 2014
From: Aline Manera <alinefm at br.ibm.com>
As the backend messages will be translated on backend, the i18n.py file
need to be added to POTFILES.in
Also update gen-pot to properly add the translatable messages to .pot
file.
Signed-off-by: Aline Manera <alinefm at br.ibm.com>
---
po/POTFILES.in | 1 +
po/gen-pot.in | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3627f42..4ff7eaa 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -16,3 +16,4 @@ ui/pages/tabs/storage.html.tmpl
ui/pages/template-add.html.tmpl
ui/pages/template-edit.html.tmpl
ui/pages/vnc_auto.html.tmpl
+src/kimchi/i18n.py
diff --git a/po/gen-pot.in b/po/gen-pot.in
index a845bae..0e3cd10 100644
--- a/po/gen-pot.in
+++ b/po/gen-pot.in
@@ -1,3 +1,9 @@
#!/bin/bash
-for src in $@; do cat $src | @CHEETAH@ compile - ;done | xgettext --no-location -o kimchi.pot -L Python -
+for src in $@; do
+ if [ ${src: -3} == ".py" ]; then
+ cat $src
+ else
+ cat $src | @CHEETAH@ compile -
+ fi
+done | xgettext --no-location -o kimchi.pot -L Python -
--
1.7.10.4
More information about the Kimchi-devel
mailing list