Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX]Review the translation of the livechat #9966

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion packages/rocketchat-i18n/i18n/pt-BR.i18n.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion packages/rocketchat-livechat/.app/client/lib/commands.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* globals LivechatVideoCall, Livechat, swal */
import _ from 'underscore';
import visitor from '../../imports/client/visitor';

// Functions to call on messages of type 'command'
Expand All @@ -17,10 +18,11 @@ this.Commands = {
if (Livechat.transcript) {
const visitorData = visitor.getData();
const email = visitorData && visitorData.visitorEmails && visitorData.visitorEmails.length > 0 ? visitorData.visitorEmails[0].address : '';
const transcriptMessage = (!_.isEmpty(Livechat.transcriptMessage)) ? Livechat.transcriptMessage : (TAPi18n.__('Would_you_like_a_copy_if_this_chat_emailed'));

swal({
title: t('Chat_ended'),
text: Livechat.transcriptMessage,
text: transcriptMessage,
type: 'input',
inputValue: email,
showCancelButton: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</svg>
{{/if}}
{{#unless popoutActive}}
<svg class="popout" aria-label="{{_ "Open in a new window"}}" viewBox="0 0 448 448" xmlns="http://www.w3.org/2000/svg">
<svg class="popout" aria-label="{{_ "Open_in_a_new_window"}}" viewBox="0 0 448 448" xmlns="http://www.w3.org/2000/svg">
<path d="M320 232v-120c0-8.75-7.25-16-16-16h-120c-6.5 0-12.25 4-14.75 9.75-2.5 6-1.25 13 3.5 17.5l36 36-133.5 133.5c-6.25 6.25-6.25 16.25 0 22.5l25.5 25.5c6.25 6.25 16.25 6.25 22.5 0l133.5-133.5 36 36c3 3.25 7 4.75 11.25 4.75 2 0 4.25-0.5 6.25-1.25 5.75-2.5 9.75-8.25 9.75-14.75zM384 104v240c0 39.75-32.25 72-72 72h-240c-39.75 0-72-32.25-72-72v-240c0-39.75 32.25-72 72-72h240c39.75 0 72 32.25 72 72z"></path>
</svg>
{{/unless}}
Expand Down
4 changes: 2 additions & 2 deletions packages/rocketchat-livechat/.app/client/views/loading.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template name="loading">
<div class="loading-animation">
{{_ "Connecting to an Agent"}}
{{_ "Connecting_to_an_Agent"}}
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
</template>
</template>
3 changes: 3 additions & 0 deletions packages/rocketchat-livechat/.app/client/views/offlineForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Template.offlineForm.helpers({
messageSent() {
return Template.instance().messageSent.get();
},
offlineMessage() {
return (!_.isEmpty(this.offlineMessage)) ? this.offlineMessage.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br>$2') : TAPi18n.__('We_are_not_online_right_now_please_leave_a_message');
},
offlineSuccessMessage() {
if (!_.isEmpty(this.offlineSuccessMessage)) {
return this.offlineSuccessMessage.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br>$2');
Expand Down
15 changes: 13 additions & 2 deletions packages/rocketchat-livechat/.app/i18n/en.i18n.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Additional_Feedback": "Additional Feedback",
"and": "and",
"Appearance": "Appearance",
"Are_you_sure_do_you_want_end_this_chat": "Are you sure you want to end this chat?",
"Are_you_sure_do_you_want_end_this_chat_and_switch_department": "Are you sure you want to end this chat and switch department?",
Expand All @@ -8,24 +9,32 @@
"Chat_ended": "Chat ended!",
"Choose_a_new_department": "Choose a new department",
"Close_menu": "Close menu",
"Connecting_to_an_Agent": "Connecting to an Agent",
"Conversation_finished": "Conversation finished",
"Department_switched": "Department switched",
"edited": "edited",
"End_chat": "End chat",
"How_friendly_was_the_chat_agent": "How friendly was the chat agent?",
"How_knowledgeable_was_the_chat_agent": "How knowledgeable was the chat agent?",
"How_responsive_was_the_chat_agent": "How responsive was the chat agent?",
"How_satisfied_were_you_with_this_chat": "How satisfied were you with this chat?",
"Installation": "Installation",
"is_also_typing": "is also typing",
"is_also_typing_female": "is also typing",
"is_also_typing_male": "is also typing",
"is_typing": "is typing",
"New_messages": "New messages",
"No": "No",
"Open_in_a_new_window": "Open in a new window",
"Options": "Options",
"Others": "others",
"Please_answer_survey": "Please take a moment to answer a quick survey about this chat",
"Please_choose_a_department": "Please choose a department",
"Please_fill_name_and_email": "Please fill name and email",
"Powered_by": "Powered by",
"Request_video_chat": "Request video chat",
"Select_a_department": "Select a department",
"Switch_department": "Switch department",
"Department_switched": "Department switched",
"Send": "Send",
"Skip": "Skip",
"Start_Chat": "Start Chat",
Expand All @@ -39,8 +48,10 @@
"Type_your_name": "Type your name",
"User_joined": "User joined",
"User_left": "User left",
"We_are_not_online_right_now_please_leave_a_message": "We are not online right now. Please leave us a message",
"We_are_offline_Sorry_for_the_inconvenience": "We are offline. Sorry for the inconvenience.",
"Would_you_like_a_copy_if_this_chat_emailed": "Would you like a copy of this chat emailed?",
"Yes": "Yes",
"You": "You",
"You_must_complete_all_fields": "You must complete all fields"
}
}
19 changes: 18 additions & 1 deletion packages/rocketchat-livechat/.app/i18n/pt-BR.i18n.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
{
"Additional_Feedback": "Feedback Adicional",
"and": "e",
"Appearance": "Aparência",
"Are_you_sure_do_you_want_end_this_chat": "Você tem certeza que deseja encerrar?",
"Are_you_sure_do_you_want_end_this_chat_and_switch_department": "Você Tem certeza que deseja encerrar este chat e mudar o departamento?",
"Cancel": "Cancelar",
"Change": "Alterar",
"Chat_ended": "Chat encerrado!",
"Choose_a_new_department": "Escolha um novo departamento",
"Close_menu": "Fechar menu",
"Connecting_to_an_Agent": "Conectando-se a um Agente",
"Conversation_finished": "Chat encerrado",
"Department_switched": "departamento alterado",
"edited": "editado",
"End_chat": "Encerrar chat",
"How_friendly_was_the_chat_agent": "Quão amigável foi o agente de bate-papo?",
"How_knowledgeable_was_the_chat_agent": "Quão bem informado foi o agente bate-papo?",
"How_responsive_was_the_chat_agent": "Quão responsivo foi o agente de bate-papo?",
"How_satisfied_were_you_with_this_chat": "Você ficou satisfeito com este bate-papo?",
"Installation": "Instalação",
"is_also_typing": "também está digitando",
"is_also_typing_female": "também está digitando",
"is_also_typing_male": "também está digitando",
"is_typing": "está digitando",
"New_messages": "Novas mensagens",
"No": "Não",
"Open_in_a_new_window": "Abrir em uma nova janela",
"Options": "Opções",
"others": "Outros",
"Please_answer_survey": "Por favor, nos dê um momento para responder uma rápida pesquisa sobre este chat",
"Please_choose_a_department": "Por favor escolha um departamento",
"Please_fill_name_and_email": "Por favor, preencha nome e email",
"Powered_by": "Distribuído por",
"Request_video_chat": "Solicitar vídeoconferência",
"Select_a_department": "Selecione um departamento",
"Switch_department": "Mudar departamento",
"Send": "Enviar",
"Skip": "Pular",
"Start_Chat": "Iniciar bate-papo",
Expand All @@ -33,8 +48,10 @@
"Type_your_name": "Digite seu nome",
"User_joined": "Usuário entrou",
"User_left": "Usuário saiu",
"We_are_not_online_right_now_please_leave_a_message": "Nós não estamos online neste momento. Por favor deixe-nos uma mensagem",
"We_are_offline_Sorry_for_the_inconvenience": "Nós estamos offline. Desculpe pelo inconveniente.",
"Would_you_like_a_copy_if_this_chat_emailed": "Você gostaria de receber uma cópia deste chat por e-mail?",
"Yes": "Sim",
"You": "Você",
"You_must_complete_all_fields": "Você deve preencher todos os campos"
}
}
7 changes: 5 additions & 2 deletions packages/rocketchat-livechat/.app/i18n/pt.i18n.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"Additional_Feedback": "Feedback Adicional",
"and": "e",
"Appearance": "Aparência",
"Are_you_sure_do_you_want_end_this_chat": "Você tem certeza que deseja encerrar?",
"Are_you_sure_do_you_want_end_this_chat_and_switch_department": "Tem a certeza que deseja terminar este chat e mudar o departamento?",
Expand All @@ -8,7 +9,10 @@
"Chat_ended": "Chat encerrado!",
"Choose_a_new_department": "Escolha um novo departamento",
"Close_menu": "Fechar menu",
"Connecting_to_an_Agent": "Conectando-se a um Agente",
"Conversation_finished": "Chat encerrado",
"Department_switched": "Departamento alterado",
"edited": "editado",
"End_chat": "Encerrar chat",
"How_friendly_was_the_chat_agent": "Quão amigável foi o agente de bate-papo?",
"How_knowledgeable_was_the_chat_agent": "Quão conhecedor foi o agente bate-papo?",
Expand All @@ -25,7 +29,6 @@
"Request_video_chat": "Solicitar vídeoconferência",
"Select_a_department": "Selecione um departamento",
"Switch_department": "Mudar departamento",
"Department_switched": "Departamento alterado",
"Send": "Enviar",
"Skip": "Pular",
"Start_Chat": "Iniciar bate-papo",
Expand All @@ -43,4 +46,4 @@
"Yes": "Sim",
"You": "Você",
"You_must_complete_all_fields": "Você deve preencher todos os campos"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Template.livechatOfficeHours.helpers({

},
name(day) {
return day.day;
return TAPi18n.__(day.day);
},
open(day) {
return Template.instance().dayVars[day.day].open.get();
Expand Down
4 changes: 2 additions & 2 deletions packages/rocketchat-livechat/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Meteor.startup(function() {
section: 'Offline',
i18nLabel: 'Color'
});
RocketChat.settings.add('Livechat_offline_message', 'We are not online right now. Please leave us a message:', {
RocketChat.settings.add('Livechat_offline_message', '', {
type: 'string',
group: 'Livechat',
public: true,
Expand Down Expand Up @@ -209,7 +209,7 @@ Meteor.startup(function() {
i18nLabel: 'Transcript_Enabled'
});

RocketChat.settings.add('Livechat_transcript_message', 'Would you like a copy of this chat emailed?', {
RocketChat.settings.add('Livechat_transcript_message', '', {
type: 'string',
group: 'Livechat',
public: true,
Expand Down