[mousetrap/gnome3-wip: 189/240] Add `make potfile`



commit e87ccf1995ac5c9930cacdf8e48754796271b14a
Author: Stoney Jackson <dr stoney gmail com>
Date:   Sat Jun 28 09:12:12 2014 -0400

    Add `make potfile`

 Makefile.am |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1f3d1bd..c4495d5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,3 +74,31 @@ distclean-local:
 pristine:
        git clean -df   # deletes ignored
        git clean -Xdf  # deletes untracked
+
+
+PYTHON_FILES := $(shell find src -name "*.py" -print)
+POTFILE := src/mousetrap/locale/en/LC_MESSAGES/mousetrap.po
+
+potfile: $(POTFILE)
+
+$(POTFILE): $(PYTHON_FILES)
+       xgettext \
+               --language=Python \
+               --keyword=_ \
+               --output=src/mousetrap/locale/en/LC_MESSAGES/mousetrap.po \
+               --from-code=UTF-8 \
+               --sort-by-file \
+               --copyright-holder="REMOVE" \
+               --package-name="MouseTrap" \
+               --package-version="master" \
+               
--msgid-bugs-address="http://bugzilla.gnome.org/enter_bug.cgi?product=mousetrap&keywords=I18N+L10N&component=i18n";
 \
+               `find src -name "*.py" | sort`
+       sed -i \
+               -e "1,2d" \
+               -e "3s/PACKAGE/MouseTrap/" \
+               -e '14c "Last-Translator: MouseTrap team\\n"' \
+               -e "15s/LANGUAGE/English/" \
+               -e "15s/LL/en/" \
+               -e '16c "Language: en\\n"' \
+               -e "18s/CHARSET/UTF-8/" \
+               $@


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