@@ -3,6 +3,7 @@
* Set dependency to python >= 2.6 in debian/control
* Fixed package internal import for python 3.x
+* Locales are now build in debian/rules when creating the package
0.5
----
@@ -1,2 +1,4 @@
include LICENSE
include CHANGELOG
+include locale/en/LC_MESSAGES/stov.po
+include locale/de/LC_MESSAGES/stov.po
@@ -1,6 +1,4 @@
TODOs for 0.6:
*Rework and correct strings
-*Compile localization files when installing instead of supplying binaries
*Make the debian package lintian clean
-*Fix "C" locale
@@ -2,6 +2,7 @@ stov (0.6.1wip-1) stable; urgency=low
* Changed minimal python version in debian/control to 2.6
+ * Locales are now build in debian/rules when creating the package
-- Helmut Pozimski <helmut@pozimski.eu> Sun, 14 Apr 2013 23:31:23 +0200
@@ -3,7 +3,7 @@ XS-Python-Version: >= 2.6
Maintainer: Helmut Pozimski <helmut@pozimski.eu>
Section: python
Priority: optional
-Build-Depends: python (>= 2.6), debhelper (>= 7.4.3)
+Build-Depends: python (>= 2.6), debhelper (>= 7.4.3), gettext
Standards-Version: 3.9.1
Package: stov
@@ -7,4 +7,6 @@
dh $@ --with python2
override_dh_auto_install:
python setup.py install --root=debian/stov --install-layout=deb --install-lib=/usr/share/stov --install-scripts=/usr/share/stov --install-data=/usr
+ msgfmt locale/de/LC_MESSAGES/stov.po --output-file debian/stov/usr/share/locale/de/LC_MESSAGES/stov.mo
+ msgfmt locale/en/LC_MESSAGES/stov.po --output-file debian/stov/usr/share/locale/en/LC_MESSAGES/stov.mo
override_dh_auto_build:
@@ -37,6 +37,5 @@ setup(
scripts=["stov"],
data_files=[("share/locale/de/LC_MESSAGES",
["locale/de/LC_MESSAGES/stov.mo"]),
- ("share/locale/C/LC_MESSAGES", ["locale/C/LC_MESSAGES/stov.mo"]),
("share/locale/en/LC_MESSAGES", ["locale/en/LC_MESSAGES/stov.mo"])]
)
@@ -56,7 +56,8 @@ try:
trans = gettext.translation("stov", locale_path)
except IOError:
gettext.install("stov")
- printf(_("Translation files could not be found, localization "
+ if os.environ["LANG"] != "C" and os.environ["LANGUAGE"] != "C":
+ printf(_("Translation files could not be found, localization "
"won't be available"), outputlevel="default",
descriptor="stderr")
else: