diff --git a/public/language/en_GB/notifications.json b/public/language/en_GB/notifications.json index a66ac79b89..6ea4bf837b 100644 --- a/public/language/en_GB/notifications.json +++ b/public/language/en_GB/notifications.json @@ -1,5 +1,8 @@ { "title": "Notifications", + "no_notifs": "You have no notifications", + "see_all": "See all Notifications", + "back_to_home": "Back to NodeBB", "outgoing_link": "Outgoing Link", "outgoing_link_message": "You are now leaving", diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json index e1d1651e0d..d398539a27 100644 --- a/public/language/en_GB/topic.json +++ b/public/language/en_GB/topic.json @@ -3,6 +3,7 @@ "topics": "Topics", "no_topics_found": "No topics found!", + "no_posts_found": "No posts found!", "profile": "Profile", "posted_by": "Posted by", @@ -20,15 +21,19 @@ "tools": "Tools", "flag": "Flag", - "flag_title":"Flag this post for moderation", + "flag_title": "Flag this post for moderation", + "deleted_message": "This thread has been deleted. Only users with thread management privileges can see it.", "thread_tools.title": "Thread Tools", "thread_tools.markAsUnreadForAll": "Mark Unread", - "thread_tools.pin": "Pin Thread", - "thread_tools.lock": "Lock Thread", - "thread_tools.move": "Move Thread", - "thread_tools.fork": "Fork Thread", - "thread_tools.delete": "Delete Thread", + "thread_tools.pin": "Pin", + "thread_tools.unpin": "Unpin", + "thread_tools.lock": "Lock", + "thread_tools.unlock": "Unlock", + "thread_tools.move": "Move", + "thread_tools.fork": "Fork", + "thread_tools.delete": "Delete", + "thread_tools.restore": "Restore", "load_categories": "Loading Categories", "disabled_categories_note": "Disabled Categories are greyed out", diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index a869e6fd1a..91fde9d7b4 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -913,7 +913,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { x; if (locked === true) { - lockThreadEl.html(' Unlock Thread'); + translator.translate(' [[topic:thread_tools.unlock]] [[topic:topic]]', function(translated) { + lockThreadEl.html(translated); + }); threadReplyBtn.attr('disabled', true); threadReplyBtn.html('Locked '); for (x = 0; x < numPosts; x++) { @@ -935,7 +937,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { thread_state.locked = '1'; } else { - lockThreadEl.html(' Lock Thread'); + translator.translate(' [[topic:thread_tools.lock]] [[topic:topic]]', function(translated) { + lockThreadEl.html(translated); + }); threadReplyBtn.attr('disabled', false); threadReplyBtn.html('Reply'); for (x = 0; x < numPosts; x++) { @@ -967,7 +971,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { deleteNotice = document.getElementById('thread-deleted') || document.createElement('div'); if (deleted) { - deleteTextEl.html(' Restore Thread'); + translator.translate(' [[topic:thread_tools.restore]] [[topic:topic]]', function(translated) { + deleteTextEl.html(translated); + }); threadEl.addClass('deleted'); // Spawn a 'deleted' notice at the top of the page @@ -978,7 +984,9 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { thread_state.deleted = '1'; } else { - deleteTextEl.html(' Delete Thread'); + translator.translate(' [[topic:thread_tools.delete]] [[topic:topic]]', function(translated) { + deleteTextEl.html(translated); + }); threadEl.removeClass('deleted'); deleteNotice.parentNode.removeChild(deleteNotice); @@ -989,33 +997,35 @@ define(['composer', 'forum/pagination'], function(composer, pagination) { function set_pinned_state(pinned, alert) { var pinEl = $('.pin_thread'); - if (pinned) { - pinEl.html(' Unpin Thread'); - if (alert) { - app.alert({ - 'alert_id': 'thread_pin', - type: 'success', - title: 'Thread Pinned', - message: 'Thread has been successfully pinned', - timeout: 5000 - }); - } + translator.translate(' [[topic:thread_tools.' + (pinned ? 'unpin' : 'pin') + ']] [[topic:topic]]', function(translated) { + if (pinned) { + pinEl.html(translated); + if (alert) { + app.alert({ + 'alert_id': 'thread_pin', + type: 'success', + title: 'Thread Pinned', + message: 'Thread has been successfully pinned', + timeout: 5000 + }); + } - thread_state.pinned = '1'; - } else { - pinEl.html(' Pin Thread'); - if (alert) { - app.alert({ - 'alert_id': 'thread_pin', - type: 'success', - title: 'Thread Unpinned', - message: 'Thread has been successfully unpinned', - timeout: 5000 - }); - } + thread_state.pinned = '1'; + } else { + pinEl.html(translated); + if (alert) { + app.alert({ + 'alert_id': 'thread_pin', + type: 'success', + title: 'Thread Unpinned', + message: 'Thread has been successfully unpinned', + timeout: 5000 + }); + } - thread_state.pinned = '0'; - } + thread_state.pinned = '0'; + } + }); } function toggle_post_delete_state(pid) { diff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.js index b209ac22c3..13485a47c6 100644 --- a/public/src/modules/notifications.js +++ b/public/src/modules/notifications.js @@ -29,10 +29,14 @@ define(function() { } } else { - notifList.append($('
  • You have no notifications
  • ')); + translator.translate('
  • [[notifications:no_notifs]]
  • ', function(translated) { + notifList.append($(translated)); + }); } - notifList.append($('')); + translator.translate('', function(translated) { + notifList.append($(translated)); + }); updateNotifCount(data.unread.length); diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 0ad5f97d90..694823c691 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -174,7 +174,7 @@ @@ -57,12 +57,12 @@
    -

    Posts

    +

    [[topic:posts]]

    {post_matches} result(s) matching "{search_query}" -
    No posts found!
    +
    [[tropic:no_posts_found]]
    diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl index c68438c48b..d56bac87d3 100644 --- a/public/templates/topic.tpl +++ b/public/templates/topic.tpl @@ -178,13 +178,13 @@