From 80e8ce7e2563e563edaea11988ea8005645c7ed1 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Thu, 3 Oct 2013 13:48:38 +0200 Subject: [PATCH] more i18n --- isso/js/app/i18n/de.js | 5 ++++- isso/js/app/i18n/en.js | 7 +++++-- isso/js/app/isso.js | 8 +++++--- isso/js/app/text/comment.html | 12 +++++++----- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/isso/js/app/i18n/de.js b/isso/js/app/i18n/de.js index 590b805..655719a 100644 --- a/isso/js/app/i18n/de.js +++ b/isso/js/app/i18n/de.js @@ -2,7 +2,7 @@ define({ "postbox-text" : "Kommentar hier eintippen (mindestens 3 Zeichen)", "postbox-author" : "Name (optional)", "postbox-email" : "Email (optional)", - "postbox-submit": "Abschicken.", + "postbox-submit": "Abschicken", "num-comments": "1 Kommentar\n{{ n }} Kommentare", "no-comments": "Keine Kommentare bis jetzt", @@ -11,6 +11,9 @@ define({ "comment-delete": "Löschen", "comment-confirm": "Bestätigen", "comment-close": "Schließen", + "comment-deleted": "Kommentar gelöscht.", + "comment-queued": "Kommentar muss noch freigeschaltet werden.", + "comment-anonymous": "Anonym", "date-now": "eben jetzt", "date-minute": "vor einer Minute\nvor {{ n }} Minuten", diff --git a/isso/js/app/i18n/en.js b/isso/js/app/i18n/en.js index 5dcd14e..14edf94 100644 --- a/isso/js/app/i18n/en.js +++ b/isso/js/app/i18n/en.js @@ -2,7 +2,7 @@ define({ "postbox-text": "Type Comment Here (at least 3 chars)", "postbox-author": "Name (optional)", "postbox-email": "E-mail (optional)", - "postbox-submit": "Post Comment.", + "postbox-submit": "Submit", "num-comments": "One Comment\n{{ n }} Comments", "no-comments": "No Comments Yet", @@ -11,8 +11,11 @@ define({ "comment-delete": "Delete", "comment-confirm": "Confirm", "comment-close": "Close", + "comment-deleted": "Comment deleted.", + "comment-queued": "Comment in queue for moderation.", + "comment-anonymous": "Anonymous", - "date-now": "now", + "date-now": "right now", "date-minute": "a minute ago\n{{ n }} minutes ago", "date-hour": "an hour ago\n{{ n }} hours ago", "date-day": "Yesterday\n{{ n }} days ago", diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index a84846f..0c1361a 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -127,7 +127,8 @@ define(["behave", "app/text/html", "app/dom", "app/utils", "app/api", "app/marku } var footer = $("#isso-" + comment.id + " > .text-wrapper > footer"), - header = $("#isso-" + comment.id + " > .text-wrapper > header"); + header = $("#isso-" + comment.id + " > .text-wrapper > header"), + text = $("#isso-" + comment.id + " > .text-wrapper > div.text"); var form = new Postbox(comment.id); $("a.reply", footer).on("click", function() { @@ -135,6 +136,7 @@ define(["behave", "app/text/html", "app/dom", "app/utils", "app/api", "app/marku $("a.reply", footer), function(reply) { footer.insertAfter(form); + $("textarea", form).focus(); reply.textContent = msgs["comment-close"]; }, function(reply) { @@ -195,8 +197,8 @@ define(["behave", "app/text/html", "app/dom", "app/utils", "app/api", "app/marku if (rv) { el.remove(); } else { - $("span.note", el).textContent = "Kommentar gelöscht."; - $(".text", el).innerHTML = "

 

"; + $("span.note", header).textContent = msgs["comment-deleted"]; + text.innerHTML = "

 

"; } }); } else { diff --git a/isso/js/app/text/comment.html b/isso/js/app/text/comment.html index f440663..38f6874 100644 --- a/isso/js/app/text/comment.html +++ b/isso/js/app/text/comment.html @@ -6,17 +6,19 @@
{{ if bool(website) }} - {{ author | blank : Anonymous }} + {{ author | blank : `i18n-comment-anonymous` }} {{ else }} - {{ author | blank : Anonymous }} + {{ author | blank : `i18n-comment-anonymous` }} {{ /if }} {{ if parent }} - {{ svg-forward }}{{ replyto }} + + {{ svg-forward }}{{ replyto | blank: `i18n-comment-anonymous` }} + {{ /if }} @@ -27,10 +29,10 @@ {{ if mode | equals : 2 }} - Kommentar muss noch freigeschaltet werden. + {{ i18n-comment-queued }} {{ /if }} {{ if mode | equals : 4 }} - Kommentar gelöscht. + {{ i18n-comment-deleted }} {{ /if }}