import wtforms
from mediagoblin.tools.mail import normalize_email
-from mediagoblin.tools.translate import fake_ugettext_passthrough as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
def normalize_user_or_email_field(allow_email=True, allow_user=True):
"""Check if we were passed a field that matches a username and/or email pattern
from mediagoblin import messages, mg_globals
from mediagoblin.db.models import User
from mediagoblin.tools.response import render_to_response, redirect, render_404
-from mediagoblin.tools.translate import pass_to_ugettext as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from mediagoblin.auth import lib as auth_lib
from mediagoblin.auth import forms as auth_forms
from mediagoblin.auth.lib import send_verification_email, \
import wtforms
from mediagoblin.tools.text import tag_length_validator, TOO_LONG_TAG_WARNING
-from mediagoblin.tools.translate import fake_ugettext_passthrough as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from mediagoblin.tools.licenses import licenses_as_choices
class EditForm(wtforms.Form):
get_media_entry_by_id,
user_may_alter_collection, get_user_collection)
from mediagoblin.tools.response import render_to_response, redirect
-from mediagoblin.tools.translate import pass_to_ugettext as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from mediagoblin.tools.text import (
convert_to_tag_list_of_dicts, media_tags_as_string)
from mediagoblin.tools.url import slugify
from mediagoblin.init import setup_global_and_app_config
from mediagoblin.tools.theme import register_themes
-from mediagoblin.tools.translate import pass_to_ugettext as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from mediagoblin.tools.common import simple_printer
from urlparse import urlparse
from mediagoblin.tools.extlib.wtf_html5 import URLField
-from mediagoblin.tools.translate import fake_ugettext_passthrough as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
class AuthorizationForm(wtforms.Form):
import wtforms
from mediagoblin.tools.text import tag_length_validator
-from mediagoblin.tools.translate import fake_ugettext_passthrough as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from mediagoblin.tools.licenses import licenses_as_choices
from mediagoblin.tools.text import convert_to_tag_list_of_dicts
-from mediagoblin.tools.translate import pass_to_ugettext as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from mediagoblin.tools.response import render_to_response, redirect
from mediagoblin.decorators import require_active_login
from mediagoblin.submit import forms as submit_forms
{# Render the label for a field #}
{% macro render_label(field) %}
{%- if field.label.text -%}
- <label for="{{ field.label.field_id }}">{{ _(field.label.text) }}</label>
+ <label for="{{ field.label.field_id }}">{{ field.label.text }}</label>
{%- endif -%}
{%- endmacro %}
{{ field }}
{%- if field.errors -%}
{% for error in field.errors %}
- <p class="form_field_error">{{ _(error) }}</p>
+ <p class="form_field_error">{{ error }}</p>
{% endfor %}
{%- endif %}
{%- if field.description %}
- <p class="form_field_description">{{ _(field.description)|safe }}</p>
+ <p class="form_field_description">{{ field.description|safe }}</p>
{%- endif %}
</div>
{%- endmacro %}
{% macro render_table(form) -%}
{% for field in form %}
<tr>
- <th>{{ _(field.label.text) }}</th>
+ <th>{{ field.label.text }}</th>
<td>
{{field}}
{% if field.errors %}
from mediagoblin.tools.extlib.EXIF import process_file, Ratio
from mediagoblin.processing import BadMediaFail
-from mediagoblin.tools.translate import pass_to_ugettext as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
# A list of tags that should be stored for faster access
USEFUL_TAGS = [
import wtforms
from wtforms.ext.sqlalchemy.fields import QuerySelectField
-from mediagoblin.tools.translate import fake_ugettext_passthrough as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
class MediaCommentForm(wtforms.Form):
comment_content = wtforms.TextAreaField(
from mediagoblin.db.models import (MediaEntry, MediaTag, Collection,
CollectionItem, User)
from mediagoblin.tools.response import render_to_response, render_404, redirect
-from mediagoblin.tools.translate import pass_to_ugettext as _
+from mediagoblin.tools.translate import lazy_pass_to_ugettext as _
from mediagoblin.tools.pagination import Pagination
from mediagoblin.user_pages import forms as user_forms
from mediagoblin.user_pages.lib import (send_comment_email,