1. Martin Thorsen Ranang
  2. tgext.registration2

Commits

Martin Thorsen Ranang  committed 38750a4

Upgraded i18n calls to be compatible with TurboGears version 2.3.1.

  • Participants
  • Parent commits 608c314
  • Branches default

Comments (0)

Files changed (2)

File tgext.registration2.egg-info/PKG-INFO

View file
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: tgext.registration2
-Version: 0.5.1dev-20130129
+Version: 0.6.0dev-20130911
 Summary: set of controller entries to handle users' (self)registration in turbogears 2
 Home-page: http://resheteva.org.il/packages
 Author: alex bodnaru

File tgext/registration2/widgets.py

View file
 
 import model
 
-from pylons.i18n import ugettext as _
+from tg.i18n import ugettext as _, lazy_ugettext as l_
 
 from tg import config
 
 class NewUserFields(WidgetsList):
     
     user_name = TextField('user_name',
-                    label_text=_("User Name"),
-                    help_text=_("A short name that you will use to log in."))
+                    label_text=l_("User Name"),
+                    help_text=l_("A short name that you will use to log in."))
                     
     email = TextField('email',
-                    label_text=_("Email"),
-                    help_text=_("Your email address (this will be validated)."))
+                    label_text=l_("Email"),
+                    help_text=l_("Your email address (this will be validated)."))
                     
     email2 = TextField('email2',
-                    label_text=_("Email (again)"),
-                    help_text=_("Your email address again, please."))
+                    label_text=l_("Email (again)"),
+                    help_text=l_("Your email address again, please."))
     
     display_name = TextField('display_name',
-                    label_text=_("Display Name"),
-                    help_text=_("A longer user name that others will see."))
+                    label_text=l_("Display Name"),
+                    help_text=l_("A longer user name that others will see."))
                     
     password1 = PasswordField('password1',
-                    label_text=_("Password"),
-                    help_text=_("Your password."))
+                    label_text=l_("Password"),
+                    help_text=l_("Your password."))
                     
     password2 = PasswordField('password2',
-                    label_text= _("Password (again)"),
-                    help_text=_("Same password as above (the two should match)."))
+                    label_text= l_("Password (again)"),
+                    help_text=l_("Same password as above (the two should match)."))
                     
     if not config.reg_config.recaptcha.disabled:
         recaptcha_response_field = ReCaptchaWidget(
-                    label_text= _("reCAPTCHA"),
+                    label_text= l_("reCAPTCHA"),
                     public_key=config.reg_config.recaptcha.public_key,
                     use_ssl=True,
                    )
 class ExistingUserFields(WidgetsList):
     
     user_name = OutputText('user_name',
-                    label_text=_("User Name") )
+                    label_text=l_("User Name") )
                     
     email = TextField('email',
-                    label_text=_("Email"),
-                    help_text=_("Your email address (this will be validated)."))
+                    label_text=l_("Email"),
+                    help_text=l_("Your email address (this will be validated)."))
     
     display_name = TextField('display_name',
-                    label_text=_("Display Name"),
-                    help_text=_("A longer user name that others will see."))
+                    label_text=l_("Display Name"),
+                    help_text=l_("A longer user name that others will see."))
     
     old_password = PasswordField('old_password',
-                   label_text=_("Current password"),
-                   help_text=_("The current (old) password."))
+                   label_text=l_("Current password"),
+                   help_text=l_("The current (old) password."))
 
     password1 = PasswordField('password1',
-                    label_text=_("New Password"),
-                    help_text=_("Your new password. (If you would like to change it)."))
+                    label_text=l_("New Password"),
+                    help_text=l_("Your new password. (If you would like to change it)."))
 
     password2 = PasswordField('password2',
-                    label_text=_("New Password (again)"),
-                    help_text=_("New password again (should match the input above)."))
+                    label_text=l_("New Password (again)"),
+                    help_text=l_("New password again (should match the input above)."))
                     
 class LostPasswordFields(WidgetsList):