Skip to content

Commit

Permalink
Fix: No translation file found for domain
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 23, 2018
1 parent 94d6c94 commit 0b32a63
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ for (const plugin of config.plugins) {
}

for (const rule of config.module.rules) {
if (rule.use.loader == 'babel-loader') {
if (rule.use.loader === 'babel-loader') {
const plugins = [];
for (const plugin of rule.use.options.plugins) {
plugins.push(require.resolve(plugin));
Expand Down
16 changes: 10 additions & 6 deletions geoportal/c2cgeoportal_geoportal/scripts/theme2fts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
# either expressed or implied, of the FreeBSD Project.


import gettext
import os
import sys
import transaction

from argparse import ArgumentParser
from c2c.template import get_config
from c2cgeoportal_geoportal.scripts import fill_arguments, get_app
from gettext import translation
from sqlalchemy import func


Expand Down Expand Up @@ -129,11 +129,15 @@ def __init__(self, options):

self._ = {}
for lang in self.languages:
self._[lang] = translation(
"{}_geoportal-client".format(package),
options.locale_folder.format(package=package),
[lang],
)
try:
self._[lang] = gettext.translation(
"{}_geoportal-client".format(package),
options.locale_folder.format(package=package),
[lang],
)
except OSError as e:
self._[lang] = gettext.NullTranslations()
print("Warning: {} (language: {})".format(e, lang))

query = self.session.query(Interface)
if options.interfaces is not None:
Expand Down

0 comments on commit 0b32a63

Please sign in to comment.