From 65396000d210d1afd41391c7d5035f44e600721d Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 13 Nov 2015 16:22:27 -0500 Subject: [PATCH 1/7] Updated modal to not be .confirm() but .dialog() Also updated composer code to actually send a link back to the other topic... Closes #3693 --- public/language/en_GB/topic.json | 6 +++- public/src/client/topic/postTools.js | 46 ++++++++++++++++++++++------ 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json index c26d0c05f8..dcc651fc24 100644 --- a/public/language/en_GB/topic.json +++ b/public/language/en_GB/topic.json @@ -116,7 +116,11 @@ "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)\n\n", "spam": "Spam", "offensive": "Offensive", diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index 0232932d6e..c07cb2417c 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -408,18 +408,44 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator function showStaleWarning(callback) { if (ajaxify.data.lastposttime < (Date.now() - (1000*60*60*24*config.topicStaleDays))) { - translator.translate('[[topic:stale_topic_warning]]', function(translated) { - bootbox.confirm(translated, function(create) { - if (create) { - $(window).trigger('action:composer.topic.new', { - cid: ajaxify.data.cid - }); - - } + translator.translate('[[topic:stale.warning]]', function(translated) { + var warning = bootbox.dialog({ + title: '[[topic:stale.title]]', + message: translated, + buttons: { + reply: { + label: '[[topic:stale.reply_anyway]]', + className: 'btn-link', + callback: function() { + callback(false); + } + }, + create: { + label: '[[topic:stale.create]]', + className: 'btn-primary', + callback: function() { + translator.translate('[[topic:stale.link_back, ' + ajaxify.data.title + ', ' + config.relative_path + '/topic/' + ajaxify.data.slug + ']]', function(body) { + $(window).trigger('action:composer.topic.new', { + cid: ajaxify.data.cid, + body: body + }); + }); + } + } + } + }); - callback(create); - }); + warning.modal(); }); + // bootbox.confirm(translated, function(create) { + // if (create) { + + + // } + + // callback(create); + // }); + // }); } else { callback(false); } From c2963a7ca94fb66cfa3d004864d195d8b8f5a4c1 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 13 Nov 2015 16:25:20 -0500 Subject: [PATCH 2/7] Composer minver, #3693 --- package.json | 2 +- public/src/client/topic/postTools.js | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/package.json b/package.json index f19e4fdedc..767454d4be 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "mkdirp": "~0.5.0", "morgan": "^1.3.2", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "1.0.21", + "nodebb-plugin-composer-default": "1.0.22", "nodebb-plugin-dbsearch": "0.2.17", "nodebb-plugin-emoji-extended": "0.4.16", "nodebb-plugin-markdown": "4.0.8", diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index c07cb2417c..0d36139403 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -437,15 +437,6 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator warning.modal(); }); - // bootbox.confirm(translated, function(create) { - // if (create) { - - - // } - - // callback(create); - // }); - // }); } else { callback(false); } From 053f450f691a64d06f776e4697a870f109cb3917 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 13 Nov 2015 16:26:59 -0500 Subject: [PATCH 3/7] upped composer minver again, #3693 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 767454d4be..cf138da3cc 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "mkdirp": "~0.5.0", "morgan": "^1.3.2", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "1.0.22", + "nodebb-plugin-composer-default": "1.0.23", "nodebb-plugin-dbsearch": "0.2.17", "nodebb-plugin-emoji-extended": "0.4.16", "nodebb-plugin-markdown": "4.0.8", From 5cdcf0f642284f7ead5377e63e4830666570fab4 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 13 Nov 2015 16:30:10 -0500 Subject: [PATCH 4/7] updating composer minver again because I am dumb, #3693 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cf138da3cc..a9d3dfb98c 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "mkdirp": "~0.5.0", "morgan": "^1.3.2", "nconf": "~0.8.2", - "nodebb-plugin-composer-default": "1.0.23", + "nodebb-plugin-composer-default": "1.0.24", "nodebb-plugin-dbsearch": "0.2.17", "nodebb-plugin-emoji-extended": "0.4.16", "nodebb-plugin-markdown": "4.0.8", From fcd13e48f5ee655ba9649f31ca0d897a131bc2d7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 13 Nov 2015 16:42:30 -0500 Subject: [PATCH 5/7] spam-be-gone minver --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a9d3dfb98c..97f52bb396 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "nodebb-plugin-markdown": "4.0.8", "nodebb-plugin-mentions": "1.0.10", "nodebb-plugin-soundpack-default": "0.1.5", - "nodebb-plugin-spam-be-gone": "0.4.2", + "nodebb-plugin-spam-be-gone": "0.4.3", "nodebb-rewards-essentials": "0.0.6", "nodebb-theme-lavender": "3.0.0", "nodebb-theme-persona": "4.0.36", From 6ad715f948230a0e59c0d9791225ae5fbf0dd0e6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 13 Nov 2015 16:58:22 -0500 Subject: [PATCH 6/7] fallbacks for nodebb.topic --- public/language/ar/topic.json | 6 +++++- public/language/bg/topic.json | 6 +++++- public/language/bn/topic.json | 6 +++++- public/language/cs/topic.json | 6 +++++- public/language/da/topic.json | 10 +++++++--- public/language/de/topic.json | 6 +++++- public/language/el/topic.json | 6 +++++- public/language/en@pirate/topic.json | 6 +++++- public/language/en_US/topic.json | 6 +++++- public/language/es/topic.json | 6 +++++- public/language/et/topic.json | 6 +++++- public/language/fa_IR/topic.json | 6 +++++- public/language/fi/topic.json | 6 +++++- public/language/fr/topic.json | 6 +++++- public/language/gl/topic.json | 6 +++++- public/language/he/topic.json | 6 +++++- public/language/hu/topic.json | 6 +++++- public/language/id/topic.json | 6 +++++- public/language/it/topic.json | 6 +++++- public/language/ja/topic.json | 6 +++++- public/language/ko/topic.json | 6 +++++- public/language/lt/topic.json | 6 +++++- public/language/ms/topic.json | 6 +++++- public/language/nb/topic.json | 6 +++++- public/language/nl/topic.json | 10 +++++++--- public/language/pl/topic.json | 6 +++++- public/language/pt_BR/topic.json | 6 +++++- public/language/ro/topic.json | 6 +++++- public/language/ru/topic.json | 6 +++++- public/language/rw/topic.json | 6 +++++- public/language/sc/topic.json | 6 +++++- public/language/sk/topic.json | 6 +++++- public/language/sl/topic.json | 6 +++++- public/language/sr/topic.json | 6 +++++- public/language/sv/topic.json | 6 +++++- public/language/th/topic.json | 6 +++++- public/language/tr/topic.json | 12 ++++++++---- public/language/vi/topic.json | 6 +++++- public/language/zh_CN/topic.json | 6 +++++- public/language/zh_TW/topic.json | 6 +++++- 40 files changed, 207 insertions(+), 47 deletions(-) diff --git a/public/language/ar/topic.json b/public/language/ar/topic.json index b05a0f631f..9b4286ae11 100644 --- a/public/language/ar/topic.json +++ b/public/language/ar/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "من الأحدث إلى الأقدم", "most_votes": "الأكثر تصويتًا", "most_posts": "اﻷكثر رداً", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/bg/topic.json b/public/language/bg/topic.json index 785c8415b5..31ab34be70 100644 --- a/public/language/bg/topic.json +++ b/public/language/bg/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Първо най-новите", "most_votes": "Най-много гласове", "most_posts": "Най-много публикации", - "stale_topic_warning": "Темата, в която отговаряте, е доста стара. Искате ли вместо това да създадете нова и да направите препратка към тази в отговора си?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Спам", "offensive": "Обидно", "custom-flag-reason": "Изберете причина за докладване" diff --git a/public/language/bn/topic.json b/public/language/bn/topic.json index 79efe5eab8..6808b0a2dd 100644 --- a/public/language/bn/topic.json +++ b/public/language/bn/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "নতুন থেকে পুরাতন", "most_votes": "সর্বোচ্চ ভোট", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/cs/topic.json b/public/language/cs/topic.json index 27915ee85f..14713c8f27 100644 --- a/public/language/cs/topic.json +++ b/public/language/cs/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/da/topic.json b/public/language/da/topic.json index a90ea673d5..4824da48dc 100644 --- a/public/language/da/topic.json +++ b/public/language/da/topic.json @@ -25,7 +25,7 @@ "tools": "Værktøjer", "flag": "Marker", "locked": "Låst", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Klik her for at returnere til det seneste ulæste indlæg i denne tråd.", "flag_title": "Meld dette indlæg til moderation", "flag_success": "Dette indlæg er blevet meldt til moderation.", "deleted_message": "Denne tråd er blevet slettet. Kun brugere med emne behandlings privilegier kan se den.", @@ -96,8 +96,12 @@ "newest_to_oldest": "Nyeste til ældste", "most_votes": "Flest stemmer", "most_posts": "Flest indlæg", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", - "offensive": "Offensive", + "offensive": "Stødende", "custom-flag-reason": "Enter a flagging reason" } \ No newline at end of file diff --git a/public/language/de/topic.json b/public/language/de/topic.json index 056d7a6737..eee6769e85 100644 --- a/public/language/de/topic.json +++ b/public/language/de/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Neuste zuerst", "most_votes": "Die meisten Stimmen", "most_posts": "Die meisten Beiträge", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/el/topic.json b/public/language/el/topic.json index c05bdbeb98..3a86b8ac6c 100644 --- a/public/language/el/topic.json +++ b/public/language/el/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Νεότερο προς Παλαιότερο", "most_votes": "Περισσότερες ψήφοι", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/en@pirate/topic.json b/public/language/en@pirate/topic.json index 49107da35d..d3eefbba08 100644 --- a/public/language/en@pirate/topic.json +++ b/public/language/en@pirate/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/en_US/topic.json b/public/language/en_US/topic.json index 19f7e125fc..4b2ea05e59 100644 --- a/public/language/en_US/topic.json +++ b/public/language/en_US/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/es/topic.json b/public/language/es/topic.json index 8144941bcb..5f3d3c6588 100644 --- a/public/language/es/topic.json +++ b/public/language/es/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Más nuevo a más antiguo", "most_votes": "Mayor número de votos", "most_posts": "Mayor número de mensajes", - "stale_topic_warning": "El tema no ha sido respondido desde hace bastante tiempo. ¿Quieres crear un nuevo tema en su lugar, y crear una referencia de éste en su respuesta?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "SPAM", "offensive": "Ofensivo", "custom-flag-reason": "Introduzca una razón indicatoria." diff --git a/public/language/et/topic.json b/public/language/et/topic.json index 4c70410b4d..3dbaa52ace 100644 --- a/public/language/et/topic.json +++ b/public/language/et/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Uuematest vanemateni", "most_votes": "Kõige rohkem hääli", "most_posts": "Kõige rohkem postitusi", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/fa_IR/topic.json b/public/language/fa_IR/topic.json index ec40bfeac5..aea16ab1ab 100644 --- a/public/language/fa_IR/topic.json +++ b/public/language/fa_IR/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "جدید‌ترین به قدیمی‌ترین", "most_votes": "بیشترین رای‌ها", "most_posts": "بیشتر دیدگاه ها", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/fi/topic.json b/public/language/fi/topic.json index e282dd1775..2372f7707a 100644 --- a/public/language/fi/topic.json +++ b/public/language/fi/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index 43b69bfc66..a7c62d1de1 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Du plus récent au plus ancien", "most_votes": "Les mieux notés", "most_posts": "Nombre de messages", - "stale_topic_warning": "Le sujet auquel vous répondez est assez ancien. Ne préféreriez-vous pas créer un nouveau sujet à la place, et référencer celui-ci dans votre réponse ?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensif", "custom-flag-reason": "Entrez une raison pour laquelle vous signalez ce message" diff --git a/public/language/gl/topic.json b/public/language/gl/topic.json index 479618b337..c6a38a4374 100644 --- a/public/language/gl/topic.json +++ b/public/language/gl/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Máis novo a máis antigo", "most_votes": "Maior número de votos", "most_posts": "Maior número de respostas", - "stale_topic_warning": "O tema non ten respostas dende hai bastante tempo. Queres crear un novo tema no seu canto e crear unha referencia deste na publicación?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Ofensivo", "custom-flag-reason": "Describe o motivo do reporte" diff --git a/public/language/he/topic.json b/public/language/he/topic.json index 1c496da8e6..5e87dbafb0 100644 --- a/public/language/he/topic.json +++ b/public/language/he/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "מהחדש לישן", "most_votes": "הכי הרבה הצבעות", "most_posts": "הכי הרבה פוסטים", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/hu/topic.json b/public/language/hu/topic.json index 542365b1f9..2d97d66729 100644 --- a/public/language/hu/topic.json +++ b/public/language/hu/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/id/topic.json b/public/language/id/topic.json index 3fd78e6eb4..c771884629 100644 --- a/public/language/id/topic.json +++ b/public/language/id/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Terbaru ke Terlama", "most_votes": "Vote terbanyak", "most_posts": "Postingan terbanyak", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/it/topic.json b/public/language/it/topic.json index 56d6cd7047..f8d8a48d1b 100644 --- a/public/language/it/topic.json +++ b/public/language/it/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Da Nuovi a Vecchi", "most_votes": "Più votati", "most_posts": "Ulteriori post", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/ja/topic.json b/public/language/ja/topic.json index 8b96257f6a..4e3089c294 100644 --- a/public/language/ja/topic.json +++ b/public/language/ja/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/ko/topic.json b/public/language/ko/topic.json index 9b792bea19..3a0319e903 100644 --- a/public/language/ko/topic.json +++ b/public/language/ko/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "최신 순으로 정렬", "most_votes": "추천수 순으로 정렬", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/lt/topic.json b/public/language/lt/topic.json index df43294896..c5820d3815 100644 --- a/public/language/lt/topic.json +++ b/public/language/lt/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Nuo naujausių iki seniausių", "most_votes": "Daugiausiai balsų", "most_posts": "Daugiausia įrašų", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/ms/topic.json b/public/language/ms/topic.json index d7a1ae3ed9..a432260a2b 100644 --- a/public/language/ms/topic.json +++ b/public/language/ms/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Baru ke Lama", "most_votes": "Terbanyak Undi", "most_posts": "Terbanyak Kiriman", - "stale_topic_warning": "Topik yang anda ingin balas sudah terlalu lama. Adakah anda mahu membuka topik baru, dan merujuk kepada topik ini?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Menyinggung", "custom-flag-reason": "Nyatakan alasan anda" diff --git a/public/language/nb/topic.json b/public/language/nb/topic.json index 5b136c1bc1..70c1ac5ff4 100644 --- a/public/language/nb/topic.json +++ b/public/language/nb/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Nyeste til eldste", "most_votes": "Flest stemmer", "most_posts": "Flest innlegg", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/nl/topic.json b/public/language/nl/topic.json index 27d60cabec..4f19d8089c 100644 --- a/public/language/nl/topic.json +++ b/public/language/nl/topic.json @@ -96,8 +96,12 @@ "newest_to_oldest": "Meest recente berichten bovenaan", "most_votes": "Meeste aantal stemmen", "most_posts": "Meeste aantal reacties", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", - "offensive": "Offensive", - "custom-flag-reason": "Enter a flagging reason" + "offensive": "Onbeleefd", + "custom-flag-reason": "Geef een reden voor de melding." } \ No newline at end of file diff --git a/public/language/pl/topic.json b/public/language/pl/topic.json index 12136112f2..9bc4f6d051 100644 --- a/public/language/pl/topic.json +++ b/public/language/pl/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Najpierw najnowsze", "most_votes": "Najwięcej głosów", "most_posts": "Najwięcej postów", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/pt_BR/topic.json b/public/language/pt_BR/topic.json index 62a30f1e87..3adb66b4da 100644 --- a/public/language/pt_BR/topic.json +++ b/public/language/pt_BR/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Mais Recente para Mais Antigo", "most_votes": "Mais votados", "most_posts": "Mais posts", - "stale_topic_warning": "O tópico que você está tentando responder é muito velho. Gostaria de criar um novo tópico ao invés disso, e referenciá-lo este em sua resposta?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Ofensivo", "custom-flag-reason": "Informe um motivo para a sinalização" diff --git a/public/language/ro/topic.json b/public/language/ro/topic.json index b51b6839e5..d131c5610b 100644 --- a/public/language/ro/topic.json +++ b/public/language/ro/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Noi la Vechi", "most_votes": "Cele mai votate", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/ru/topic.json b/public/language/ru/topic.json index c1a98da3b2..b733f7305a 100644 --- a/public/language/ru/topic.json +++ b/public/language/ru/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "От новых к старым", "most_votes": "По голосам", "most_posts": "По количеству ответов", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/rw/topic.json b/public/language/rw/topic.json index 81defcbb7b..3643a1332e 100644 --- a/public/language/rw/topic.json +++ b/public/language/rw/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Ibya Vuba Ujya ku bya Kera", "most_votes": "Amajwi yiganje", "most_posts": "Ibyashyizweho byiganje", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/sc/topic.json b/public/language/sc/topic.json index be840735e2..bda28ac947 100644 --- a/public/language/sc/topic.json +++ b/public/language/sc/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/sk/topic.json b/public/language/sk/topic.json index 9a81d85cb4..339f492c94 100644 --- a/public/language/sk/topic.json +++ b/public/language/sk/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/sl/topic.json b/public/language/sl/topic.json index 251fb6206d..f2b6ea8b6a 100644 --- a/public/language/sl/topic.json +++ b/public/language/sl/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Od novejšega do starejšega", "most_votes": "Največ glasov", "most_posts": "Največ objav", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/sr/topic.json b/public/language/sr/topic.json index 59bd1d8d5e..413f764d39 100644 --- a/public/language/sr/topic.json +++ b/public/language/sr/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/sv/topic.json b/public/language/sv/topic.json index 457ae21aeb..8d644154ee 100644 --- a/public/language/sv/topic.json +++ b/public/language/sv/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Nyaste till äldst", "most_votes": "Mest röster", "most_posts": "Felst inlägg", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/th/topic.json b/public/language/th/topic.json index 8b394ab8f1..ea1b8c1abd 100644 --- a/public/language/th/topic.json +++ b/public/language/th/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Newest to Oldest", "most_votes": "Most votes", "most_posts": "Most posts", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/tr/topic.json b/public/language/tr/topic.json index 81fd9410a7..d8f6627461 100644 --- a/public/language/tr/topic.json +++ b/public/language/tr/topic.json @@ -25,7 +25,7 @@ "tools": "Araçlar", "flag": "Bayrak", "locked": "Kilitli", - "bookmark_instructions": "Click here to return to the last unread post in this thread.", + "bookmark_instructions": "Bu başlıkta okuduğun en son iletiye gitmek için buraya tıklayınız", "flag_title": "Bu iletiyi moderatöre haber et", "flag_success": "Bu ileti yöneticilere bildirildi.", "deleted_message": "Bu başlık silindi. Sadece başlık düzenleme yetkisi olan kullanıcılar görebilir.", @@ -96,8 +96,12 @@ "newest_to_oldest": "En yeniden en eskiye", "most_votes": "En çok oy", "most_posts": "En sık yayın", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", - "spam": "Spam", - "offensive": "Offensive", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", + "spam": "Gereksiz", + "offensive": "Saldırgan", "custom-flag-reason": "Şikayetinizin nedenini girin" } \ No newline at end of file diff --git a/public/language/vi/topic.json b/public/language/vi/topic.json index a2a3faa507..e2d2933e0f 100644 --- a/public/language/vi/topic.json +++ b/public/language/vi/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "Mới đến cũ", "most_votes": "Bình chọn nhiều nhất", "most_posts": "Có nhiều bài viết nhất", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/zh_CN/topic.json b/public/language/zh_CN/topic.json index 38417d8500..f5a3f1398d 100644 --- a/public/language/zh_CN/topic.json +++ b/public/language/zh_CN/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "从新到旧", "most_votes": "最多投票", "most_posts": "最多回复", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" diff --git a/public/language/zh_TW/topic.json b/public/language/zh_TW/topic.json index 53907479a5..bf69262e75 100644 --- a/public/language/zh_TW/topic.json +++ b/public/language/zh_TW/topic.json @@ -96,7 +96,11 @@ "newest_to_oldest": "從新到舊", "most_votes": "得票最多", "most_posts": "最多post", - "stale_topic_warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.title": "Create new topic instead?", + "stale.warning": "The topic you are replying to is quite old. Would you like to create a new topic instead, and reference this one in your reply?", + "stale.create": "Create a new topic", + "stale.reply_anyway": "Reply to this topic anyway", + "stale.link_back": "Re: [%1](%2)", "spam": "Spam", "offensive": "Offensive", "custom-flag-reason": "Enter a flagging reason" From c55abdd095cb73824158eae32f7a3598812fabe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 13 Nov 2015 17:45:23 -0500 Subject: [PATCH 7/7] closes #3815 --- public/src/variables.js | 5 ++--- src/middleware/render.js | 6 ++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/src/variables.js b/public/src/variables.js index 6b443caa5d..9f303852c3 100644 --- a/public/src/variables.js +++ b/public/src/variables.js @@ -6,10 +6,9 @@ ajaxify.variables = {}; ajaxify.variables.parse = function() { - var dataEl = $('#content [ajaxify-data]'); + var dataEl = $('#content #ajaxify-data'); if (dataEl.length) { - ajaxify.data = JSON.parse(decodeURIComponent(dataEl.attr('ajaxify-data'))); - dataEl.remove(); + ajaxify.data = JSON.parse(dataEl.text()); } }; }(ajaxify || {})); diff --git a/src/middleware/render.js b/src/middleware/render.js index 4cf5567ae8..eecfe4d55c 100644 --- a/src/middleware/render.js +++ b/src/middleware/render.js @@ -45,13 +45,15 @@ module.exports = function(middleware) { fn = defaultFn; } - var ajaxifyData = encodeURIComponent(JSON.stringify(options)); + var ajaxifyData = JSON.stringify(options); + render.call(self, template, options, function(err, str) { if (err) { return fn(err); } + + str = str + ''; - str = str + ''; str = (res.locals.postHeader ? res.locals.postHeader : '') + str + (res.locals.preFooter ? res.locals.preFooter : ''); if (res.locals.footer) {