From 53aabc8c8418ce3858226ae301c8d5072e53ff7f Mon Sep 17 00:00:00 2001 From: Pablo Vazquez Date: Fri, 27 Oct 2017 00:04:38 +0200 Subject: [PATCH] Translations: Mark more strings for translation --- .../nodes/custom/comment/_macros.pug | 22 +++++++++---------- .../nodes/custom/comment/list_embed.pug | 18 +++++++-------- src/templates/users/settings/profile.pug | 11 ++++------ 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/templates/nodes/custom/comment/_macros.pug b/src/templates/nodes/custom/comment/_macros.pug index f5c280fb..67bbfd8f 100644 --- a/src/templates/nodes/custom/comment/_macros.pug +++ b/src/templates/nodes/custom/comment/_macros.pug @@ -18,31 +18,31 @@ .comment-meta .comment-rating( class="{% if comment._current_user_rating is not none %}rated{% if comment._current_user_rating %} positive{% endif %}{% endif %}") - .comment-rating-value(title="Number of likes") {{ comment._rating }} + .comment-rating-value(title="{{ _('Number of likes') }}") {{ comment._rating }} | {% if not comment._is_own %} - .comment-action-rating.up(title="Like comment") + .comment-action-rating.up(title="{{ _('Like comment') }}") | {% endif %} - .comment-action-reply(title="Reply to this comment") - span Reply + .comment-action-reply(title="{{ _('Reply to this comment') }}") + span {{ _("Reply") }} | {% if comment._is_own %} .comment-action-edit - span.edit_mode(title="Edit comment") - | Edit - span.edit_save(title="Save comment") + span.edit_mode(title="{{ _('Edit comment') }}") + | {{ _("Edit") }} + span.edit_save(title="{{ _('Save comment') }}") i.pi-check - | Save Changes - span.edit_cancel(title="Cancel changes") + | {{ _("Save Changes") }} + span.edit_cancel(title="{{ _('Cancel changes') }}") i.pi-cancel - | Cancel + | {{ _("Cancel") }} | {% endif %} .comment-time | {{ comment._created | pretty_date_time }} | {% if comment._created != comment._updated %} - span(title="edited {{ comment._updated | pretty_date_time }}") * + span(title="{{ _('edited') }} {{ comment._updated | pretty_date_time }}") * | {% endif %} | {% for reply in comment['_replies']['_items'] %} diff --git a/src/templates/nodes/custom/comment/list_embed.pug b/src/templates/nodes/custom/comment/list_embed.pug index 0b45a062..3b7ee48a 100644 --- a/src/templates/nodes/custom/comment/list_embed.pug +++ b/src/templates/nodes/custom/comment/list_embed.pug @@ -5,7 +5,7 @@ | {% if can_post_comments %} .comment-reply-avatar img( - title="Commenting as {{ current_user.full_name }}", + title="{{ _('Commenting as') }} {{ current_user.full_name }}", src="{{ current_user.gravatar }}") .comment-reply-form @@ -14,7 +14,7 @@ textarea( id="comment_field", data-parent-id="{{ node_id }}", - placeholder="Join the conversation...") + placeholder="{{ _('Join the conversation...') }}") .comment-reply-meta @@ -24,7 +24,7 @@ title="Post Comment (Ctrl+Enter)") span i.pi-paper-plane - | Send + | {{ _('Send') }} span.hotkey Ctrl + Enter .comment-reply-preview @@ -32,14 +32,14 @@ .comment-reply-info .comment-action-cancel( type="button", - title="Cancel") - span cancel + title="{{ _('cancel') }}") + span {{ _('cancel') }} a( - title="Handy guide of Markdown syntax", + title="{{ _('Handy guide of Markdown syntax') }}", target="_blank", href="https://guides.github.com/features/mastering-markdown/") - span markdown cheatsheet + span {{ _('markdown cheatsheet') }} | {% elif current_user.is_authenticated %} @@ -57,13 +57,13 @@ | {# * User is not autenticated #} .comment-reply-form .comment-reply-field.sign-in - a(href="{{ url_for('users.login') }}") Log in to comment + a(href="{{ url_for('users.login') }}") {{ _('Log in to comment') }} | {% endif %} | {% if show_comments and (nr_of_comments > 0) %} section.comments-list-header .comments-list-title - | {{ nr_of_comments }} comment{{ nr_of_comments|pluralize }} + | {{ nr_of_comments }} {{ _('comment') }}{{ nr_of_comments|pluralize }} .comments-list-items | {% for comment in comments['_items'] %} | {{ macros.render_comment(comment, False) }} diff --git a/src/templates/users/settings/profile.pug b/src/templates/users/settings/profile.pug index a0c16f5b..5d872da0 100644 --- a/src/templates/users/settings/profile.pug +++ b/src/templates/users/settings/profile.pug @@ -5,7 +5,7 @@ | {% include 'users/settings/_sidebar.html'%} #settings-container .settings-header - .settings-title Profile + .settings-title {{ _("Profile") }} .settings-content .settings-form @@ -25,21 +25,18 @@ | {% for error in form.username.errors %}{{ error|e }}{% endfor %} | {% endif %} - .form-group.settings-password - | Change your password at the - a(href="https://blender.org/id/change") Blender ID + | {{ _("Change your password at") }} #[a(href="https://blender.org/id/change") Blender ID] .right .settings-avatar a(href="https://gravatar.com/") img(src="{{ current_user.gravatar }}") - span Change Gravatar + span {{ _("Change Gravatar") }} .buttons button.btn.btn-default.button-submit(type='submit') i.pi-check - | Save Changes - + | {{ _("Save Changes") }} | {% endblock %}