##// END OF EJS Templates
i18n: Use new translation string factory....
johbo -
r51:2ebf8ced default
parent child Browse files
Show More
@@ -21,12 +21,11 b''
21 21 import logging
22 22
23 23 from pyramid.exceptions import ConfigurationError
24 from pyramid.i18n import TranslationStringFactory
25 24
26 25 from rhodecode.lib.utils2 import safe_str
27 26 from rhodecode.model.settings import SettingsModel
27 from rhodecode.translation import _
28 28
29 _ = TranslationStringFactory('rhodecode-enterprise')
30 29
31 30 log = logging.getLogger(__name__)
32 31
@@ -20,9 +20,7 b''
20 20
21 21 import colander
22 22
23 from pyramid.i18n import TranslationStringFactory
24
25 _ = TranslationStringFactory('rhodecode-enterprise')
23 from rhodecode.translation import _
26 24
27 25
28 26 class AuthnPluginSettingsSchemaBase(colander.MappingSchema):
@@ -23,7 +23,6 b' import formencode.htmlfill'
23 23 import logging
24 24
25 25 from pyramid.httpexceptions import HTTPFound
26 from pyramid.i18n import TranslationStringFactory
27 26 from pyramid.renderers import render
28 27 from pyramid.response import Response
29 28
@@ -34,11 +33,10 b' from rhodecode.lib.auth import LoginRequ'
34 33 from rhodecode.model.forms import AuthSettingsForm
35 34 from rhodecode.model.meta import Session
36 35 from rhodecode.model.settings import SettingsModel
36 from rhodecode.translation import _
37 37
38 38 log = logging.getLogger(__name__)
39 39
40 _ = TranslationStringFactory('rhodecode-enterprise')
41
42 40
43 41 class AuthnPluginViewBase(object):
44 42
@@ -22,15 +22,12 b' import datetime'
22 22 import formencode
23 23 import logging
24 24 import urlparse
25 import uuid
26 25
27 26 from pylons import url
28 27 from pyramid.httpexceptions import HTTPFound
29 from pyramid.i18n import TranslationStringFactory
30 28 from pyramid.view import view_config
31 29 from recaptcha.client.captcha import submit
32 30
33 from rhodecode.authentication.base import loadplugin
34 31 from rhodecode.events import UserRegistered
35 32 from rhodecode.lib.auth import (
36 33 AuthUser, HasPermissionAnyDecorator, CSRFRequired)
@@ -43,9 +40,8 b' from rhodecode.model.login_session impor'
43 40 from rhodecode.model.meta import Session
44 41 from rhodecode.model.settings import SettingsModel
45 42 from rhodecode.model.user import UserModel
46
43 from rhodecode.translation import _
47 44
48 _ = TranslationStringFactory('rhodecode-enterprise')
49 45
50 46 log = logging.getLogger(__name__)
51 47
@@ -20,10 +20,11 b''
20 20
21 21
22 22 import pylons
23 from pyramid.i18n import get_localizer, TranslationStringFactory
23
24 from pyramid.i18n import get_localizer
24 25 from pyramid.threadlocal import get_current_request
25 26
26 tsf = TranslationStringFactory('rc_root')
27 from rhodecode.translation import _ as tsf
27 28
28 29
29 30 def add_renderer_globals(event):
General Comments 0
You need to be logged in to leave comments. Login now