Fix note status string to be translateable

(closes #5189)
This commit is contained in:
Bryan Housel
2018-07-28 19:27:31 +02:00
parent 4e2f2fad8d
commit 5c7784fb0b
3 changed files with 14 additions and 1 deletions

View File

@@ -634,6 +634,11 @@ en:
anonymous: anonymous
closed: "(Closed)"
commentTitle: Comments
status:
opened: "opened {when}"
reopened: "reopened {when}"
commented: "commented {when}"
closed: "closed {when}"
newComment: New Comment
inputPlaceholder: Enter a comment to share with other users.
close: Close Note

View File

@@ -770,6 +770,12 @@
"anonymous": "anonymous",
"closed": "(Closed)",
"commentTitle": "Comments",
"status": {
"opened": "opened {when}",
"reopened": "reopened {when}",
"commented": "commented {when}",
"closed": "closed {when}"
},
"newComment": "New Comment",
"inputPlaceholder": "Enter a comment to share with other users.",
"close": "Close Note",

View File

@@ -61,7 +61,9 @@ export function uiNoteComments() {
metadataEnter
.append('div')
.attr('class', 'comment-date')
.text(function(d) { return d.action + ' ' + localeDateString(d.date); });
.text(function(d) {
return t('note.status.' + d.action, { when: localeDateString(d.date) });
});
mainEnter
.append('div')