Flutter Upgrade + Translations

This commit is contained in:
Sarah Jamie Lewis 2021-06-07 15:12:24 -07:00
parent 54c2818cf2
commit 7c587bf295
15 changed files with 50 additions and 13 deletions

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "de", "@@locale": "de",
"accepted": "",
"acceptGroupBtn": "Annehmen", "acceptGroupBtn": "Annehmen",
"acceptGroupInviteLabel": "Möchtest Du die Einladung annehmen", "acceptGroupInviteLabel": "Möchtest Du die Einladung annehmen",
"acknowledgedLabel": "bestätigt", "acknowledgedLabel": "bestätigt",
@ -19,6 +20,7 @@
"chatBtn": "Chat", "chatBtn": "Chat",
"chatHistoryDefault": "", "chatHistoryDefault": "",
"contactAlreadyExists": "", "contactAlreadyExists": "",
"contactSuggestion": "",
"conversationSettings": "", "conversationSettings": "",
"copiedClipboardNotification": "in die Zwischenablage kopiert", "copiedClipboardNotification": "in die Zwischenablage kopiert",
"copiedToClipboardNotification": "in die Zwischenablage kopiert", "copiedToClipboardNotification": "in die Zwischenablage kopiert",
@ -121,6 +123,7 @@
"radioNoPassword": "Unverschlüsselt (kein Passwort)", "radioNoPassword": "Unverschlüsselt (kein Passwort)",
"radioUsePassword": "Passwort", "radioUsePassword": "Passwort",
"reallyLeaveThisGroupPrompt": "", "reallyLeaveThisGroupPrompt": "",
"rejected": "",
"rejectGroupBtn": "Ablehnen", "rejectGroupBtn": "Ablehnen",
"saveBtn": "Speichern", "saveBtn": "Speichern",
"savePeerHistory": "Peer-Verlauf speichern", "savePeerHistory": "Peer-Verlauf speichern",
@ -128,6 +131,7 @@
"saveProfileBtn": "Profil speichern", "saveProfileBtn": "Profil speichern",
"search": "Suche...", "search": "Suche...",
"searchList": "", "searchList": "",
"sendAnInvitation": "",
"server": "Server", "server": "Server",
"serverConnectivityConnected": "Server verbunden", "serverConnectivityConnected": "Server verbunden",
"serverConnectivityDisconnected": "Server getrennt", "serverConnectivityDisconnected": "Server getrennt",

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "en", "@@locale": "en",
"accepted": "Accepted!",
"acceptGroupBtn": "Accept", "acceptGroupBtn": "Accept",
"acceptGroupInviteLabel": "Do you want to accept the invitation to", "acceptGroupInviteLabel": "Do you want to accept the invitation to",
"acknowledgedLabel": "Acknowledged", "acknowledgedLabel": "Acknowledged",
@ -19,6 +20,7 @@
"chatBtn": "Chat", "chatBtn": "Chat",
"chatHistoryDefault": "This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.", "chatHistoryDefault": "This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.",
"contactAlreadyExists": "Contact Already Exists", "contactAlreadyExists": "Contact Already Exists",
"contactSuggestion": "This is a contact suggestion for: ",
"conversationSettings": "Conversation Settings", "conversationSettings": "Conversation Settings",
"copiedClipboardNotification": "Copied to clipboard", "copiedClipboardNotification": "Copied to clipboard",
"copiedToClipboardNotification": "Copied to Clipboard", "copiedToClipboardNotification": "Copied to Clipboard",
@ -121,6 +123,7 @@
"radioNoPassword": "Unencrypted (No password)", "radioNoPassword": "Unencrypted (No password)",
"radioUsePassword": "Password", "radioUsePassword": "Password",
"reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.",
"rejected": "Rejected!",
"rejectGroupBtn": "Reject", "rejectGroupBtn": "Reject",
"saveBtn": "Save", "saveBtn": "Save",
"savePeerHistory": "Save Peer History", "savePeerHistory": "Save Peer History",
@ -128,6 +131,7 @@
"saveProfileBtn": "Save Profile", "saveProfileBtn": "Save Profile",
"search": "Search...", "search": "Search...",
"searchList": "Search List", "searchList": "Search List",
"sendAnInvitation": "You sent an invitation for: ",
"server": "Server", "server": "Server",
"serverConnectivityConnected": "Server Connected", "serverConnectivityConnected": "Server Connected",
"serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityDisconnected": "Server Disconnected",

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "es", "@@locale": "es",
"accepted": "",
"acceptGroupBtn": "Aceptar", "acceptGroupBtn": "Aceptar",
"acceptGroupInviteLabel": "¿Quieres aceptar la invitación a ", "acceptGroupInviteLabel": "¿Quieres aceptar la invitación a ",
"acknowledgedLabel": "Reconocido", "acknowledgedLabel": "Reconocido",
@ -19,6 +20,7 @@
"chatBtn": "Chat", "chatBtn": "Chat",
"chatHistoryDefault": "", "chatHistoryDefault": "",
"contactAlreadyExists": "", "contactAlreadyExists": "",
"contactSuggestion": "",
"conversationSettings": "", "conversationSettings": "",
"copiedClipboardNotification": "Copiado al portapapeles", "copiedClipboardNotification": "Copiado al portapapeles",
"copiedToClipboardNotification": "Copiado al portapapeles", "copiedToClipboardNotification": "Copiado al portapapeles",
@ -121,6 +123,7 @@
"radioNoPassword": "Sin cifrado (sin contraseña)", "radioNoPassword": "Sin cifrado (sin contraseña)",
"radioUsePassword": "Contraseña", "radioUsePassword": "Contraseña",
"reallyLeaveThisGroupPrompt": "", "reallyLeaveThisGroupPrompt": "",
"rejected": "",
"rejectGroupBtn": "Rechazar", "rejectGroupBtn": "Rechazar",
"saveBtn": "Guardar", "saveBtn": "Guardar",
"savePeerHistory": "Guardar el historial con contacto", "savePeerHistory": "Guardar el historial con contacto",
@ -128,6 +131,7 @@
"saveProfileBtn": "Guardar perfil", "saveProfileBtn": "Guardar perfil",
"search": "Búsqueda...", "search": "Búsqueda...",
"searchList": "Buscar en la lista", "searchList": "Buscar en la lista",
"sendAnInvitation": "",
"server": "Servidor", "server": "Servidor",
"serverConnectivityConnected": "Servidor conectado", "serverConnectivityConnected": "Servidor conectado",
"serverConnectivityDisconnected": "Servidor desconectado", "serverConnectivityDisconnected": "Servidor desconectado",

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "fr", "@@locale": "fr",
"accepted": "",
"acceptGroupBtn": "Accepter", "acceptGroupBtn": "Accepter",
"acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe", "acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe",
"acknowledgedLabel": "Confirmé", "acknowledgedLabel": "Confirmé",
@ -19,6 +20,7 @@
"chatBtn": "Discuter", "chatBtn": "Discuter",
"chatHistoryDefault": "", "chatHistoryDefault": "",
"contactAlreadyExists": "", "contactAlreadyExists": "",
"contactSuggestion": "",
"conversationSettings": "", "conversationSettings": "",
"copiedClipboardNotification": "Copié dans le presse-papier", "copiedClipboardNotification": "Copié dans le presse-papier",
"copiedToClipboardNotification": "Copié dans le presse-papier", "copiedToClipboardNotification": "Copié dans le presse-papier",
@ -121,6 +123,7 @@
"radioNoPassword": "", "radioNoPassword": "",
"radioUsePassword": "", "radioUsePassword": "",
"reallyLeaveThisGroupPrompt": "", "reallyLeaveThisGroupPrompt": "",
"rejected": "",
"rejectGroupBtn": "Refuser", "rejectGroupBtn": "Refuser",
"saveBtn": "Sauvegarder", "saveBtn": "Sauvegarder",
"savePeerHistory": "", "savePeerHistory": "",
@ -128,6 +131,7 @@
"saveProfileBtn": "", "saveProfileBtn": "",
"search": "", "search": "",
"searchList": "", "searchList": "",
"sendAnInvitation": "",
"server": "", "server": "",
"serverConnectivityConnected": "", "serverConnectivityConnected": "",
"serverConnectivityDisconnected": "", "serverConnectivityDisconnected": "",

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "it", "@@locale": "it",
"accepted": "",
"acceptGroupBtn": "Accetta", "acceptGroupBtn": "Accetta",
"acceptGroupInviteLabel": "Vuoi accettare l'invito a", "acceptGroupInviteLabel": "Vuoi accettare l'invito a",
"acknowledgedLabel": "Riconosciuto", "acknowledgedLabel": "Riconosciuto",
@ -19,6 +20,7 @@
"chatBtn": "Chat", "chatBtn": "Chat",
"chatHistoryDefault": "", "chatHistoryDefault": "",
"contactAlreadyExists": "", "contactAlreadyExists": "",
"contactSuggestion": "",
"conversationSettings": "", "conversationSettings": "",
"copiedClipboardNotification": "Copiato negli Appunti", "copiedClipboardNotification": "Copiato negli Appunti",
"copiedToClipboardNotification": "Copiato negli Appunti", "copiedToClipboardNotification": "Copiato negli Appunti",
@ -121,6 +123,7 @@
"radioNoPassword": "Non criptato (senza password)", "radioNoPassword": "Non criptato (senza password)",
"radioUsePassword": "Password", "radioUsePassword": "Password",
"reallyLeaveThisGroupPrompt": "", "reallyLeaveThisGroupPrompt": "",
"rejected": "",
"rejectGroupBtn": "Rifiuta", "rejectGroupBtn": "Rifiuta",
"saveBtn": "Salva", "saveBtn": "Salva",
"savePeerHistory": "Salva cronologia peer", "savePeerHistory": "Salva cronologia peer",
@ -128,6 +131,7 @@
"saveProfileBtn": "Salva il profilo", "saveProfileBtn": "Salva il profilo",
"search": "Ricerca...", "search": "Ricerca...",
"searchList": "Cerca nella lista", "searchList": "Cerca nella lista",
"sendAnInvitation": "",
"server": "Server", "server": "Server",
"serverConnectivityConnected": "Server connesso", "serverConnectivityConnected": "Server connesso",
"serverConnectivityDisconnected": "Server disconnesso", "serverConnectivityDisconnected": "Server disconnesso",

View File

@ -1,5 +1,6 @@
{ {
"@@locale": "pt", "@@locale": "pt",
"accepted": "",
"acceptGroupBtn": "Aceitar", "acceptGroupBtn": "Aceitar",
"acceptGroupInviteLabel": "Você quer aceitar o convite para", "acceptGroupInviteLabel": "Você quer aceitar o convite para",
"acknowledgedLabel": "Confirmada", "acknowledgedLabel": "Confirmada",
@ -19,6 +20,7 @@
"chatBtn": "Chat", "chatBtn": "Chat",
"chatHistoryDefault": "", "chatHistoryDefault": "",
"contactAlreadyExists": "", "contactAlreadyExists": "",
"contactSuggestion": "",
"conversationSettings": "", "conversationSettings": "",
"copiedClipboardNotification": "Copiado", "copiedClipboardNotification": "Copiado",
"copiedToClipboardNotification": "Copiado", "copiedToClipboardNotification": "Copiado",
@ -121,6 +123,7 @@
"radioNoPassword": "", "radioNoPassword": "",
"radioUsePassword": "", "radioUsePassword": "",
"reallyLeaveThisGroupPrompt": "", "reallyLeaveThisGroupPrompt": "",
"rejected": "",
"rejectGroupBtn": "Recusar", "rejectGroupBtn": "Recusar",
"saveBtn": "Salvar", "saveBtn": "Salvar",
"savePeerHistory": "", "savePeerHistory": "",
@ -128,6 +131,7 @@
"saveProfileBtn": "", "saveProfileBtn": "",
"search": "", "search": "",
"searchList": "", "searchList": "",
"sendAnInvitation": "",
"server": "", "server": "",
"serverConnectivityConnected": "", "serverConnectivityConnected": "",
"serverConnectivityDisconnected": "", "serverConnectivityDisconnected": "",

View File

@ -1383,6 +1383,8 @@ ThemeData mkThemeData(Settings opaque) {
)), )),
), ),
), ),
scrollbarTheme: ScrollbarThemeData(
isAlwaysShown: false, thumbColor: MaterialStateProperty.all(opaque.current().scrollbarActiveColor()), trackColor: MaterialStateProperty.all(opaque.current().scrollbarDefaultColor())),
tabBarTheme: TabBarTheme(indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor()))), tabBarTheme: TabBarTheme(indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor()))),
dialogTheme: DialogTheme( dialogTheme: DialogTheme(
backgroundColor: opaque.current().backgroundPaneColor(), backgroundColor: opaque.current().backgroundPaneColor(),

View File

@ -64,23 +64,24 @@ class InvitationBubbleState extends State<InvitationBubble> {
} }
var wdgMessage = fromMe var wdgMessage = fromMe
? senderInviteChrome("You sent an invitation for", isGroup ? "a group" : Provider.of<MessageState>(context).message, myKey) ? senderInviteChrome(AppLocalizations.of(context)!.sendAnInvitation,
: (inviteChrome(isGroup ? AppLocalizations.of(context)!.inviteToGroup : "This is a contact suggestion for:", Provider.of<MessageState>(context).inviteNick, isGroup ? Provider.of<ProfileInfoState>(context).contactList.getContact(Provider.of<MessageState>(context).inviteTarget)!.nickname : Provider.of<MessageState>(context).message, myKey)
: (inviteChrome(isGroup ? AppLocalizations.of(context)!.inviteToGroup : AppLocalizations.of(context)!.contactSuggestion, Provider.of<MessageState>(context).inviteNick,
Provider.of<MessageState>(context).inviteTarget, myKey)); Provider.of<MessageState>(context).inviteTarget, myKey));
Widget wdgDecorations; Widget wdgDecorations;
if (fromMe) { if (fromMe) {
wdgDecorations = MessageBubbleDecoration(ackd: Provider.of<MessageState>(context).ackd, errored: Provider.of<MessageState>(context).error, fromMe: fromMe, prettyDate: prettyDate); wdgDecorations = MessageBubbleDecoration(ackd: Provider.of<MessageState>(context).ackd, errored: Provider.of<MessageState>(context).error, fromMe: fromMe, prettyDate: prettyDate);
} else if (isAccepted) { } else if (isAccepted) {
wdgDecorations = Text("Accepted!" + '\u202F'); wdgDecorations = Text(AppLocalizations.of(context)!.accepted + '\u202F');
} else if (this.rejected) { } else if (this.rejected) {
wdgDecorations = Text("Rejected." + '\u202F'); wdgDecorations = Text(AppLocalizations.of(context)!.rejected + '\u202F');
} else { } else {
wdgDecorations = Center( wdgDecorations = Center(
widthFactor: 1, widthFactor: 1,
child: Wrap(children: [ child: Wrap(children: [
Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text("Reject" + '\u202F'), onPressed: _btnReject)), Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text(AppLocalizations.of(context)!.rejectGroupBtn + '\u202F'), onPressed: _btnReject)),
Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text("Accept" + '\u202F'), onPressed: _btnAccept)), Padding(padding: EdgeInsets.all(5), child: TextButton(child: Text(AppLocalizations.of(context)!.acceptGroupBtn + '\u202F'), onPressed: _btnAccept)),
])); ]));
} }

View File

@ -39,7 +39,6 @@ class _MessageListState extends State<MessageList> {
)), )),
Expanded( Expanded(
child: Scrollbar( child: Scrollbar(
isAlwaysShown: true,
controller: ctrlr1, controller: ctrlr1,
child: Container( child: Container(
// Only show broken heart is the contact is offline... // Only show broken heart is the contact is offline...
@ -54,7 +53,7 @@ class _MessageListState extends State<MessageList> {
child: ListView.builder( child: ListView.builder(
controller: ctrlr1, controller: ctrlr1,
itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages, itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages,
reverse: true, reverse: true, // NOTE: There seems to be a bug in flutter that corrects the mouse wheel scroll, but not the drag direction...
itemBuilder: (itemBuilderContext, index) { itemBuilder: (itemBuilderContext, index) {
var trueIndex = Provider.of<ContactInfoState>(outerContext).totalMessages - index - 1; var trueIndex = Provider.of<ContactInfoState>(outerContext).totalMessages - index - 1;
return ChangeNotifierProvider( return ChangeNotifierProvider(

View File

@ -94,7 +94,10 @@ class _MessageRowState extends State<MessageRow> {
final setPeerAttributeJson = jsonEncode(setPeerAttribute); final setPeerAttributeJson = jsonEncode(setPeerAttribute);
Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson); Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson);
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.successfullAddedContact)); final snackBar = SnackBar(
content: Text(AppLocalizations.of(context)!.successfullAddedContact),
duration: Duration(seconds: 2),
);
ScaffoldMessenger.of(context).showSnackBar(snackBar); ScaffoldMessenger.of(context).showSnackBar(snackBar);
} }
} }

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <window_size/window_size_plugin.h> #include <window_size/window_size_plugin.h>

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_ #ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_ #define GENERATED_PLUGIN_REGISTRANT_

View File

@ -21,7 +21,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.6.1" version: "2.7.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@ -191,7 +191,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.4.0"
nested: nested:
dependency: transitive dependency: transitive
description: description:
@ -392,7 +392,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.0" version: "0.4.0"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@ -450,7 +450,7 @@ packages:
name: xml name: xml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.1.1" version: "5.1.2"
sdks: sdks:
dart: ">=2.13.0 <3.0.0" dart: ">=2.13.0 <3.0.0"
flutter: ">=1.20.0" flutter: ">=1.20.0"

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <window_size/window_size_plugin.h> #include <window_size/window_size_plugin.h>

View File

@ -2,6 +2,8 @@
// Generated file. Do not edit. // Generated file. Do not edit.
// //
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_ #ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_ #define GENERATED_PLUGIN_REGISTRANT_