]> git.ipfire.org Git - people/jschlag/pbs.git/commitdiff
Properly load translation files
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:17:31 +0000 (12:17 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Oct 2017 11:17:31 +0000 (12:17 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/buildservice/constants.py.in
src/hub/__init__.py
src/web/__init__.py

index e7ee776359e9096ffd3deb995b430fd6e992df52..b19f33526d5fde12260ae06d1f2515f919c4dcff 100644 (file)
@@ -456,7 +456,8 @@ substitutions = \
        '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
        '|configsdir=$(configsdir)|' \
        '|bindir=$(bindir)|' \
-       '|datadir=$(datadir)|'
+       '|datadir=$(datadir)|' \
+       '|localedir=$(localedir)|'
 
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
index 73d4b75273ec2ad7b9f239cc9ac6e8320d029ba5..7d20ab236b31676c9a8c21d543700126781c9553 100644 (file)
@@ -5,8 +5,11 @@ import os.path
 # Import all constants from the pakfire module.
 from pakfire.constants import *
 
+PACKAGE_NAME = "@PACKAGE_NAME@"
+
 CONFIGSDIR = "@configsdir@"
 DATADIR    = "@datadir@"
+LOCALEDIR  = "@localedir@"
 
 PAKFIRE_DIR  = "/pakfire"
 PACKAGES_DIR = os.path.join(PAKFIRE_DIR, "packages")
index 849208d55302ba65d6ce9bd18aa5db414e09b0d4..0c722a3d46611a7a48902105d5d154e819c0f8dd 100644 (file)
@@ -27,8 +27,7 @@ class Application(tornado.web.Application):
                )
 
                # Load translations.
-               tornado.locale.load_gettext_translations(
-                       os.path.join(BASEDIR, "translations"), "pakfire")
+               tornado.locale.load_gettext_translations(LOCALEDIR, PACKAGE_NAME)
 
                tornado.web.Application.__init__(self, **settings)
 
index d077714c06a7f0eefe249fb701afe2028944c99d..c34ec552a3785a6d8a744e09269193252ee48f44 100644 (file)
@@ -98,8 +98,7 @@ class Application(tornado.web.Application):
                )
 
                # Load translations.
-               tornado.locale.load_gettext_translations(
-                       os.path.join(BASEDIR, "translations"), "pakfire")
+               tornado.locale.load_gettext_translations(LOCALEDIR, PACKAGE_NAME)
 
                tornado.web.Application.__init__(self, **settings)