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

Added pt-PT localization. #2015

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion LOCALIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If you want to help to translate Web Chat to different language, please submit a
| nl-nl | @iMicknl |
| pl-pl | @peterblazejewicz |
| pt-br | @rcarubbi, @pedropacheco92|
| pt-pt | @bodyzatva |
| pt-pt | @bodyzatva, @tiagodenoronha|
| ru-ru | @odysseus1973, @seaen |
| sv-se | @pekspro |
| tr-tr | |
Expand Down
50 changes: 35 additions & 15 deletions packages/component/src/Localization/pt-PT.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ function xMinutesAgo(dateStr) {
} else if (deltaInMinutes === 1) {
return 'Um minuto atrás';
} else if (deltaInHours < 1) {
return `${ deltaInMinutes } minutos atrás`;
return `${deltaInMinutes} minutos atrás`;
} else if (deltaInHours === 1) {
return `Uma hora atrás`;
} else if (deltaInHours < 5) {
return `${ deltaInHours } horas atrás`;
return `${deltaInHours} horas atrás`;
} else if (deltaInHours <= 24) {
return `Hoje`;
} else if (deltaInHours <= 48) {
Expand All @@ -41,26 +41,46 @@ function xMinutesAgo(dateStr) {
});
}

function botSaidSomething(avatarInitials, text, timestamp) {
return `Bot ${avatarInitials} disse, ${text}, ${xMinutesAgo(timestamp)}`;
}

function userSaidSomething(avatarInitials, text, timestamp) {
return `User ${avatarInitials} disse, ${text}, ${xMinutesAgo(timestamp)}`;
}

export default {
// FAILED_CONNECTION_NOTIFICATION: '',
FAILED_CONNECTION_NOTIFICATION: 'Não foi possível ligar.',
INITIAL_CONNECTION_NOTIFICATION: 'A ligar…',
INTERRUPTED_CONNECTION_NOTIFICATION: 'Interrupção de Rede. Reconectando…',
// Do not localize {Retry}; it is a placeholder for "Retry". English translation should be, "Send failed. Retry."
SEND_FAILED_KEY: 'não foi possível enviar, {Retry}.',
SLOW_CONNECTION_NOTIFICATION: 'A ligação está a demorar mais tempo que o normal.',
RENDER_ERROR_NOTIFICATION: 'Ocorreu um erro a renderizar. Por favor verifique a consola ou contacte o developer do bot.',
SEND_FAILED_KEY: 'O envio falhou. {Retry}.',
SLOW_CONNECTION_NOTIFICATION: 'A ligação está a demorar mais tempo que o normal',
'Bot said something': botSaidSomething,
'User said something': userSaidSomething,
'X minutes ago': xMinutesAgo,
// '[File of type '%1']': '[File of type '%1']",
// '[Unknown Card '%1']': '[Unknown Card '%1']',
'Adaptive Card parse error': 'Erro ao fazer parse do Adaptive Card',
'Adaptive Card render error': 'Erro ao renderizar o Adaptive Card',
'Chat': 'Chat',
'Download file': 'Download ficheiro',
'Microphone off': 'Microfone desligado',
'Microphone on': 'Microfone ligado',
'Listening…': 'A Escutar…',
'retry': 'repetir',
'Retry': '{retry}', // Please alter this value if 'Retry' at the beginning of a sentence is written differently than at the end of a sentence.
'Download file': 'Descarregar ficheiro',
'Microphone off': 'Desligar microfone',
'Microphone on': 'Ligar microfone',
'Left': 'Esquerda',
'Listening…': 'A escutar…',
'New messages': 'Novas mensagens',
'Right': 'Direita',
'retry': 'tentar novamente',
'Retry': 'Tentar novamente',
'Send': 'Enviar',
'Sending': 'a enviar',
'Sending': 'A enviar',
'Speak': 'Falar',
'Starting…': 'A iniciar…',
'Tax': 'Imposto',
'Total': 'Total',
'Type your message': 'Escreva a sua mensagem',
'Upload file': 'Upload de ficheiro',
'VAT': 'IVA',
'X minutes ago': xMinutesAgo
'Upload file': 'Enviar ficheiro',
'VAT': 'IVA'
}