Ver código fonte

Change user-facing terminology from "revision" to "version"

Dan Braghis 4 anos atrás
pai
commit
fb1674eb57

+ 1 - 1
wagtail/admin/templates/wagtailadmin/pages/action_menu/publish.html

@@ -1,5 +1,5 @@
 {% load i18n wagtailadmin_tags %}
 <button type="submit" name="action-publish" value="action-publish" class="button button-longrunning {% if is_revision %}warning{% endif %}" data-clicked-text="{% trans 'Publishing…' %}">
     {% if icon_name %}{% icon name=icon_name class_name="button-longrunning__icon" %}{% endif %}
-    {% icon name="spinner" %}<em>{% if is_revision %}{% trans 'Publish this revision' %}{% else %}{% trans 'Publish' %}{% endif %}</em>
+    {% icon name="spinner" %}<em>{% if is_revision %}{% trans 'Publish this version' %}{% else %}{% trans 'Publish' %}{% endif %}</em>
 </button>

+ 3 - 3
wagtail/admin/templates/wagtailadmin/pages/revisions/_actions.html

@@ -6,14 +6,14 @@
     {% if revision == page.get_latest_revision %}
         <li><a href="{% url 'wagtailadmin_pages:edit' page.id %}" class="button button-small button-secondary">{% trans 'Edit' %}</a></li>
     {% else %}
-        <li><a href="{% url 'wagtailadmin_pages:revisions_revert' page.id revision.id %}" class="button button-small button-secondary">{% trans 'Review this revision' %}</a></li>
+        <li><a href="{% url 'wagtailadmin_pages:revisions_revert' page.id revision.id %}" class="button button-small button-secondary">{% trans 'Review this version' %}</a></li>
     {% endif %}
     {% with revision.get_previous as previous_revision %}
     {% if previous_revision %}
-        <li><a href="{% url 'wagtailadmin_pages:revisions_compare' page.id previous_revision.id revision.id %}" class="button button-small button-secondary">{% trans 'Compare with previous revision' %}</a></li>
+        <li><a href="{% url 'wagtailadmin_pages:revisions_compare' page.id previous_revision.id revision.id %}" class="button button-small button-secondary">{% trans 'Compare with previous version' %}</a></li>
     {% endif %}
     {% if revision != page.get_latest_revision %}
-        <li><a href="{% url 'wagtailadmin_pages:revisions_compare' page.id revision.id 'latest' %}" class="button button-small button-secondary">{% trans 'Compare with current revision' %}</a></li>
+        <li><a href="{% url 'wagtailadmin_pages:revisions_compare' page.id revision.id 'latest' %}" class="button button-small button-secondary">{% trans 'Compare with current version' %}</a></li>
     {% endif %}
     {% endwith %}
     {% if revision.approved_go_live_at and page_perms.can_unschedule %}

+ 1 - 1
wagtail/admin/templates/wagtailadmin/pages/revisions/compare.html

@@ -74,7 +74,7 @@
                 {% empty %}
                     <tr>
                         <td colspan="2" class="no-results-message">
-                            <p>{% trans "There are no differences between these two revisions" %}</p>
+                            <p>{% trans "There are no differences between these two versions" %}</p>
                         </td>
                     </tr>
                 {% endfor %}

+ 1 - 1
wagtail/admin/templates/wagtailadmin/workflows/workflow_status.html

@@ -59,7 +59,7 @@
 
             {% with latest_revision.get_previous as previous_revision %}
             {% if previous_revision %}
-                <a href="{% url 'wagtailadmin_pages:revisions_compare' page.id previous_revision.id latest_revision.id %}" class="button button-small button-secondary">{% trans 'Compare with previous revision' %}</a>
+                <a href="{% url 'wagtailadmin_pages:revisions_compare' page.id previous_revision.id latest_revision.id %}" class="button button-small button-secondary">{% trans 'Compare with previous version' %}</a>
             {% endif %}
             {% endwith %}
         {% endwith %}

+ 2 - 2
wagtail/admin/tests/pages/test_revisions.py

@@ -123,7 +123,7 @@ class TestRevisions(TestCase, WagtailTestUtils):
         self.assertEqual(response.status_code, 200)
 
         self.assertContains(response, "Editing Event page")
-        self.assertContains(response, "You are viewing a previous revision of this page")
+        self.assertContains(response, "You are viewing a previous version of this page")
 
         # Form should show the content of the revision, not the current draft
         self.assertContains(response, "Last Christmas I gave you my heart")
@@ -137,7 +137,7 @@ class TestRevisions(TestCase, WagtailTestUtils):
 
         # Buttons should be relabelled
         self.assertContains(response, "Replace current draft")
-        self.assertContains(response, "Publish this revision")
+        self.assertContains(response, "Publish this version")
 
     def test_scheduled_revision(self):
         self.last_christmas_revision.publish()

+ 6 - 6
wagtail/admin/views/pages.py

@@ -512,7 +512,7 @@ def edit(request, page_id):
 
                 if is_reverting:
                     message = _(
-                        "Revision from {0} of page '{1}' has been scheduled for publishing."
+                        "Version from {0} of page '{1}' has been scheduled for publishing."
                     ).format(
                         previous_revision.created_at.strftime("%d %b %Y %H:%M"),
                         page.get_admin_display_title()
@@ -520,7 +520,7 @@ def edit(request, page_id):
                 else:
                     if page.live:
                         message = _(
-                            "Page '{0}' is live and this revision has been scheduled for publishing."
+                            "Page '{0}' is live and this version has been scheduled for publishing."
                         ).format(
                             page.get_admin_display_title()
                         )
@@ -544,7 +544,7 @@ def edit(request, page_id):
 
                 if is_reverting:
                     message = _(
-                        "Revision from {0} of page '{1}' has been published."
+                        "Version from {0} of page '{1}' has been published."
                     ).format(
                         previous_revision.created_at.strftime("%d %b %Y %H:%M"),
                         page.get_admin_display_title()
@@ -623,7 +623,7 @@ def edit(request, page_id):
 
         elif is_reverting:
             message = _(
-                "Page '{0}' has been replaced with revision from {1}."
+                "Page '{0}' has been replaced with version from {1}."
             ).format(
                 page.get_admin_display_title(),
                 previous_revision.created_at.strftime("%d %b %Y %H:%M")
@@ -1496,7 +1496,7 @@ def revisions_revert(request, page_id, revision_id):
     user_avatar = render_to_string('wagtailadmin/shared/user_avatar.html', {'user': revision.user})
 
     messages.warning(request, mark_safe(
-        _("You are viewing a previous revision of this page from <b>%(created_at)s</b> by %(user)s") % {
+        _("You are viewing a previous version of this page from <b>%(created_at)s</b> by %(user)s") % {
             'created_at': revision.created_at.strftime("%d %b %Y %H:%M"),
             'user': user_avatar,
         }
@@ -1604,7 +1604,7 @@ def revisions_unschedule(request, page_id, revision_id):
         revision.approved_go_live_at = None
         revision.save(user=request.user, update_fields=['approved_go_live_at'])
 
-        messages.success(request, _('Revision {0} of "{1}" unscheduled.').format(revision.id, page.get_admin_display_title()), buttons=[
+        messages.success(request, _('Version {0} of "{1}" unscheduled.').format(revision.id, page.get_admin_display_title()), buttons=[
             messages.button(reverse('wagtailadmin_pages:edit', args=(page.id,)), _('Edit'))
         ])