summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-04-25 06:55:24 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2014-04-25 06:55:24 (GMT)
commit21692220be24355acbe82d39747c462b70fac9a4 (patch)
treed48407eaab1b2ab893524ea53f574ef5813aaeec
parent11164aed14c21f40d72b5d9d0bf011884c74ce38 (diff)
downloadauthentic-old-21692220be24355acbe82d39747c462b70fac9a4.zip
authentic-old-21692220be24355acbe82d39747c462b70fac9a4.tar.gz
authentic-old-21692220be24355acbe82d39747c462b70fac9a4.tar.bz2
admin/settings: make qommon.admin.translations optional
-rw-r--r--authentic/admin/settings.ptl15
1 files changed, 10 insertions, 5 deletions
diff --git a/authentic/admin/settings.ptl b/authentic/admin/settings.ptl
index 4fd59c2..c82b6fe 100644
--- a/authentic/admin/settings.ptl
+++ b/authentic/admin/settings.ptl
@@ -31,7 +31,10 @@ import qommon.template
from qommon.admin.emails import EmailsDirectory
from qommon.admin.texts import TextsDirectory
-from qommon.admin.translations import TranslationsDirectory
+try:
+ from qommon.admin.translations import TranslationsDirectory
+except ImportError:
+ TranslationsDirectory = None
from authentic.form import *
import authentic
@@ -747,7 +750,8 @@ class SettingsDirectory(schemagui.SettingDirectory):
emails = EmailsDirectory()
texts = TextsDirectory()
- translations = TranslationsDirectory()
+ if TranslationsDirectory:
+ translations = TranslationsDirectory()
liberty_providers = LibertyProvidersDir()
endpoints_prefixes = { 'slo': 'proxySingleLogout',
@@ -820,9 +824,10 @@ class SettingsDirectory(schemagui.SettingDirectory):
_('Login Screen'), _('Configure login screen'))
'<dt><a href="texts/">%s</a></dt> <dd>%s</dd>' % (
_('Texts'), _('Configure public pages texts'))
- '<dt><a href="translations/">%s</a></dt> <dd>%s</dd>' % (
- _('Custom Translations'), _('Define custom translations'))
- '</dl>'
+ if TranslationsDirectory:
+ '<dt><a href="translations/">%s</a></dt> <dd>%s</dd>' % (
+ _('Custom Translations'), _('Define custom translations'))
+ '</dl>'
'<h2>%s</h2>' % _('Debug')