fix pagination translations and pluralization
If a message does not contain '\n', pluralize is not called. Also replace {{ hidden_replies }} with {{ n }}.
This commit is contained in:
parent
cff9cabe9a
commit
96206b110c
@ -55,7 +55,9 @@ define(["app/config", "app/i18n/de", "app/i18n/en", "app/i18n/fr", "app/i18n/ru"
|
||||
var msg;
|
||||
|
||||
msg = translate(msgid);
|
||||
if (msg.indexOf("\n") > -1) {
|
||||
msg = plural(msg.split("\n"), (+ n));
|
||||
}
|
||||
|
||||
return msg ? msg.replace("{{ n }}", (+ n)) : msg;
|
||||
};
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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 ",
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user