diff --git a/isso/js/app/i18n.js b/isso/js/app/i18n.js index cc841d0..7b12980 100644 --- a/isso/js/app/i18n.js +++ b/isso/js/app/i18n.js @@ -55,7 +55,9 @@ define(["app/config", "app/i18n/de", "app/i18n/en", "app/i18n/fr", "app/i18n/ru" var msg; msg = translate(msgid); - msg = plural(msg.split("\n"), (+ n)); + if (msg.indexOf("\n") > -1) { + msg = plural(msg.split("\n"), (+ n)); + } return msg ? msg.replace("{{ n }}", (+ n)) : msg; }; diff --git a/isso/js/app/i18n/de.js b/isso/js/app/i18n/de.js index 98c4d61..524d324 100644 --- a/isso/js/app/i18n/de.js +++ b/isso/js/app/i18n/de.js @@ -15,7 +15,7 @@ define({ "comment-deleted": "Kommentar gelöscht.", "comment-queued": "Kommentar muss noch freigeschaltet werden.", "comment-anonymous": "Anonym", - "comment-hidden": "{{ hidden_replies }} versteckt", + "comment-hidden": "{{ n }} versteckt", "date-now": "eben jetzt", "date-minute": "vor einer Minute\nvor {{ n }} Minuten", "date-hour": "vor einer Stunde\nvor {{ n }} Stunden", diff --git a/isso/js/app/i18n/en.js b/isso/js/app/i18n/en.js index b29deab..ec4b4d0 100644 --- a/isso/js/app/i18n/en.js +++ b/isso/js/app/i18n/en.js @@ -18,7 +18,7 @@ define({ "comment-deleted": "Comment deleted.", "comment-queued": "Comment in queue for moderation.", "comment-anonymous": "Anonymous", - "comment-hidden": "{{ hidden_replies }} Hidden", + "comment-hidden": "{{ n }} Hidden", "date-now": "right now", "date-minute": "a minute ago\n{{ n }} minutes ago", diff --git a/isso/js/app/i18n/fr.js b/isso/js/app/i18n/fr.js index 19d71a6..052c51a 100644 --- a/isso/js/app/i18n/fr.js +++ b/isso/js/app/i18n/fr.js @@ -15,7 +15,7 @@ define({ "comment-deleted": "Commentaire supprimé.", "comment-queued": "Commentaire en attente de modération.", "comment-anonymous": "Anonyme", - "comment-hidden": "1 caché\n{{ hidden_replies }} cachés", + "comment-hidden": "1 caché\n{{ n }} cachés", "date-now": "À l'instant'", "date-minute": "Il y a une minute \n{{ n }} minutes", "date-hour": "Il y a une heure\n{{ n }} heures ", diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index 70b2511..5b54bc6 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -54,16 +54,16 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n", return el; }; - var insert_loader = function(commentWrapper, lastcreated) { + var insert_loader = function(comment, lastcreated) { var entrypoint; - if (commentWrapper.id === null) { + if (comment.id === null) { entrypoint = $("#isso-root"); - commentWrapper.name = 'null'; + comment.name = 'null'; } else { - entrypoint = $("#isso-" + commentWrapper.id + " > .text-wrapper > .isso-follow-up"); - commentWrapper.name = commentWrapper.id; + entrypoint = $("#isso-" + comment.id + " > .text-wrapper > .isso-follow-up"); + comment.name = comment.id; } - var el = $.htmlify(jade.render("comment_loader", {"comment": commentWrapper})); + var el = $.htmlify(jade.render("comment-loader", {"comment": comment})); entrypoint.append(el); @@ -72,7 +72,7 @@ define(["app/dom", "app/utils", "app/config", "app/api", "app/jade", "app/i18n", el.remove(); api.fetch($("#isso-thread").getAttribute("data-isso-id"), config["reveal-on-click"], config["max-comments-nested"], - commentWrapper.id, + comment.id, lastcreated).then( function(rv) { if (rv.total_replies === 0) {