Skip to content

Commit 1bb317e

Browse files
committed
Add translation path
1 parent 18bb043 commit 1bb317e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

ckanext/qa/plugin/__init__.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23

34
import ckan.model as model
45
import ckan.plugins as p
@@ -11,7 +12,7 @@
1112
from ckanext.qa.lib import create_qa_update_package_task
1213
from ckanext.report.interfaces import IReport
1314
from ckan.lib.plugins import DefaultTranslation
14-
15+
import ckanext.qa
1516

1617
log = logging.getLogger(__name__)
1718

@@ -110,3 +111,11 @@ def after_show(self, context, pkg_dict):
110111
del qa_dict['package_id']
111112
del qa_dict['resource_id']
112113
res['qa'] = qa_dict
114+
115+
# ITranslation
116+
def i18n_directory(self):
117+
u'''Change the directory of the .mo translation files'''
118+
return os.path.join(
119+
os.path.dirname(ckanext.qa.__file__),
120+
'i18n'
121+
)

0 commit comments

Comments
 (0)