FIX: Add more descriptive text for expanding links

This commit is contained in:
Robin Ward 2016-06-02 13:07:47 -04:00
parent fd57865046
commit 43e7890dcf
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
3 changed files with 4 additions and 9 deletions

View File

@ -31,7 +31,8 @@ export default createWidget('link', {
},
buildAttributes(attrs) {
return { href: this.href(attrs), title: this.label(attrs) };
return { href: this.href(attrs),
title: attrs.title ? I18n.t(attrs.title) : this.label(attrs) };
},
label(attrs) {

View File

@ -19,6 +19,7 @@ export default createWidget('post-links', {
if (state.collapsed) {
return this.attach('link', {
labelCount: `post_links.title`,
title: "post_links.about",
count: links.length,
action: 'expandLinks',
className: 'expand-links'
@ -48,14 +49,6 @@ export default createWidget('post-links', {
});
}
// if (attrs.canReplyAsNewTopic) {
// result.push(h('li', this.attach('link', {
// className: 'reply-new',
// contents: () => [I18n.t('post.reply_as_new_topic'), iconNode('plus')],
// action: 'newTopicAction'
// })));
// }
return h('ul.post-links', result);
},

View File

@ -1828,6 +1828,7 @@ en:
one: "1 click"
other: "%{count} clicks"
post_links:
about: "expand the links for this post"
title:
one: "1 post link"
other: "%{count} post links"