kopia lustrzana https://github.com/wagtail/wagtail
Replace calls to __() with ugettext_lazy()
This makes xgettext discover the translatable strings.pull/2598/head
rodzic
42b9fb893c
commit
616a18aeff
|
@ -44,6 +44,7 @@ Changelog
|
|||
* Fix: Explorer menu no longer scrolls with page content (Vincent Audebert)
|
||||
* Fix: `decorate_urlpatterns` now uses `functools.update_wrapper` to keep view names and docstrings (Mario César)
|
||||
* Fix: StreamField block controls are no longer hidden by the StreamField menu when prepending a new block (Vincent Audebert)
|
||||
* Fix: Removed invalid use of `__` alias that prevented strings getting picked up for translation (Juha Yrjölä)
|
||||
|
||||
|
||||
1.4.4 (xx.xx.2016)
|
||||
|
|
|
@ -134,6 +134,7 @@ Contributors
|
|||
* Moritz Pfeiffer
|
||||
* David Seddon
|
||||
* Brad Busenius
|
||||
* Juha Yrjölä
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -82,6 +82,7 @@ Bug fixes
|
|||
* Explorer menu no longer scrolls with page content (Vincent Audebert)
|
||||
* ``decorate_urlpatterns`` now uses ``functools.update_wrapper`` to keep view names and docstrings (Mario César)
|
||||
* StreamField block controls are no longer hidden by the StreamField menu when prepending a new block (Vincent Audebert)
|
||||
* Removed invalid use of ``__`` alias that prevented strings getting picked up for translation (Juha Yrjölä)
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
|
|
|
@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
|
|||
|
||||
from django.http import HttpResponseForbidden
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
from django.utils.translation import ugettext_lazy as __
|
||||
from django.utils.translation import ugettext_lazy
|
||||
|
||||
from wagtail.wagtailadmin import messages
|
||||
from wagtail.wagtailadmin.forms import CollectionForm
|
||||
|
@ -18,8 +18,8 @@ class Index(IndexView):
|
|||
context_object_name = 'collections'
|
||||
template_name = 'wagtailadmin/collections/index.html'
|
||||
add_url_name = 'wagtailadmin_collections:add'
|
||||
page_title = __("Collections")
|
||||
add_item_label = __("Add a collection")
|
||||
page_title = ugettext_lazy("Collections")
|
||||
add_item_label = ugettext_lazy("Add a collection")
|
||||
header_icon = 'folder-open-1'
|
||||
|
||||
def get_queryset(self):
|
||||
|
@ -30,8 +30,8 @@ class Index(IndexView):
|
|||
class Create(CreateView):
|
||||
permission_policy = collection_permission_policy
|
||||
form_class = CollectionForm
|
||||
page_title = __("Add collection")
|
||||
success_message = __("Collection '{0}' created.")
|
||||
page_title = ugettext_lazy("Add collection")
|
||||
success_message = ugettext_lazy("Collection '{0}' created.")
|
||||
add_url_name = 'wagtailadmin_collections:add'
|
||||
edit_url_name = 'wagtailadmin_collections:edit'
|
||||
index_url_name = 'wagtailadmin_collections:index'
|
||||
|
@ -49,9 +49,9 @@ class Edit(EditView):
|
|||
permission_policy = collection_permission_policy
|
||||
model = Collection
|
||||
form_class = CollectionForm
|
||||
success_message = __("Collection '{0}' updated.")
|
||||
error_message = __("The collection could not be saved due to errors.")
|
||||
delete_item_label = __("Delete collection")
|
||||
success_message = ugettext_lazy("Collection '{0}' updated.")
|
||||
error_message = ugettext_lazy("The collection could not be saved due to errors.")
|
||||
delete_item_label = ugettext_lazy("Delete collection")
|
||||
edit_url_name = 'wagtailadmin_collections:edit'
|
||||
index_url_name = 'wagtailadmin_collections:index'
|
||||
delete_url_name = 'wagtailadmin_collections:delete'
|
||||
|
@ -66,11 +66,11 @@ class Edit(EditView):
|
|||
class Delete(DeleteView):
|
||||
permission_policy = collection_permission_policy
|
||||
model = Collection
|
||||
success_message = __("Collection '{0}' deleted.")
|
||||
success_message = ugettext_lazy("Collection '{0}' deleted.")
|
||||
index_url_name = 'wagtailadmin_collections:index'
|
||||
delete_url_name = 'wagtailadmin_collections:delete'
|
||||
page_title = __("Delete collection")
|
||||
confirmation_message = __("Are you sure you want to delete this collection?")
|
||||
page_title = ugettext_lazy("Delete collection")
|
||||
confirmation_message = ugettext_lazy("Are you sure you want to delete this collection?")
|
||||
header_icon = 'folder-open-1'
|
||||
|
||||
def get_queryset(self):
|
||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import absolute_import, unicode_literals
|
|||
from django.core.urlresolvers import reverse
|
||||
from django.shortcuts import get_object_or_404, redirect, render
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as __
|
||||
from django.utils.translation import ugettext_lazy
|
||||
from django.views.generic.base import View
|
||||
|
||||
from wagtail.wagtailadmin import messages
|
||||
|
@ -124,7 +124,7 @@ class EditView(PermissionCheckedMixin, View):
|
|||
index_url_name = None
|
||||
edit_url_name = None
|
||||
delete_url_name = None
|
||||
page_title = __("Editing")
|
||||
page_title = ugettext_lazy("Editing")
|
||||
context_object_name = None
|
||||
template_name = 'wagtailadmin/generic/edit.html'
|
||||
permission_required = 'change'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as __
|
||||
from django.utils.translation import ugettext_lazy
|
||||
|
||||
from wagtail.wagtailadmin.views.generic import CreateView, DeleteView, EditView, IndexView
|
||||
from wagtail.wagtailcore.models import Site
|
||||
|
@ -14,16 +14,16 @@ class Index(IndexView):
|
|||
context_object_name = 'sites'
|
||||
template_name = 'wagtailsites/index.html'
|
||||
add_url_name = 'wagtailsites:add'
|
||||
page_title = __("Sites")
|
||||
add_item_label = __("Add a site")
|
||||
page_title = ugettext_lazy("Sites")
|
||||
add_item_label = ugettext_lazy("Add a site")
|
||||
header_icon = 'site'
|
||||
|
||||
|
||||
class Create(CreateView):
|
||||
permission_policy = site_permission_policy
|
||||
form_class = SiteForm
|
||||
page_title = __("Add site")
|
||||
success_message = __("Site '{0}' created.")
|
||||
page_title = ugettext_lazy("Add site")
|
||||
success_message = ugettext_lazy("Site '{0}' created.")
|
||||
add_url_name = 'wagtailsites:add'
|
||||
edit_url_name = 'wagtailsites:edit'
|
||||
index_url_name = 'wagtailsites:index'
|
||||
|
@ -35,9 +35,9 @@ class Edit(EditView):
|
|||
permission_policy = site_permission_policy
|
||||
model = Site
|
||||
form_class = SiteForm
|
||||
success_message = __("Site '{0}' updated.")
|
||||
error_message = __("The site could not be saved due to errors.")
|
||||
delete_item_label = __("Delete site")
|
||||
success_message = ugettext_lazy("Site '{0}' updated.")
|
||||
error_message = ugettext_lazy("The site could not be saved due to errors.")
|
||||
delete_item_label = ugettext_lazy("Delete site")
|
||||
edit_url_name = 'wagtailsites:edit'
|
||||
index_url_name = 'wagtailsites:index'
|
||||
delete_url_name = 'wagtailsites:delete'
|
||||
|
@ -49,9 +49,9 @@ class Edit(EditView):
|
|||
class Delete(DeleteView):
|
||||
permission_policy = site_permission_policy
|
||||
model = Site
|
||||
success_message = __("Site '{0}' deleted.")
|
||||
success_message = ugettext_lazy("Site '{0}' deleted.")
|
||||
index_url_name = 'wagtailsites:index'
|
||||
delete_url_name = 'wagtailsites:delete'
|
||||
page_title = __("Delete site")
|
||||
confirmation_message = __("Are you sure you want to delete this site?")
|
||||
page_title = ugettext_lazy("Delete site")
|
||||
confirmation_message = ugettext_lazy("Are you sure you want to delete this site?")
|
||||
header_icon = 'site'
|
||||
|
|
Ładowanie…
Reference in New Issue