# HG changeset patch # User Sverre Rabbelier # Date 1232841394 0 # Node ID 8b5611d5b053e491166140a8ff6486bb4916db92 # Parent b12de918d6606fea3af6c4b45e904df1ea53a5f6 Use ugettext instead of ugettext_lazy Reports from Matthew Wilkes indicate that the regular form of ugettext works just fine. The downside of ugettext_lazy is that it prevents pages containing ugettext_lazy-ed text cannot be memcached, since they cannot be pickled. Patch by: Sverre Rabbelier diff -r b12de918d660 -r 8b5611d5b053 app/soc/logic/helper/notifications.py --- a/app/soc/logic/helper/notifications.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/logic/helper/notifications.py Sat Jan 24 23:56:34 2009 +0000 @@ -29,7 +29,7 @@ from django.template import loader from django.utils.encoding import force_unicode -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext # We cannot import soc.logic.models notification nor user here # due to cyclic imports @@ -41,16 +41,16 @@ import soc.logic.models as model_logic -DEF_NEW_NOTIFICATION_MSG = ugettext_lazy( +DEF_NEW_NOTIFICATION_MSG = ugettext( "You have received a new Notification.") -DEF_INVITATION_MSG_FMT = ugettext_lazy( +DEF_INVITATION_MSG_FMT = ugettext( "Invitation to become a %(role_verbose)s for %(group)s.") -DEF_NEW_CLUB_MSG_FMT = ugettext_lazy( +DEF_NEW_CLUB_MSG_FMT = ugettext( "Your club application for %(name)s has been accepted.") -DEF_WELCOME_MSG_FMT = ugettext_lazy("Welcome to Melange %(name)s,") +DEF_WELCOME_MSG_FMT = ugettext("Welcome to Melange %(name)s,") DEF_GROUP_INVITE_NOTIFICATION_TEMPLATE = 'soc/notification/messages/invitation.html' diff -r b12de918d660 -r 8b5611d5b053 app/soc/logic/models/base.py --- a/app/soc/logic/models/base.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/logic/models/base.py Sat Jan 24 23:56:34 2009 +0000 @@ -29,7 +29,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import dicts from soc.views import out_of_band @@ -258,14 +258,14 @@ if entity: return entity - format_text = ugettext_lazy('"%(key)s" is "%(value)s"') + format_text = ugettext('"%(key)s" is "%(value)s"') msg_pairs = [format_text % {'key': key, 'value': value} for key, value in fields.iteritems()] joined_pairs = ' and '.join(msg_pairs) - msg = ugettext_lazy( + msg = ugettext( 'There is no "%(name)s" where %(pairs)s.') % { 'name': self._name, 'pairs': joined_pairs} diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/group.py --- a/app/soc/models/group.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/group.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.models import countries @@ -38,86 +38,86 @@ #: Required field storing name of the group. name = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Name')) - name.help_text = ugettext_lazy('Complete, formal name of the group.') + verbose_name=ugettext('Name')) + name.help_text = ugettext('Complete, formal name of the group.') #: Required field storing short name of the group. #: It can be used for displaying group as sidebar menu item. short_name = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Short name')) - short_name.help_text = ugettext_lazy('Short name used for sidebar menu') + verbose_name=ugettext('Short name')) + short_name.help_text = ugettext('Short name used for sidebar menu') #: Required many:1 relationship indicating the founding User of the #: Group (this relationship is needed to keep track of lifetime group #: creation limits, used to prevent spamming, etc.). founder = db.ReferenceProperty(reference_class=soc.models.user.User, required=True, collection_name="groups", - verbose_name=ugettext_lazy('Founded by')) + verbose_name=ugettext('Founded by')) #: Required field storing a home page URL of the group. home_page = db.LinkProperty(required=True, - verbose_name=ugettext_lazy('Home Page URL')) + verbose_name=ugettext('Home Page URL')) #: Required email address used as the "public" contact mechanism for #: the Group (as opposed to the founder.account email address which is #: kept secret, revealed only to Developers). email = db.EmailProperty(required=True, - verbose_name=ugettext_lazy('Email')) + verbose_name=ugettext('Email')) #: Required field storing description of the group. description = db.TextProperty(required=True, - verbose_name=ugettext_lazy('Description')) + verbose_name=ugettext('Description')) #: Optional public mailing list. pub_mailing_list = db.StringProperty(required=False, - verbose_name=ugettext_lazy('Public Mailing List')) - pub_mailing_list.help_text = ugettext_lazy( + verbose_name=ugettext('Public Mailing List')) + pub_mailing_list.help_text = ugettext( 'Mailing list email address, URL to sign-up page, etc.') #: Optional public IRC channel. irc_channel = db.StringProperty(required=False, - verbose_name=ugettext_lazy('Public IRC Channel (and Network)')) + verbose_name=ugettext('Public IRC Channel (and Network)')) #: Required field containing a group street address. #: Group street address can only be lower ASCII, not UTF-8 text, #: because, if supplied, it is used as a shipping address. street = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Street address')) - street.help_text = ugettext_lazy( + verbose_name=ugettext('Street address')) + street.help_text = ugettext( 'street number and name, lower ASCII characters only') #: Required field containing group address city. #: City can only be lower ASCII, not UTF-8 text, because, if #: supplied, it is used as a shipping address. city = db.StringProperty(required=True, - verbose_name=ugettext_lazy('City')) - city.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('City')) + city.help_text = ugettext('lower ASCII characters only') #: Optional field containing group address state or province. #: Group state/province can only be lower ASCII, not UTF-8 #: text, because, if supplied, it is used as a shipping address. state = db.StringProperty( - verbose_name=ugettext_lazy('State/Province')) - state.help_text = ugettext_lazy( + verbose_name=ugettext('State/Province')) + state.help_text = ugettext( 'optional if country/territory does not have states or provinces, ' 'lower ASCII characters only') #: Required field containing address country or territory of the group. country = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Country/Territory'), + verbose_name=ugettext('Country/Territory'), choices=countries.COUNTRIES_AND_TERRITORIES) #: Required field containing address postal code of the group (ZIP code in #: the United States). Postal code can only be lower ASCII, not UTF-8 #: text, because, if supplied, it is used as a shipping address. postalcode = db.StringProperty(required=True, - verbose_name=ugettext_lazy('ZIP/Postal Code')) - postalcode.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('ZIP/Postal Code')) + postalcode.help_text = ugettext('lower ASCII characters only') #: Required contact phone number that will be, amongst other uses, #: supplied to shippers along with the shipping address; kept private. phone = db.PhoneNumberProperty(required=True, - verbose_name=ugettext_lazy('Phone Number')) - phone.help_text = ugettext_lazy( + verbose_name=ugettext('Phone Number')) + phone.help_text = ugettext( 'include complete international calling number with country code') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/group_app.py --- a/app/soc/models/group_app.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/group_app.py Sat Jan 24 23:56:34 2009 +0000 @@ -23,7 +23,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.document import soc.models.linkable @@ -42,8 +42,8 @@ #: if the Group Application is accepted. #: See also: soc.models.group.Group.name name = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Group Name')) - name.help_text = ugettext_lazy('Complete, formal name of the group.') + verbose_name=ugettext('Group Name')) + name.help_text = ugettext('Complete, formal name of the group.') #: Required many:1 relationship indicating the User who is applying on #: behalf of the Group. If the Group Application is accepted, this User @@ -51,51 +51,51 @@ #: See also: soc.models.group.Group.founder applicant = db.ReferenceProperty(reference_class=soc.models.user.User, required=True, collection_name='group_apps', - verbose_name=ugettext_lazy('Applicant')) + verbose_name=ugettext('Applicant')) #: Required field indicating the home page URL of the applying Group. #: See also: soc.models.group.Group.home_page home_page = db.LinkProperty(required=True, - verbose_name=ugettext_lazy('Home Page URL')) + verbose_name=ugettext('Home Page URL')) #: Required email address used as the "public" contact mechanism for #: the Group (as opposed to the applicant.account email address which is #: kept secret, revealed only to Developers). #: See also: soc.models.group.Group.email email = db.EmailProperty(required=True, - verbose_name=ugettext_lazy('Public Email')) + verbose_name=ugettext('Public Email')) #: Required description of the Group. description = db.TextProperty(required=True, - verbose_name=ugettext_lazy('Description')) + verbose_name=ugettext('Description')) why_applying = db.TextProperty(required=True, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'Why is your group applying to participate?' ' What do you hope to gain by participating?')) pub_mailing_list = db.StringProperty(required=False, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'What is the main public mailing list for your group?')) - pub_mailing_list.help_text = ugettext_lazy( + pub_mailing_list.help_text = ugettext( 'Mailing list email address, URL to sign-up page, etc.') irc_channel = db.StringProperty(required=False, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'Where is the main IRC channel for your group?')) - irc_channel.help_text = ugettext_lazy('IRC network and channel.') + irc_channel.help_text = ugettext('IRC network and channel.') backup_admin = db.ReferenceProperty(reference_class=soc.models.user.User, required=True, collection_name='group_app_backup_admin', - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'Please select your backup group administrator.')) backup_admin.redirect_url = soc.models.user.User.URL_NAME member_criteria = db.TextProperty(required=True, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'What criteria do you use to select the members of your group?' ' Please be as specific as possible.')) - member_criteria.help_text = ugettext_lazy( + member_criteria.help_text = ugettext( 'Members include mentors, admininstrators, and the like.') # property containing the status of the application @@ -103,14 +103,14 @@ status = db.StringProperty(required=True, choices=['accepted','rejected','ignored','needs review','completed'], default='needs review', - verbose_name=ugettext_lazy('Application Status')) + verbose_name=ugettext('Application Status')) # timestamp to record the time on which this application has been created created_on = db.DateTimeProperty(required=True, auto_now_add=True, - verbose_name=ugettext_lazy('Created on')) + verbose_name=ugettext('Created on')) # timestamp to record the time on which this application has been last modified # also changes when the review properties change last_modified_on = db.DateTimeProperty(required=True, auto_now=True, - verbose_name=ugettext_lazy('Last modified on')) + verbose_name=ugettext('Last modified on')) diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/linkable.py --- a/app/soc/models/linkable.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/linkable.py Sat Jan 24 23:56:34 2009 +0000 @@ -25,7 +25,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.models import base @@ -112,8 +112,8 @@ #: digits and underscores only. Valid link IDs successfully match #: the LINK_ID_REGEX. link_id = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Link ID')) - link_id.help_text = ugettext_lazy( + verbose_name=ugettext('Link ID')) + link_id.help_text = ugettext( 'Link ID is used as part of various URL links throughout the site.' ' Lower ASCII characters, digits, and underscores only.') @@ -121,8 +121,8 @@ #: the "scope" of this Linkable entity. The back-reference in the Linkable #: model is a Query named 'links'. scope = db.SelfReferenceProperty(required=False, - collection_name='links', verbose_name=ugettext_lazy('Link Scope')) - scope.help_text = ugettext_lazy( + collection_name='links', verbose_name=ugettext('Link Scope')) + scope.help_text = ugettext( 'Reference to another Linkable entity that defines the "scope" of' ' this Linkable entity.') @@ -134,7 +134,7 @@ #: maybe re-parenting operations), so this property is not likely to need #: updating. scope_path = db.StringProperty(required=False, - verbose_name=ugettext_lazy('Scope path')) - scope_path.help_text = ugettext_lazy( + verbose_name=ugettext('Scope path')) + scope_path.help_text = ugettext( 'Cache of the string form of the entity scope.') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/notification.py --- a/app/soc/models/notification.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/notification.py Sat Jan 24 23:56:34 2009 +0000 @@ -23,7 +23,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.linkable import soc.models.user @@ -38,19 +38,19 @@ from_user = db.ReferenceProperty(reference_class=soc.models.user.User, required=False, collection_name="sent_notifications", - verbose_name=ugettext_lazy('From')) + verbose_name=ugettext('From')) subject = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Subject')) + verbose_name=ugettext('Subject')) #: the message that is contained within this Notification message = db.TextProperty(required=True, - verbose_name=ugettext_lazy('Message')) + verbose_name=ugettext('Message')) #: date and time on which this Notification was created created_on = db.DateTimeProperty(auto_now_add=True, - verbose_name=ugettext_lazy('Created On')) + verbose_name=ugettext('Created On')) #: boolean property that marks if the notification is unread unread = db.BooleanProperty(default=True, - verbose_name=ugettext_lazy('Unread')) + verbose_name=ugettext('Unread')) diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/org_app.py --- a/app/soc/models/org_app.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/org_app.py Sat Jan 24 23:56:34 2009 +0000 @@ -23,7 +23,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.document import soc.models.group_app @@ -41,35 +41,35 @@ """ prior_participation = db.TextProperty(required=False, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'Has your group participated previously?' ' If so, please summarize your involvement and any past successes' ' and failures.')) prior_application = db.TextProperty(required=False, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'If your group has not previously participated, have you applied in' ' the past? If so, for what sort of participation?')) license_name = db.StringProperty(required=True, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'What license does your organization use?')) ideas = db.ReferenceProperty(reference_class=soc.models.document.Document, required=True, collection_name='ideas_app', - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'Please select the Document containing your ideas list.')) dev_mailing_list = db.StringProperty(required=False, - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'What is the main development mailing list for your group?' ' (optional)')) - dev_mailing_list.help_text = ugettext_lazy( + dev_mailing_list.help_text = ugettext( 'Mailing list email address, URL to sign-up page, etc.') backup_admin = db.ReferenceProperty(reference_class=soc.models.user.User, required=False, collection_name='backup_admin_app', - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'Please select your backup group administrator (if there is one).' ' They will be emailed to confirm, and this group will not be ' ' accepted until they respond. (optional).')) @@ -78,35 +78,35 @@ contrib_template = db.ReferenceProperty( reference_class=soc.models.document.Document, required=False, collection_name='org_app_contrib_template', - verbose_name=ugettext_lazy( + verbose_name=ugettext( 'Please select the application template you would like contributors' ' to your group to use. (optional).')) - contrib_template.help_text = ugettext_lazy( + contrib_template.help_text = ugettext( 'This template will be presented to contributors, such as students' ' and other non-member participants, when they apply to contribute' ' to the organization.') contrib_template.redirect_url = soc.models.document.Document.URL_NAME contrib_disappears = db.TextProperty(required=True, - verbose_text=ugettext_lazy( + verbose_text=ugettext( 'What is your plan for dealing with disappearing contributors?')) - contrib_disappears.help_text = ugettext_lazy( + contrib_disappears.help_text = ugettext( 'Contributors include students and other non-member participants.') member_disappears = db.TextProperty(required=True, - verbose_text=ugettext_lazy( + verbose_text=ugettext( 'What is your plan for dealing with disappearing members?')) - member_disappears = ugettext_lazy( + member_disappears = ugettext( 'Members include mentors, admininstrators, and the like.') encourage_contribs = db.TextProperty(required=True, - verbose_text=ugettext_lazy( + verbose_text=ugettext( 'What steps will you take to encourage contributors to interact with' ' your community before, during, and after the program?')) encourage_contribs.help_text = contrib_disappears.help_text continued_contribs = db.TextProperty(required=True, - verbose_text=ugettext_lazy( + verbose_text=ugettext( 'What will you do to ensure that your accepted contributors stick' ' with the project after the program concludes?')) continued_contribs.help_text = contrib_disappears.help_text diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/organization.py --- a/app/soc/models/organization.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/organization.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.group @@ -43,15 +43,15 @@ #: Optional development mailing list. dev_mailing_list = db.StringProperty(required=False, - verbose_name=ugettext_lazy('Development Mailing List')) - dev_mailing_list.help_text = ugettext_lazy( + verbose_name=ugettext('Development Mailing List')) + dev_mailing_list.help_text = ugettext( 'Mailing list email address, URL to sign-up page, etc.') member_template = db.ReferenceProperty( reference_class=soc.models.document.Document, required=False, collection_name='org_app_member_template', - verbose_name=ugettext_lazy('Application template')) - member_template.help_text = ugettext_lazy( + verbose_name=ugettext('Application template')) + member_template.help_text = ugettext( 'This template will be presented to potential members when they' ' apply to the organization.') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/presence.py --- a/app/soc/models/presence.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/presence.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.document import soc.models.linkable @@ -47,22 +47,22 @@ home = db.ReferenceProperty( reference_class=soc.models.document.Document, collection_name='home') - home.help_text = ugettext_lazy( + home.help_text = ugettext( 'Document to be used as the "/home" page static contents.') home.redirect_url = soc.models.document.Document.URL_NAME #: Valid ATOM or RSS feed url or None if unused. Feed entries are shown #: on the site page using Google's JavaScript blog widget - feed_url = db.LinkProperty(verbose_name=ugettext_lazy('Feed URL')) - feed_url.help_text = ugettext_lazy( + feed_url = db.LinkProperty(verbose_name=ugettext('Feed URL')) + feed_url.help_text = ugettext( 'The URL should be a valid ATOM or RSS feed. ' 'Feed entries are shown on the home page.') #: Reference to Document containing optional Terms of Service tos = db.ReferenceProperty( reference_class=soc.models.document.Document, - verbose_name=ugettext_lazy('Terms of Service'), + verbose_name=ugettext('Terms of Service'), collection_name='tos') - tos.help_text = ugettext_lazy( + tos.help_text = ugettext( 'Document containing optional Terms of Service for participating.') tos.redirect_url = soc.models.document.Document.URL_NAME diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/program.py --- a/app/soc/models/program.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/program.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.presence import soc.models.timeline @@ -36,32 +36,32 @@ #: Required field storing name of the group. name = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Name')) - name.help_text = ugettext_lazy('Complete, formal name of the program.') - name.example_text = ugettext_lazy( + verbose_name=ugettext('Name')) + name.help_text = ugettext('Complete, formal name of the program.') + name.example_text = ugettext( 'e.g. Google Summer of Code 2009') #: Required field storing short name of the group. #: It can be used for displaying group as sidebar menu item. short_name = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Short name')) - short_name.help_text = ugettext_lazy('Short name used for sidebar menu') - short_name.example_text = ugettext_lazy( + verbose_name=ugettext('Short name')) + short_name.help_text = ugettext('Short name used for sidebar menu') + short_name.example_text = ugettext( 'e.g. GSoC 2009') #: Optional field used to relate it to other programs #: For example, GSoC would be a group label for GSoC2008/GSoC2009 group_label = db.StringProperty( - verbose_name=ugettext_lazy('Group label')) - group_label.help_text = ugettext_lazy( + verbose_name=ugettext('Group label')) + group_label.help_text = ugettext( 'Optional name used to relate this program to others.') - group_label.example_text = ugettext_lazy( + group_label.example_text = ugettext( 'e.g. GSoC') #: Required field storing description of the group. description = db.TextProperty(required=True, - verbose_name=ugettext_lazy('Description')) - description.example_text = ugettext_lazy( + verbose_name=ugettext('Description')) + description.example_text = ugettext( 'for example:
' 'GSoC 2009 is the Google Summer of Code,' ' but in 2009!

' @@ -69,8 +69,8 @@ #: Required field storing application/tasks limit of the program. apps_tasks_limit = db.IntegerProperty(required=True, - verbose_name=ugettext_lazy('Application/Tasks Limit')) - apps_tasks_limit.example_text = ugettext_lazy( + verbose_name=ugettext('Application/Tasks Limit')) + apps_tasks_limit.example_text = ugettext( 'e.g. ' '20 is the student applications limit for Google Summer ' 'of Code, but 1 is the tasks limit that the student can work ' @@ -78,8 +78,8 @@ #: Required field storing slots limit of the program. slots = db.IntegerProperty(required=True, - verbose_name=ugettext_lazy('Slots')) - slots.example_text = ugettext_lazy( + verbose_name=ugettext('Slots')) + slots.example_text = ugettext( 'e.g. ' '500 might be an amount of slots for Google Summer ' 'of Code, which indicates how many students can be accepted ' @@ -89,8 +89,8 @@ #: Required field storing the type of workflow this program has workflow = db.StringProperty(required=True, choices=['gsoc', 'ghop'], - verbose_name= ugettext_lazy('Workflow type')) - workflow.example_text = ugettext_lazy( + verbose_name= ugettext('Workflow type')) + workflow.example_text = ugettext( 'Project-based for GSoC workflow type,
' 'Task-based for GHOP workflow type.
') @@ -98,4 +98,4 @@ #: belongs to. timeline = db.ReferenceProperty(reference_class=soc.models.timeline.Timeline, required=True, collection_name="program", - verbose_name=ugettext_lazy('Timeline')) + verbose_name=ugettext('Timeline')) diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/proposal.py --- a/app/soc/models/proposal.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/proposal.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.work import soc.models.quiz @@ -55,7 +55,7 @@ #: optional, indexed plain text field used for different purposes, #: depending on the specific type of the work abstract = db.StringProperty(multiline=True) - abstract.help_text = ugettext_lazy( + abstract.help_text = ugettext( 'short abstract, summary, or snippet;' ' 500 characters or less, plain text displayed publicly') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/request.py --- a/app/soc/models/request.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/request.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.user import soc.models.group @@ -35,11 +35,11 @@ """ role = db.StringProperty(required=True) - role.help_text = ugettext_lazy( + role.help_text = ugettext( 'This should be the type of the role that is requested') role_verbose = db.StringProperty(required=True) - role_verbose.help_text = ugettext_lazy( + role_verbose.help_text = ugettext( 'This should be the verbose name of the role that is in this request') # property that determines the state of the request @@ -52,6 +52,6 @@ # the user access to create the role state = db.StringProperty(required=True, default='new', choices=['new', 'group_accepted', 'completed', 'rejected','ignored']) - state.help_text = ugettext_lazy('Shows the state of the request') + state.help_text = ugettext('Shows the state of the request') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/role.py --- a/app/soc/models/role.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/role.py Sat Jan 24 23:56:34 2009 +0000 @@ -25,7 +25,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.models import countries @@ -85,8 +85,8 @@ #: given_name can only be lower ASCII, not UTF-8 text, because it is #: used, for example, as part of the shipping (mailing) address. given_name = db.StringProperty(required=True, - verbose_name=ugettext_lazy('First (given) name')) - given_name.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('First (given) name')) + given_name.help_text = ugettext('lower ASCII characters only') #: Required field storing the parts of the Role's name #: corresponding to the field names; displayed publicly. @@ -94,8 +94,8 @@ #: used, for example, as part of the shipping (mailing) address. surname = db.StringProperty( required=True, - verbose_name=ugettext_lazy('Last (family) name')) - surname.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('Last (family) name')) + surname.help_text = ugettext('lower ASCII characters only') #: Optional field used as a display name, such as for awards #: certificates. Should be the entire display name in the format @@ -103,8 +103,8 @@ #: given name in some cultures, for example). Display names can be #: any valid UTF-8 text. display_name = db.StringProperty( - verbose_name=ugettext_lazy('Display Name')) - display_name.help_text = ugettext_lazy( + verbose_name=ugettext('Display Name')) + display_name.help_text = ugettext( 'Optional field used as a display name, such as for awards ' 'certificates. Should be the entire display name in the format ' 'the person would like it displayed (could be family name followed ' @@ -120,47 +120,47 @@ #: kept secret). email = db.EmailProperty( required=True, - verbose_name=ugettext_lazy('Email Address')) + verbose_name=ugettext('Email Address')) #: Optional field storing Instant Messaging network; displayed publicly. im_network = db.StringProperty( - verbose_name=ugettext_lazy('IM Network')) - im_network.help_text = ugettext_lazy( + verbose_name=ugettext('IM Network')) + im_network.help_text = ugettext( 'examples: irc:irc.freenode.org xmpp:gmail.com/Home') #: Optional field storing Instant Messaging handle; displayed publicly. im_handle = db.StringProperty( - verbose_name=ugettext_lazy('IM Handle')) - im_handle.help_text = ugettext_lazy( + verbose_name=ugettext('IM Handle')) + im_handle.help_text = ugettext( 'personal identifier, such as: screen name, IRC nick, user name') #: Optional field storing a home page URL; displayed publicly. home_page = db.LinkProperty( - verbose_name=ugettext_lazy('Home Page URL')) + verbose_name=ugettext('Home Page URL')) #: Optional field storing a blog URL; displayed publicly. blog = db.LinkProperty( - verbose_name=ugettext_lazy('Blog URL')) + verbose_name=ugettext('Blog URL')) #: Optional field storing a URL to an image, expected to be a #: personal photo (or cartoon avatar, perhaps); displayed publicly. photo_url = db.LinkProperty( - verbose_name=ugettext_lazy('Thumbnail Photo URL')) - photo_url.help_text = ugettext_lazy( + verbose_name=ugettext('Thumbnail Photo URL')) + photo_url.help_text = ugettext( 'URL of 64x64 pixel thumbnail image') #: Optional field storing the latitude provided by the Role; displayed #: publicly. latitude = db.FloatProperty( - verbose_name=ugettext_lazy('Latitude')) - latitude.help_text = ugettext_lazy( + verbose_name=ugettext('Latitude')) + latitude.help_text = ugettext( 'decimal degrees northerly (N), use minus sign (-) for southerly (S)') #: Optional field storing the longitude provided by the Role; displayed #: publicly. longitude = db.FloatProperty( - verbose_name=ugettext_lazy('Longitude')) - longitude.help_text = ugettext_lazy( + verbose_name=ugettext('Longitude')) + longitude.help_text = ugettext( 'decimal degrees easterly (E), use minus sign (-) for westerly (W)') #==================================================================== @@ -171,38 +171,38 @@ #: Residence street address can only be lower ASCII, not UTF-8 text, because #: it may be used as a shipping address. res_street = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Street address')) - res_street.help_text = ugettext_lazy( + verbose_name=ugettext('Street address')) + res_street.help_text = ugettext( 'street number and name, lower ASCII characters only') #: Required field containing residence address city; kept private. #: Residence city can only be lower ASCII, not UTF-8 text, because it #: may be used as a shipping address. res_city = db.StringProperty(required=True, - verbose_name=ugettext_lazy('City')) - res_city.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('City')) + res_city.help_text = ugettext('lower ASCII characters only') #: Optional field containing residence address state or province; kept #: private. Residence state/province can only be lower ASCII, not UTF-8 #: text, because it may be used as a shipping address. res_state = db.StringProperty( - verbose_name=ugettext_lazy('State/Province')) - res_state.help_text = ugettext_lazy( + verbose_name=ugettext('State/Province')) + res_state.help_text = ugettext( 'optional if country/territory does not have states or provinces, ' 'lower ASCII characters only') #: Required field containing residence address country or territory; kept #: private. res_country = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Country/Territory'), + verbose_name=ugettext('Country/Territory'), choices=countries.COUNTRIES_AND_TERRITORIES) #: Required field containing residence address postal code (ZIP code in #: the United States); kept private. Residence postal code can only be #: lower ASCII, not UTF-8 text, because it may be used as a shipping address. res_postalcode = db.StringProperty(required=True, - verbose_name=ugettext_lazy('ZIP/Postal Code')) - res_postalcode.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('ZIP/Postal Code')) + res_postalcode.help_text = ugettext('lower ASCII characters only') #: Optional field containing a separate shipping street address; kept #: private. If shipping address is not present in its entirety, the @@ -210,30 +210,30 @@ #: be lower ASCII, not UTF-8 text, because, if supplied, it is used as a #: shipping address. ship_street = db.StringProperty( - verbose_name=ugettext_lazy('Shipping Street address')) - ship_street.help_text = ugettext_lazy( + verbose_name=ugettext('Shipping Street address')) + ship_street.help_text = ugettext( 'street number and name, lower ASCII characters only') #: Optional field containing shipping address city; kept private. #: Shipping city can only be lower ASCII, not UTF-8 text, because, if #: supplied, it is used as a shipping address. ship_city = db.StringProperty( - verbose_name=ugettext_lazy('Shipping City')) - ship_city.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('Shipping City')) + ship_city.help_text = ugettext('lower ASCII characters only') #: Optional field containing shipping address state or province; kept #: private. Shipping state/province can only be lower ASCII, not UTF-8 #: text, because, if supplied, it is used as a shipping address. ship_state = db.StringProperty( - verbose_name=ugettext_lazy('Shipping State/Province')) - ship_state.help_text = ugettext_lazy( + verbose_name=ugettext('Shipping State/Province')) + ship_state.help_text = ugettext( 'optional if country/territory does not have states or provinces, ' 'lower ASCII characters only') #: Optional field containing shipping address country or territory; kept #: private. ship_country = db.StringProperty( - verbose_name=ugettext_lazy('Shipping Country/Territory'), + verbose_name=ugettext('Shipping Country/Territory'), choices=countries.COUNTRIES_AND_TERRITORIES) #: Optional field containing shipping address postal code (ZIP code in @@ -241,15 +241,15 @@ #: lower ASCII, not UTF-8 text, because, if supplied, it is used as a #: shipping address. ship_postalcode = db.StringProperty( - verbose_name=ugettext_lazy('Shipping ZIP/Postal Code')) - ship_postalcode.help_text = ugettext_lazy('lower ASCII characters only') + verbose_name=ugettext('Shipping ZIP/Postal Code')) + ship_postalcode.help_text = ugettext('lower ASCII characters only') #: Required field containing a phone number that will be supplied #: to shippers; kept private. phone = db.PhoneNumberProperty( required=True, - verbose_name=ugettext_lazy('Phone Number')) - phone.help_text = ugettext_lazy( + verbose_name=ugettext('Phone Number')) + phone.help_text = ugettext( 'include complete international calling number with country code') #==================================================================== @@ -260,27 +260,27 @@ #: determining Program participation eligibility); kept private. birth_date = db.DateProperty( required=True, - verbose_name=ugettext_lazy('Birth Date')) - birth_date.help_text = ugettext_lazy( + verbose_name=ugettext('Birth Date')) + birth_date.help_text = ugettext( 'required for determining program eligibility') #: Optional field indicating choice of t-shirt, from XXS to XXXL; #: kept private. tshirt_size = db.StringProperty( - verbose_name=ugettext_lazy('T-shirt Size'), + verbose_name=ugettext('T-shirt Size'), choices=('XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL')) #: Optional field indicating choice of t-shirt fit; kept private. tshirt_style = db.StringProperty( - verbose_name=ugettext_lazy('T-shirt Style'), + verbose_name=ugettext('T-shirt Style'), choices=('male', 'female')) #: field storing whether User has agreed to the Role-specific Terms of #: Service. (Not a required field because some Roles may not have special #: Terms of Service.) agrees_to_tos = db.BooleanProperty( - verbose_name=ugettext_lazy('Agrees to ToS')) - agrees_to_tos.help_text = ugettext_lazy( + verbose_name=ugettext('Agrees to ToS')) + agrees_to_tos.help_text = ugettext( 'Indicates that the user agrees to the Terms of Service for this Role.') #: field storing the state of this role @@ -292,8 +292,8 @@ #: the student applications. state = db.StringProperty(default='active', choices=['active','invalid','inactive'], - verbose_name=ugettext_lazy('State of this Role')) - state.help_text = ugettext_lazy( + verbose_name=ugettext('State of this Role')) + state.help_text = ugettext( 'Indicates the state of the role concerning which privileges may be used') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/site.py --- a/app/soc/models/site.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/site.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.presence @@ -41,14 +41,14 @@ #: is going to have Google Analytics JS initialization code in #: the footer with the given tracking number. ga_tracking_num = db.StringProperty( - verbose_name=ugettext_lazy('Google Analytics')) - ga_tracking_num.help_text = ugettext_lazy( + verbose_name=ugettext('Google Analytics')) + ga_tracking_num.help_text = ugettext( 'Valid Google Analytics tracking number. If the number is ' 'entered every page is going to have Google Analytics ' 'initialization code in footer.') #: Valid Google Maps API Key. Used to embed Google Maps. - gmaps_api_key = db.StringProperty(verbose_name=ugettext_lazy('Google Maps')) - gmaps_api_key.help_text = ugettext_lazy( + gmaps_api_key = db.StringProperty(verbose_name=ugettext('Google Maps')) + gmaps_api_key.help_text = ugettext( 'Valid Google Maps API Key. This key is used for ' 'embedding Google Maps into the website.') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/timeline.py --- a/app/soc/models/timeline.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/timeline.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.models import base @@ -34,22 +34,22 @@ """ scope_path = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Scope Path')) + verbose_name=ugettext('Scope Path')) program_start = db.DateTimeProperty( - verbose_name=ugettext_lazy('Program Start date')) + verbose_name=ugettext('Program Start date')) program_end = db.DateTimeProperty( - verbose_name=ugettext_lazy('Program End date')) + verbose_name=ugettext('Program End date')) org_signup_start = db.DateTimeProperty( - verbose_name=ugettext_lazy('Organization Signup Start date')) + verbose_name=ugettext('Organization Signup Start date')) org_signup_end = db.DateTimeProperty( - verbose_name=ugettext_lazy('Organization Signup End date')) + verbose_name=ugettext('Organization Signup End date')) student_signup_start = db.DateTimeProperty( - verbose_name=ugettext_lazy('Student Signup Start date')) + verbose_name=ugettext('Student Signup Start date')) student_signup_end = db.DateTimeProperty( - verbose_name=ugettext_lazy('Student Signup End date')) + verbose_name=ugettext('Student Signup End date')) diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/user.py --- a/app/soc/models/user.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/user.py Sat Jan 24 23:56:34 2009 +0000 @@ -26,7 +26,7 @@ from google.appengine.api import users from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.linkable @@ -68,8 +68,8 @@ #: Melange web applications and is not made visible to other users #: of any Melange application. account = db.UserProperty(required=True, - verbose_name=ugettext_lazy('User account')) - account.help_text = ugettext_lazy( + verbose_name=ugettext('User account')) + account.help_text = ugettext( 'A valid Google Account.') #: A list (possibly empty) of former Google Accounts associated with @@ -80,22 +80,22 @@ #: (though this is not recommended), or a nick name or some other public #: alias. Public names can be any valid UTF-8 text. name = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Public name')) - name.help_text = ugettext_lazy( + verbose_name=ugettext('Public name')) + name.help_text = ugettext( 'Human-readable name (UTF-8) that will be displayed publicly on the' ' site.') #: field storing whether User is a Developer with site-wide access. is_developer = db.BooleanProperty( - verbose_name=ugettext_lazy('Is Developer')) - is_developer.help_text = ugettext_lazy( + verbose_name=ugettext('Is Developer')) + is_developer.help_text = ugettext( 'Field used to indicate user with site-wide Developer access.') #: field storing whether User has agreed to the site-wide Terms of Service. #: (Not a required field because the Terms of Service might not be present #: when the first User profile is created when bootstrapping the site.) agrees_to_tos = db.BooleanProperty( - verbose_name=ugettext_lazy('Agrees to ToS')) - agrees_to_tos.help_text = ugettext_lazy( + verbose_name=ugettext('Agrees to ToS')) + agrees_to_tos.help_text = ugettext( 'Indicates that the user agrees to the site-wide Terms of Service.') diff -r b12de918d660 -r 8b5611d5b053 app/soc/models/work.py --- a/app/soc/models/work.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/models/work.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from google.appengine.ext import db -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext import soc.models.linkable import soc.models.user @@ -47,26 +47,26 @@ author = db.ReferenceProperty(reference_class=soc.models.user.User, required=True, collection_name="created_documents", - verbose_name=ugettext_lazy('Created by')) + verbose_name=ugettext('Created by')) #: Required field indicating the "title" of the work, which may have #: different uses depending on the specific type of the work. Works #: can be indexed, filtered, and sorted by 'title'. title = db.StringProperty(required=True, - verbose_name=ugettext_lazy('Title')) - title.help_text = ugettext_lazy( + verbose_name=ugettext('Title')) + title.help_text = ugettext( 'title of the document; often used in the window title') #: short name used in places such as the sidebar menu and breadcrumb trail #: (optional: title will be used if short_name is not present) - short_name = db.StringProperty(verbose_name=ugettext_lazy('Short name')) - short_name.help_text = ugettext_lazy( + short_name = db.StringProperty(verbose_name=ugettext('Short name')) + short_name.help_text = ugettext( 'short name used, for example, in the sidebar menu') #: Required db.TextProperty containing the contents of the Work. #: The content is only to be displayed to Persons in Roles eligible to #: view them (which may be anyone, for example, with the site front page). - content = db.TextProperty(verbose_name=ugettext_lazy('Content')) + content = db.TextProperty(verbose_name=ugettext('Content')) #: date when the work was created created = db.DateTimeProperty(auto_now_add=True) @@ -78,7 +78,7 @@ modified_by = db.ReferenceProperty(reference_class=soc.models.user.User, required=True, collection_name="modified_documents", - verbose_name=ugettext_lazy('Modified by')) + verbose_name=ugettext('Modified by')) # TODO: some sort of access control preferences are needed at this basic # level. Works need to be restrict-able to: @@ -94,8 +94,8 @@ #: the sidebar menu (and possibly elsewhere); FAQs, Terms of Service, #: and the like are examples of "featured" Works is_featured = db.BooleanProperty( - verbose_name=ugettext_lazy('Is Featured')) - is_featured.help_text = ugettext_lazy( + verbose_name=ugettext('Is Featured')) + is_featured.help_text = ugettext( 'Field used to indicate if a Work should be featured, for example,' ' in the sidebar menu.') diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/helper/access.py --- a/app/soc/views/helper/access.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/helper/access.py Sat Jan 24 23:56:34 2009 +0000 @@ -34,7 +34,7 @@ from google.appengine.api import users from django.core import urlresolvers -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import accounts from soc.logic import dicts @@ -49,24 +49,24 @@ from soc.views.helper import redirects -DEF_NO_USER_LOGIN_MSG_FMT = ugettext_lazy( +DEF_NO_USER_LOGIN_MSG_FMT = ugettext( 'Please create User Profile' ' in order to view this page.') -DEF_AGREE_TO_TOS_MSG_FMT = ugettext_lazy( +DEF_AGREE_TO_TOS_MSG_FMT = ugettext( 'You must agree to the site-wide Terms of' ' Service in your User Profile' ' in order to view this page.') -DEF_DEV_LOGOUT_LOGIN_MSG_FMT = ugettext_lazy( +DEF_DEV_LOGOUT_LOGIN_MSG_FMT = ugettext( 'Please sign out' ' and sign in' ' again as %(role)s to view this page.') -DEF_PAGE_DENIED_MSG = ugettext_lazy( +DEF_PAGE_DENIED_MSG = ugettext( 'Access to this page has been restricted') -DEF_LOGOUT_MSG_FMT = ugettext_lazy( +DEF_LOGOUT_MSG_FMT = ugettext( 'Please sign out in order to view this page') diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/helper/forms.py --- a/app/soc/views/helper/forms.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/helper/forms.py Sat Jan 24 23:56:34 2009 +0000 @@ -46,7 +46,7 @@ This class detects the presence of a help_text attribute and adds it to the corresponding form field object. - ugettext_lazy() proxies used for internationalization in the Model will + ugettext() proxies used for internationalization in the Model will still work correctly with this new behavior, as long as the original strings are used as the translation keys. """ diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/helper/params.py --- a/app/soc/views/helper/params.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/helper/params.py Sat Jan 24 23:56:34 2009 +0000 @@ -23,7 +23,7 @@ from django import forms -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import cleaning from soc.logic import dicts @@ -34,10 +34,10 @@ from soc.views.helper import redirects -DEF_LIST_DESCRIPTION_FMT = ugettext_lazy( +DEF_LIST_DESCRIPTION_FMT = ugettext( 'List of %(name_plural)s in Google Open Source Programs.') -DEF_CREATE_INSTRUCTION_MSG_FMT = ugettext_lazy( +DEF_CREATE_INSTRUCTION_MSG_FMT = ugettext( 'Please use this form to select a %(name).') DEF_SUBMIT_MSG_PARAM_NAME = 's' @@ -172,7 +172,7 @@ } new_params['list_description'] = DEF_LIST_DESCRIPTION_FMT % params - new_params['save_message'] = [ugettext_lazy('Profile saved.')] + new_params['save_message'] = [ugettext('Profile saved.')] new_params['submit_msg_param_name'] = DEF_SUBMIT_MSG_PARAM_NAME new_params['edit_params'] = { DEF_SUBMIT_MSG_PARAM_NAME: DEF_SUBMIT_MSG_PROFILE_SAVED, diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/models/base.py --- a/app/soc/views/models/base.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/models/base.py Sat Jan 24 23:56:34 2009 +0000 @@ -25,7 +25,7 @@ from django import http -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import dicts from soc.views import helper @@ -51,12 +51,12 @@ self._logic: the logic singleton for this entity """ - DEF_CREATE_NEW_ENTITY_MSG_FMT = ugettext_lazy( + DEF_CREATE_NEW_ENTITY_MSG_FMT = ugettext( ' You can create a new %(entity_type)s by visiting' ' Create ' 'a New %(entity_type)s page.') - DEF_CREATE_INSTRUCTION_MSG_FMT = ugettext_lazy( + DEF_CREATE_INSTRUCTION_MSG_FMT = ugettext( 'Please select a %s for the new %s.') def __init__(self, params=None): diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/models/club_app.py --- a/app/soc/views/models/club_app.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/models/club_app.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from django import forms -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import accounts from soc.logic import cleaning @@ -132,10 +132,10 @@ pa_params = params.copy() # pending applications if is_developer: - pa_params['list_description'] = ugettext_lazy( + pa_params['list_description'] = ugettext( "An overview of all pending club applications.") else: - pa_params['list_description'] = ugettext_lazy( + pa_params['list_description'] = ugettext( "An overview of your pending club applications.") pa_list = list_helper.getListContent( @@ -149,10 +149,10 @@ aa_params = params.copy() # accepted applications if is_developer: - aa_params['list_description'] = ugettext_lazy( + aa_params['list_description'] = ugettext( "An overview of all accepted club applications.") else: - aa_params['list_description'] = ugettext_lazy( + aa_params['list_description'] = ugettext( "An overview of your accepted club applications.") aa_params['url_name'] = 'club' @@ -169,10 +169,10 @@ da_params = params.copy() # denied applications if is_developer: - da_params['list_description'] = ugettext_lazy( + da_params['list_description'] = ugettext( "An overview of all denied club applications.") else: - da_params['list_description'] = ugettext_lazy( + da_params['list_description'] = ugettext( "An overview of your denied club applications.") da_list = list_helper.getListContent( @@ -186,7 +186,7 @@ ia_params = params.copy() # ignored applications - ia_params['list_description'] = ugettext_lazy( + ia_params['list_description'] = ugettext( "An overview of all ignored club applications.") ia_list = list_helper.getListContent( @@ -289,7 +289,7 @@ filter = {'status' : 'needs review'} ur_params = params.copy() - ur_params['list_description'] = ugettext_lazy('A list of all unhandled ' + ur_params['list_description'] = ugettext('A list of all unhandled ' 'applications.') ur_params ['list_action'] = (redirects.getReviewRedirect, params) @@ -300,7 +300,7 @@ filter['status'] = 'accepted' uh_params = params.copy() - uh_params['list_description'] = ugettext_lazy('A list of all applications ' + uh_params['list_description'] = ugettext('A list of all applications ' 'that have been accepted but not turned into a Club yet') uh_params ['list_action'] = (redirects.getReviewRedirect, params) @@ -311,7 +311,7 @@ filter ['status'] = 'rejected' den_params = params.copy() - den_params['list_description'] = ugettext_lazy('A list of all applications ' + den_params['list_description'] = ugettext('A list of all applications ' 'that have been rejected') den_params ['list_action'] = (redirects.getReviewRedirect, params) @@ -322,7 +322,7 @@ filter ['status'] = 'ignored' ign_params = params.copy() - ign_params['list_description'] = ugettext_lazy('A list of all applications ' + ign_params['list_description'] = ugettext('A list of all applications ' 'that have been ignored') ign_params ['list_action'] = (redirects.getReviewRedirect, params) diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/models/notification.py --- a/app/soc/views/models/notification.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/models/notification.py Sat Jan 24 23:56:34 2009 +0000 @@ -25,7 +25,7 @@ import time from django import forms -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import cleaning from soc.logic import dicts @@ -129,7 +129,7 @@ # define the list redirect action to show the notification un_params['list_action'] = (redirects.getPublicRedirect, params) - un_params['list_description'] = ugettext_lazy( + un_params['list_description'] = ugettext( "An overview of your unread Notifications.") # TODO(Lennard) when list sorting is implemented sort on descending date @@ -144,7 +144,7 @@ rn_params = params.copy() # read notifications rn_params['list_action'] = (redirects.getPublicRedirect, params) - rn_params['list_description'] = ugettext_lazy( + rn_params['list_description'] = ugettext( "An overview of your read Notifications.") rn_list = list_helper.getListContent( diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/models/presence.py --- a/app/soc/views/models/presence.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/models/presence.py Sat Jan 24 23:56:34 2009 +0000 @@ -25,7 +25,7 @@ from google.appengine.ext import db from django import forms -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import cleaning from soc.logic import dicts @@ -68,11 +68,11 @@ new_params['create_extra_dynafields'] = { # override some editors 'home_link_id': forms.CharField(required=False, - label=ugettext_lazy('Home page Document link ID'), + label=ugettext('Home page Document link ID'), help_text=soc.models.work.Work.link_id.help_text), 'tos_link_id': forms.CharField(required=False, - label=ugettext_lazy('Terms of Service Document link ID'), + label=ugettext('Terms of Service Document link ID'), help_text=soc.models.work.Work.link_id.help_text), # add cleaning of the link id and feed url diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/models/request.py --- a/app/soc/views/models/request.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/models/request.py Sat Jan 24 23:56:34 2009 +0000 @@ -29,7 +29,7 @@ from django import forms from django import http from django.core import urlresolvers -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import cleaning from soc.logic import dicts @@ -81,7 +81,7 @@ new_params['sidebar_defaults'] = [('/%s/list', 'List %(name_plural)s', 'list')] - new_params['save_message'] = [ugettext_lazy('Request saved.')] + new_params['save_message'] = [ugettext('Request saved.')] new_params['extra_dynaexclude'] = ['state', 'role_verbose'] @@ -205,7 +205,7 @@ uh_params = params.copy() uh_params['list_action'] = (redirects.getInviteProcessRedirect, None) - uh_params['list_description'] = ugettext_lazy( + uh_params['list_description'] = ugettext( "An overview of your unhandled invites.") uh_list = helper.lists.getListContent( @@ -219,7 +219,7 @@ 'state': 'new'} ar_params = params.copy() - ar_params['list_description'] = ugettext_lazy( + ar_params['list_description'] = ugettext( "List of your pending requests.") ar_list = helper.lists.getListContent( diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/models/role.py --- a/app/soc/views/models/role.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/models/role.py Sat Jan 24 23:56:34 2009 +0000 @@ -24,7 +24,7 @@ from django import http -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import dicts from soc.logic.models import request as request_logic @@ -49,7 +49,7 @@ All views that only Role entities have are defined in this subclass. """ - DEF_INVITE_INSTRUCTION_MSG_FMT = ugettext_lazy( + DEF_INVITE_INSTRUCTION_MSG_FMT = ugettext( 'Please use this form to invite someone to become a %(name)s.') def __init__(self, params=None): diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/models/user_self.py --- a/app/soc/views/models/user_self.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/models/user_self.py Sat Jan 24 23:56:34 2009 +0000 @@ -29,7 +29,7 @@ from django import http from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext from soc.logic import dicts from soc.logic import validate @@ -94,7 +94,7 @@ """View methods for the User model. """ - DEF_USER_ACCOUNT_INVALID_MSG_FMT = ugettext_lazy( + DEF_USER_ACCOUNT_INVALID_MSG_FMT = ugettext( 'The %(email)s account cannot be used with this site, for' ' one or more of the following reasons:' '
    ' @@ -256,7 +256,7 @@ """See base.View.getSidebarMenus(). """ - link_title = ugettext_lazy('Notifications') + link_title = ugettext('Notifications') user = user_logic.getForCurrentAccount() diff -r b12de918d660 -r 8b5611d5b053 app/soc/views/out_of_band.py --- a/app/soc/views/out_of_band.py Sat Jan 24 21:38:28 2009 +0000 +++ b/app/soc/views/out_of_band.py Sat Jan 24 23:56:34 2009 +0000 @@ -23,7 +23,7 @@ ] -from django.utils.translation import ugettext_lazy +from django.utils.translation import ugettext class Error(Exception): @@ -57,7 +57,7 @@ TEMPLATE_NAME = 'login.html' DEF_TEMPLATE = 'soc/login.html' - DEF_LOGIN_MSG_FMT = ugettext_lazy( + DEF_LOGIN_MSG_FMT = ugettext( 'Please sign in to continue.') def __init__(self, message_fmt=None, **response_args):