From 748b9f680083d5c67182717292c08815db65f8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Mon, 25 Jan 2016 18:33:32 +0100 Subject: [PATCH] Fix some translations and add some title attrs to links --- app/coffee/modules/common/history.coffee | 1 + app/locales/taiga/locale-en.json | 13 ++++++++----- .../attachments-full/attachments-full.jade | 6 ++++-- app/partials/common/components/block-button.jade | 4 ++-- app/partials/common/history/history-activity.jade | 6 +++++- .../common/history/history-deleted-comment.jade | 6 +++++- app/partials/issue/promote-issue-to-us-button.jade | 5 ++++- 7 files changed, 29 insertions(+), 12 deletions(-) diff --git a/app/coffee/modules/common/history.coffee b/app/coffee/modules/common/history.coffee index 0eb98dae..ef90a356 100644 --- a/app/coffee/modules/common/history.coffee +++ b/app/coffee/modules/common/history.coffee @@ -305,6 +305,7 @@ HistoryDirective = ($log, $loading, $qqueue, $template, $confirm, $translate, $c changesText: renderChangesHelperText(comment) changes: renderChangeEntries(comment) mode: "comment" + deleteCommentActionTitle: $translate.instant("COMMENTS.DELETE") deleteCommentDate: moment(comment.delete_comment_date).format(getPrettyDateFormat()) if comment.delete_comment_date deleteCommentUser: comment.delete_comment_user.name if comment.delete_comment_user?.name activityId: comment.id diff --git a/app/locales/taiga/locale-en.json b/app/locales/taiga/locale-en.json index 2228e699..4b32cb23 100644 --- a/app/locales/taiga/locale-en.json +++ b/app/locales/taiga/locale-en.json @@ -18,16 +18,16 @@ "TAG_LINE": "Your agile, free, and open source project management tool", "TAG_LINE_2": "LOVE YOUR PROJECT", "BLOCK": "Block", - "UNBLOCK": "Unblock", + "BLOCK_TITLE": "Block this item for example if it has a dependency that can not be satisfied", "BLOCKED": "Blocked", + "UNBLOCK": "Unblock", + "UNBLOCK_TITLE": "Unblock this item", + "BLOCKED_NOTE": "Why is this blocked?", + "BLOCKED_REASON": "Please explain the reason", "CREATED_BY": "Created by {{fullDisplayName}}", "FROM": "from", "TO": "to", "CLOSE": "close", - "BLOCK": "Block this User Story if it has a dependency that can not be satisfied", - "UNBLOCK": "Unblock this User Story", - "BLOCKED_NOTE": "Why is this user story blocked?", - "BLOCKED_REASON": "Please explain the reason", "GO_HOME": "Take me home", "PLUGINS": "Plugins", "BETA": "We are on beta!", @@ -365,6 +365,8 @@ "ATTACHMENT": { "SECTION_NAME": "attachments", "TITLE": "{{ fileName }} uploaded on {{ date }}", + "LIST_VIEW_MODE": "List view mode", + "GALLERY_VIEW_MODE": "Gallery view mode", "DESCRIPTION": "Type a short description", "DEPRECATED": "(deprecated)", "DEPRECATED_FILE": "Deprecated?", @@ -913,6 +915,7 @@ "TYPE_NEW_COMMENT": "Type a new comment here", "SHOW_DELETED": "Show deleted comment", "HIDE_DELETED": "Hide deleted comment", + "DELETE": "Delete comment", "RESTORE": "Restore comment" }, "ACTIVITY": { diff --git a/app/modules/components/attachments-full/attachments-full.jade b/app/modules/components/attachments-full/attachments-full.jade index eab3c84f..0e3852b4 100644 --- a/app/modules/components/attachments-full/attachments-full.jade +++ b/app/modules/components/attachments-full/attachments-full.jade @@ -4,14 +4,16 @@ section.attachments(tg-attachments-drop="vm.addAttachments(files, false)") .options button.view-gallery( ng-class="{'is-active': vm.mode == 'gallery'}" - ng-if="vm.attachments.size", + ng-if="vm.attachments.size" ng-click="vm.setMode('gallery')" + title="{{ 'ATTACHMENT.GALLERY_VIEW_MODE' | translate }}" ) include ../../../svg/gallery.svg button.view-list( ng-class="{'is-active': vm.mode == 'list'}" - ng-if="vm.attachments.size", + ng-if="vm.attachments.size" ng-click="vm.setMode('list')" + title="{{ 'ATTACHMENT.LIST_VIEW_MODE' | translate }}" ) include ../../../svg/list.svg .add-attach( diff --git a/app/partials/common/components/block-button.jade b/app/partials/common/components/block-button.jade index 631d288c..2f474602 100644 --- a/app/partials/common/components/block-button.jade +++ b/app/partials/common/components/block-button.jade @@ -1,10 +1,10 @@ a.button-gray.item-block( href="" - title="{{ 'COMMON.BLOCK' | translate }}" + title="{{ 'COMMON.BLOCK_TITLE' | translate }}" ) include ../../../svg/lock.svg a.button-red.item-unblock( href="" - title="{{ 'COMMON.UNBLOCK' | translate }}" + title="{{ 'COMMON.UNBLOCK_TITLE' | translate }}" ) include ../../../svg/unlock.svg diff --git a/app/partials/common/history/history-activity.jade b/app/partials/common/history/history-activity.jade index ee6152fa..a49c3fb6 100644 --- a/app/partials/common/history/history-activity.jade +++ b/app/partials/common/history/history-activity.jade @@ -18,7 +18,11 @@ div(class!="activity-single <%- mode %>") .comment.wysiwyg(ng-non-bindable) | <%= comment %> <% if (!deleteCommentDate && mode !== "activity" && canDeleteComment) { %> - a(href="", class="icon icon-delete comment-delete", data-activity-id!="<%- activityId %>") + a.icon.icon-delete.comment-delete( + href="" + data-activity-id!="<%- activityId %>" + title!="<%- deleteCommentActionTitle %>" + ) <% } %> <% } %> diff --git a/app/partials/common/history/history-deleted-comment.jade b/app/partials/common/history/history-deleted-comment.jade index 2e8cfe44..fbbcd29d 100644 --- a/app/partials/common/history/history-deleted-comment.jade +++ b/app/partials/common/history/history-deleted-comment.jade @@ -8,7 +8,11 @@ class="hide-deleted-comment hidden", translate="COMMENTS.HIDE_DELETED") .comment-body.wysiwyg <%= deleteComment %> <% if (canRestoreComment) { %> - a(href="", class="comment-restore", data-activity-id!="<%- activityId %>") + a.comment-restore( + href="" + data-activity-id!="<%- activityId %>" + title="{{ 'COMMENTS.RESTORE' | translate }}" + ) span.icon.icon-reload span(translate="COMMENTS.RESTORE") <% } %> diff --git a/app/partials/issue/promote-issue-to-us-button.jade b/app/partials/issue/promote-issue-to-us-button.jade index fe2c1e18..d9a4ad31 100644 --- a/app/partials/issue/promote-issue-to-us-button.jade +++ b/app/partials/issue/promote-issue-to-us-button.jade @@ -1,2 +1,5 @@ -a.promote-button.editable(tg-check-permission="add_us") +a.promote-button.editable( + tg-check-permission="add_us" + title="{{ 'ISSUES.ACTION_PROMOTE_TO_US' | translate }}" +) include ../../svg/promote.svg