From 2901b5bbef297a15d21014564370bce9f8231db0 Mon Sep 17 00:00:00 2001 From: Kuba Brecka <kuba.brecka@gmail.com> Date: Thu, 18 Apr 2013 10:42:29 +0200 Subject: [PATCH] extracting some hardcoded title="..." strings --- .../javascripts/discourse/templates/header.js.handlebars | 2 +- .../discourse/templates/image_selector.js.handlebars | 4 ++-- .../discourse/templates/topic_summary/info.js.handlebars | 4 ++-- app/assets/javascripts/discourse/views/post_view.js | 4 ++-- config/locales/client.en.yml | 6 ++++++ 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/header.js.handlebars b/app/assets/javascripts/discourse/templates/header.js.handlebars index c53d6d8a6..26931aaee 100644 --- a/app/assets/javascripts/discourse/templates/header.js.handlebars +++ b/app/assets/javascripts/discourse/templates/header.js.handlebars @@ -34,7 +34,7 @@ <li class='categories dropdown'> <a class='icon' data-dropdown="site-map-dropdown" href="#" title='{{i18n site_map}}'><i class='icon-reorder'></i></a> {{#if view.currentUser.site_flagged_posts_count}} - <a href='/admin/flags/active' title='total flagged posts' class='badge-notification flagged-posts'>{{view.currentUser.site_flagged_posts_count}}</a> + <a href='/admin/flags/active' title='{{i18n notifications.total_flagged}}' class='badge-notification flagged-posts'>{{view.currentUser.site_flagged_posts_count}}</a> {{/if}} </li> <li class='current-user'> diff --git a/app/assets/javascripts/discourse/templates/image_selector.js.handlebars b/app/assets/javascripts/discourse/templates/image_selector.js.handlebars index 73b3610b8..51f7823e0 100644 --- a/app/assets/javascripts/discourse/templates/image_selector.js.handlebars +++ b/app/assets/javascripts/discourse/templates/image_selector.js.handlebars @@ -1,8 +1,8 @@ <ul class="nav nav-pills image-options"> - <li title="local image" {{bindAttr class="view.localSelected:active"}}> + <li title="{{i18n image_selector.local_title}}" {{bindAttr class="view.localSelected:active"}}> <a href="#" {{action selectLocal target="view"}}>{{i18n image_selector.from_my_computer}}</a> </li> - <li title="remote image" {{bindAttr class="view.remoteSelected:active"}}> + <li title="{{i18n image_selector.remote_title}}" {{bindAttr class="view.remoteSelected:active"}}> <a href="#" {{action selectRemote target="view"}}>{{i18n image_selector.from_the_web}}</a> </li> </ul> diff --git a/app/assets/javascripts/discourse/templates/topic_summary/info.js.handlebars b/app/assets/javascripts/discourse/templates/topic_summary/info.js.handlebars index f6c856267..746a23d56 100644 --- a/app/assets/javascripts/discourse/templates/topic_summary/info.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic_summary/info.js.handlebars @@ -82,10 +82,10 @@ <section class='links'> <ul class='topic-links'> {{#collection contentBinding="view.parentView.infoLinks" itemTagName="li"}} - <span class='badge badge-notification clicks' title='clicks'>{{view.content.clicks}}</span> + <span class='badge badge-notification clicks' title='{{i18n topic_summary.clicks}}'>{{view.content.clicks}}</span> <a href="{{unbound view.content.url}}" target="_blank" class='topic-link track-link' data-user-id="{{unbound view.content.user_id}}" data-ignore-post-id="true" title="{{unbound view.content.url}}"> {{#if view.content.title}}{{shorten view.content.title}}{{else}}{{shortenUrl view.content.url}}{{/if}} - {{#if view.content.internal}}<i class='icon-arrow-right' title='topic link'></i>{{/if}} + {{#if view.content.internal}}<i class='icon-arrow-right' title='{{i18n topic_summary.topic_link}}'></i>{{/if}} </a> {{/collection}} </ul> diff --git a/app/assets/javascripts/discourse/views/post_view.js b/app/assets/javascripts/discourse/views/post_view.js index 77b9fd225..f274c8784 100644 --- a/app/assets/javascripts/discourse/views/post_view.js +++ b/app/assets/javascripts/discourse/views/post_view.js @@ -141,7 +141,7 @@ Discourse.PostView = Discourse.View.extend({ // Only add the expand/contract control if it's not a full post var expandContract = ""; if (!$aside.data('full')) { - expandContract = "<i class='icon-" + desc + "' title='expand/collapse'></i>"; + expandContract = "<i class='icon-" + desc + "' title='" + Em.String.i18n("post.expand_collapse") + "'></i>"; $aside.css('cursor', 'pointer'); } $('.quote-controls', $aside).html("" + expandContract + navLink); @@ -186,7 +186,7 @@ Discourse.PostView = Discourse.View.extend({ postView.$(".cooked a[href]").each(function() { var link = $(this); if (link.attr('href') === lc.url) { - return link.append("<span class='badge badge-notification clicks' title='clicks'>" + lc.clicks + "</span>"); + return link.append("<span class='badge badge-notification clicks' title='" + Em.String.i18n("topic_summary.clicks") + "'>" + lc.clicks + "</span>"); } }); } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 1711431db..c7c721f41 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -347,13 +347,16 @@ en: invited_to_private_message: "{{username}} invited you to a private conversation: {{link}}" invitee_accepted: "<i title='accepted your invitation' class='icon icon-signin'></i> {{username}} accepted your invitation" moved_post: "<i title='moved post' class='icon icon-arrow-right'></i> {{username}} moved post to {{link}}" + total_flagged: "total flagged posts" image_selector: title: "Insert Image" from_my_computer: "From My Device" from_the_web: "From The Web" add_image: "Add Image" + remote_title: "remote image" remote_tip: "enter address of an image in the form http://example.com/image.jpg" + local_title: "local image" local_tip: "click to select an image from your device." upload: "Upload" uploading_image: "Uploading image" @@ -566,6 +569,7 @@ en: continue_discussion: "Continuing the discussion from {{postLink}}:" follow_quote: "go to the quoted post" deleted_by_author: "(post removed by author)" + expand_collapse: "expand/collapse" has_replies: one: "Reply" @@ -734,6 +738,8 @@ en: topic_summary: title: "Topic Summary" links_shown: "show all {{totalLinks}} links..." + clicks: "clicks" + topic_link: "topic link" topic_statuses: locked: