From 5236774824e40104a48f3244a546716fa9a50caa Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Tue, 30 Apr 2019 15:21:44 -0300 Subject: [PATCH] Improve i18n of threads and discussion buttons (#14334) --- app/ui-message/client/message.html | 4 ++-- app/ui-message/client/message.js | 12 ++++-------- packages/rocketchat-i18n/i18n/en.i18n.json | 8 ++++++-- packages/rocketchat-i18n/i18n/pt-BR.i18n.json | 6 +++++- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/ui-message/client/message.html b/app/ui-message/client/message.html index f14b1cdbf0dc..571b6e7bdce8 100644 --- a/app/ui-message/client/message.html +++ b/app/ui-message/client/message.html @@ -90,7 +90,7 @@ {{#if $gt msg.dcount 0}} {{else}} {{ formatDateAndTime msg.tlm}} diff --git a/app/ui-message/client/message.js b/app/ui-message/client/message.js index eed63462363d..00d00e16f778 100644 --- a/app/ui-message/client/message.js +++ b/app/ui-message/client/message.js @@ -74,17 +74,13 @@ Template.message.helpers({ and(a, b) { return a && b; }, - i18nKeyMessage() { + i18nReplyCounter() { const { msg } = this; - return msg.dcount > 1 - ? 'messages' - : 'message'; + return `${ msg.tcount }`; }, - i18nKeyReply() { + i18nDiscussionCounter() { const { msg } = this; - return msg.tcount > 1 - ? 'replies' - : 'reply'; + return `${ msg.dcount }`; }, formatDateAndTime, encodeURI(text) { diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json index c40568b7c598..4c97ae5e337e 100644 --- a/packages/rocketchat-i18n/i18n/en.i18n.json +++ b/packages/rocketchat-i18n/i18n/en.i18n.json @@ -1993,6 +1993,8 @@ "Message_AudioRecorderEnabled_Description": "Requires 'audio/mp3' files to be an accepted media type within 'File Upload' settings.", "Message_BadWordsFilterList": "Add Bad Words to the Blacklist", "Message_BadWordsFilterListDescription": "Add List of Comma-separated list of bad words to filter", + "message_counter": "__counter__ message", + "message_counter_plural": "__counter__ messages", "Message_DateFormat": "Date Format", "Message_DateFormat_Description": "See also: Moment.js", "Message_deleting_blocked": "This message cannot be deleted anymore", @@ -2426,8 +2428,10 @@ "Removed": "Removed", "Removed_User": "Removed User", "Replied_on": "Replied on", - "Replies": "Replies", "Reply": "Reply", + "reply_counter": "__counter__ reply", + "reply_counter_plural": "__counter__ replies", + "Replies": "Replies", "Reply_in_thread": "Reply in Thread", "Reply_in_direct_message": "Reply in Direct Message", "ReplyTo": "Reply-To", @@ -3242,4 +3246,4 @@ "Your_question": "Your question", "Your_server_link": "Your server link", "Your_workspace_is_ready": "Your workspace is ready to use 🎉" -} \ No newline at end of file +} diff --git a/packages/rocketchat-i18n/i18n/pt-BR.i18n.json b/packages/rocketchat-i18n/i18n/pt-BR.i18n.json index 7c7c523bef1b..97626a9688bc 100644 --- a/packages/rocketchat-i18n/i18n/pt-BR.i18n.json +++ b/packages/rocketchat-i18n/i18n/pt-BR.i18n.json @@ -1957,6 +1957,8 @@ "Message_AudioRecorderEnabled_Description": "Requer arquivos 'audio / mp3' para ser um tipo de mídia aceito dentro das configurações 'Upload de arquivo'.", "Message_BadWordsFilterList": "Adicione palavrões para a lista negra", "Message_BadWordsFilterListDescription": "Adicione palavrões separados por vírgula para filtrar", + "message_counter": "__counter__ mensagem", + "message_counter_plural": "__counter__ mensagens", "Message_DateFormat": "Formato de Data", "Message_DateFormat_Description": "Veja também: Moment.js", "Message_deleting_blocked": "Esta mensagem não pode ser mais apagada", @@ -2380,6 +2382,8 @@ "Removed_User": "Usuário removido", "Replies": "Respostas", "Reply": "Responder", + "reply_counter": "__counter__ reposta", + "reply_counter_plural": "__counter__ respostas", "ReplyTo": "Responder para", "Report_Abuse": "Denunciar abuso", "Report_exclamation_mark": "Relatar!", @@ -3174,4 +3178,4 @@ "Your_question": "A sua pergunta", "Your_server_link": "O link do seu servidor", "Your_workspace_is_ready": "O seu espaço de trabalho está pronto a usar 🎉" -} \ No newline at end of file +}