Support for Brazilian Portuguese (#564)

This commit is contained in:
Sarah Jamie Lewis 2022-11-18 06:21:32 -08:00
parent d4a87cd416
commit 25e1300b2b
19 changed files with 77 additions and 47 deletions

View File

@ -1,6 +1,7 @@
{
"@@locale": "cy",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "da",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "de",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "el",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "en",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "es",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "fr",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "it",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"tooltipPinConversation": "Aggiungi la conversazione in cima alla lista \"Conversazioni\"",
"tooltipUnpinConversation": "Rimuovi la conversazione dalla cima della lista \"Conversazioni\"",

View File

@ -1,6 +1,7 @@
{
"@@locale": "lb",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,18 +1,19 @@
{
"@@locale": "nl",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"acquiredTicketsFromServer": "Anti-spam uitdaging voltooid",
"acquiringTicketsFromServer": "Anti-spam uitdaging uitvoeren",
"acknowledgedLabel": "Erkend",
"descriptionFileSharing": "Het experiment met het delen van bestanden staat u toe om bestanden van Cwtch-contactpersonen en groepen te verzenden en te ontvangen. Merk op dat het delen van een bestand met een groep tot gevolg zal hebben dat leden van die groep direct via Cwtch verbinding met je maken om het bestand te downloaden.",
"descriptionExperimentsGroups": "Het groepsexperiment staat Cwtch toe verbinding te maken met onvertrouwde serverinfrastructuur om communicatie met meer dan één contact te vergemakkelijken.",
"notificationPolicyDefaultAll": "Standaard Alle",
"conversationNotificationPolicyOptIn": "Opt-In",
"acquiringTicketsFromServer": "Antispamuitdaging uitvoeren",
"settingAndroidPowerExemption": "Android negeer batterij-optimalisaties",
"experimentQRCodeDescription": "Ondersteuning voor QR-codes maakt het delen van gegevens (zoals profielidentiteit) via QR-codes mogelijk",
"tooltipSelectACustomProfileImage": "Selecteer een zelf ingestelde profielafbeelding",
"settingsAndroidPowerReenablePopup": "Batterijoptimalisatie kan niet opnieuw worden ingeschakeld vanuit Cwtch. Ga naar Android \/ Instellingen \/ Apps \/ Cwtch \/ Batterij en stel Gebruik in op 'Geoptimaliseerd'",
"settingAndroidPowerExemptionDescription": "Optioneel: Vraag Android om geen geoptimaliseerd energiebeheer te gebruiken voor Cwtch. Dit zal resulteren in een betere stabiliteit ten koste van meer batterijgebruik.",
"acquiredTicketsFromServer": "Antispamuitdaging voltooid",
"descriptionExperiments": "Cwtch-experimenten zijn optionele, Opt-In functies die extra functionaliteit toevoegen aan Cwtch die andere privacyoverwegingen kunnen hebben dan traditionele 1: 1 metadata-resistente chat, bijvoorbeeld groepschat, botintegratie enz.",
"plainProfileDescription": "We raden aan je Cwtch-profielen te beveiligen met een wachtwoord. Als je geen wachtwoord instelt op dit profiel heeft iedereen die toegang heeft tot dit apparaat mogelijk toegang tot informatie over dit profiel, inclusief gevoelige cryptografische sleutels.",
"plainServerDescription": "We raden aan je Cwtch-servers te beveiligen met een wachtwoord. Als je geen wachtwoord instelt op deze server heeft iedereen die toegang heeft tot dit apparaat mogelijk toegang tot informatie over deze server, inclusief gevoelige cryptografische sleutels.",

View File

@ -1,6 +1,7 @@
{
"@@locale": "no",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "pl",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "pt",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "ptbr",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@locale": "pt_BR",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Português do Brasil \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "O suporte a QR Code permite o compartilhamento de dados (como identidade de perfil) através dos QR Codes",
"enableExperimentQRCode": "QR Codes",
@ -10,7 +11,6 @@
"acquiringTicketsFromServer": "Realizar o desafio anti-spam",
"errorDownloadDirectoryDoesNotExist": "O compartilhamento de arquivos não pode ser ativado porque a Pasta de Download não foi definida, ou está definida para uma pasta que não existe.",
"localeTr": "Turco \/ Türk",
"localeIt": "Italian \/ Italiano",
"tooltipUnpinConversation": "Desafixar conversa a partir do topo de \"Conversations\"",
"tooltipPinConversation": "Fixar conversa para o topo de \"Conversations\"",
"replyingTo": "Responder para %1",
@ -21,21 +21,6 @@
"restartFileShare": "Iniciar compartilhamento de arquivo",
"stopSharingFile": "Parar compartilhamento de arquivo",
"manageSharedFiles": "Gerenciar arquivos compartilhados",
"localeDe": "Alemao \/ Deutsch",
"localeEn": "English \/ English",
"localeLb": "Luxembourgish \/ Lëtzebuergesch",
"localeNo": "Norwegian \/ Norsk",
"localeEl": "Greek \/ Ελληνικά",
"localePl": "Polish \/ Polski",
"localeRo": "Romanian \/ Română",
"localeRU": "Russian \/ Русский",
"localeEs": "Spanish \/ Español",
"localeDa": "Danish \/ Dansk",
"localePt": "Portuguese \/ Portuguesa",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeFr": "French \/ Français",
"localeCy": "Welsh \/ Cymraeg",
"settingImagePreviewsDescription": "Imagens e Fotos de Perfil serão baixadas e visualizadas automaticamente. Recomendamos que você não ative esta Experiência se usar Cwtch com contatos não confiáveis.",
"tooltipPreviewFormatting": "Pré-visualização da formatação da mensagem",
"tooltipCode": "Code \/ Monoespaçado",
"tooltipStrikethrough": "Riscado",
@ -62,6 +47,12 @@
"importProfile": "Importar perfil",
"exportProfileTooltip": "Faça um backup deste perfil em um arquivo criptografado. O arquivo criptografado pode ser importado para outro aplicativo Cwtch.",
"exportProfile": "Exportar Perfil",
"localeDa": "Danish \/ Dansk",
"localeCy": "Welsh \/ Cymraeg",
"localeEl": "Greek \/ Ελληνικά",
"localeNo": "Norwegian \/ Norsk",
"localeLb": "Luxembourgish \/ Lëtzebuergesch",
"localeRo": "Romanian \/ Română",
"newMessageNotificationConversationInfo": "Nova mensagem de %1",
"newMessageNotificationSimple": "Nova Mensagem",
"notificationContentContactInfo": "Informações da Conversa",
@ -115,6 +106,7 @@
"themeNameWitch": "Bruxa",
"themeNameCwtch": "Cwtch",
"settingDownloadFolder": "Pasta para Download",
"settingImagePreviewsDescription": "Imagens e Fotos de Perfil serão baixadas e visualizadas automaticamente. Recomendamos que você não ative esta Experiência se usar Cwtch com contatos não confiáveis.",
"settingImagePreviews": "Pré-visualização de Imagens e Fotos de Perfil",
"experimentClickableLinksDescription": "O experimento de links clicáveis permite que você clique em URLs compartilhadas em mensagens",
"enableExperimentClickableLinks": "Habilitar links clicáveis",
@ -131,6 +123,7 @@
"importLocalServerSelectText": "Selecione Servidor Local",
"importLocalServerLabel": "Importar um servidor hospedado localmente",
"newMessagesLabel": "Novas mensagens",
"localeRU": "Russian \/ Русский",
"copyServerKeys": "Copiar chaves",
"verfiyResumeButton": "Verify\/resume",
"fileCheckingStatus": "Verificando o status do download",
@ -190,6 +183,7 @@
"settingUIColumnSingle": "Único",
"settingUIColumnLandscape": "Colunas da interface em Modo Paisagem",
"settingUIColumnPortrait": "Colunas da interface em Modo Retrato",
"localePl": "Polish \/ Polski",
"tooltipRemoveThisQuotedMessage": "Remover mensagem mencionada",
"tooltipReplyToThisMessage": "Responder esta mensagem",
"tooltipRejectContactRequest": "Rejeitar pedido de contato",
@ -243,6 +237,8 @@
"conversationSettings": "Configurações da Conversa",
"enterCurrentPasswordForDelete": "Por favor entre sua senha atual para deletar este perfil.",
"enableGroups": "Ativar chat em grupo",
"localeIt": "Italian \/ Italiano",
"localeEs": "Spanish \/ Español",
"todoPlaceholder": "Afazer…",
"addNewItem": "Adicionar novo item à lista",
"addListItem": "Adicionar Item à Lista",
@ -264,6 +260,10 @@
"settingTheme": "Use temas claros",
"largeTextLabel": "Grande",
"settingInterfaceZoom": "Nível de zoom",
"localeDe": "Alemao \/ Deutsch",
"localePt": "Portuguese \/ Portuguesa",
"localeFr": "French \/ Français",
"localeEn": "English \/ English",
"settingLanguage": "Linguagem",
"blockUnknownLabel": "Bloquear Contatos Desconhecidos",
"zoomLabel": "Zoom da interface (afeta principalmente tamanho de texto e botões)",
@ -289,7 +289,7 @@
"password1Label": "Senha",
"currentPasswordLabel": "Senha Atual",
"yourDisplayName": "Seu nome de exibição",
"profileOnionLabel": "Envie este endereço para contatos que você deseja se conectar",
"profileOnionLabel": "Send this address to contacts you want to connect with",
"noPasswordWarning": "Não usar uma senha nesta conta significa que todos os dados armazenados localmente não serão criptografados",
"radioNoPassword": "Descriptografado (Sem senha)",
"radioUsePassword": "Senha",
@ -299,13 +299,13 @@
"profileName": "Nome de exibição",
"editProfileTitle": "Editar perfil",
"addProfileTitle": "Adicionar novo perfil",
"deleteBtn": "Deletar",
"deleteBtn": "Delete",
"unblockBtn": "Desbloquear Contato",
"dontSavePeerHistory": "Deletar histórico",
"savePeerHistoryDescription": "Determina se deve excluir algum histórico associado com o contato.",
"savePeerHistory": "Salvar histórico",
"blockBtn": "Bloquear Contato",
"saveBtn": "Salvar",
"saveBtn": "Save",
"displayNameLabel": "Nome de Exibição",
"copiedToClipboardNotification": "Copiado",
"addressLabel": "Endereço",
@ -339,7 +339,7 @@
"serverConnectivityConnected": "Servidor Conectado",
"serverInfo": "Informação do Servidor",
"invitationLabel": "Convite",
"serverLabel": "Servidor",
"serverLabel": "Server",
"search": "Pesquisar...",
"blocked": "Bloqueado",
"pasteAddressToAddContact": "… cole um endereço aqui para adicionar um contato…",

View File

@ -1,6 +1,7 @@
{
"@@locale": "ro",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "ru",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"localeNl": "Dutch \/ Dutch",
"experimentQRCodeDescription": "QR Code support allows sharing data (such as profile identity) by QR Codes",
"enableExperimentQRCode": "QR Codes",

View File

@ -1,6 +1,7 @@
{
"@@locale": "tr",
"@@last_modified": "2022-09-15T03:18:37+02:00",
"@@last_modified": "2022-11-18T15:19:11+01:00",
"localePtBr": "Brazilian Portuguese \/ Português do Brasil",
"experimentQRCodeDescription": "QR Kod desteği profil kimliği gibi verilerin QR Kodla paylaşılmasına olanak tanır",
"acquiringTicketsFromServer": "Spame Karşı Sınama",
"acquiredTicketsFromServer": "Spame Karşı Sınama Tamamlandı",

View File

@ -111,7 +111,7 @@ class Settings extends ChangeNotifier {
this.setTheme(settings["Theme"], settings["ThemeMode"] ?? mode_dark);
// Set Locale and notify listeners
switchLocale(Locale(settings["Locale"]));
switchLocaleByCode(settings["Locale"]);
blockUnknownConnections = settings["BlockUnknownConnections"] ?? false;
streamerMode = settings["StreamerMode"] ?? false;
@ -153,6 +153,16 @@ class Settings extends ChangeNotifier {
});
}
/// Switch the Locale of the App by Language Code
switchLocaleByCode(String languageCode) {
var code = languageCode.split("_");
if (code.length == 1) {
this.switchLocale(Locale(languageCode));
} else {
this.switchLocale(Locale(code[0],code[1]));
}
}
/// Switch the Locale of the App
switchLocale(Locale newLocale) {
locale = newLocale;
@ -397,7 +407,7 @@ class Settings extends ChangeNotifier {
/// event bus.
dynamic asJson() {
return {
"Locale": this.locale.languageCode,
"Locale": this.locale.toString(),
"Theme": theme.theme,
"ThemeMode": theme.mode,
"PreviousPid": -1,

View File

@ -111,17 +111,18 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
width: MediaQuery.of(context).size.width / 4,
child: DropdownButton(
isExpanded: true,
value: Provider.of<Settings>(context).locale.languageCode,
value: Provider.of<Settings>(context).locale.toString(),
onChanged: (String? newValue) {
setState(() {
settings.switchLocale(Locale(newValue!));
EnvironmentConfig.debugLog("setting language: $newValue");
settings.switchLocaleByCode(newValue!);
saveSettings(context);
});
},
items: AppLocalizations.supportedLocales.map<DropdownMenuItem<String>>((Locale value) {
return DropdownMenuItem<String>(
value: value.languageCode,
child: Text(getLanguageFull(context, value.languageCode)),
value: value.toString(),
child: Text(getLanguageFull(context, value.languageCode, value.countryCode)),
);
}).toList()))),
SwitchListTile(
@ -599,7 +600,7 @@ String constructVersionString(PackageInfo pinfo) {
/// A slightly verbose way to extract the full language name from
/// an individual language code. There might be a more efficient way of doing this.
String getLanguageFull(context, String languageCode) {
String getLanguageFull(context, String languageCode, String? countryCode) {
if (languageCode == "en") {
return AppLocalizations.of(context)!.localeEn;
}
@ -609,6 +610,9 @@ String getLanguageFull(context, String languageCode) {
if (languageCode == "fr") {
return AppLocalizations.of(context)!.localeFr;
}
if (languageCode == "pt" && countryCode == "BR") {
return AppLocalizations.of(context)!.localePtBr;
}
if (languageCode == "pt") {
return AppLocalizations.of(context)!.localePt;
}