diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index 7f16ab49..73bfe8d0 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -79,6 +79,12 @@ class CwtchNotifier { server.setRunning(data["Intent"] == "running"); } break; + case "ServerStatsUpdate": + EnvironmentConfig.debugLog("ServerStatsUpdate $data"); + var totalMessages = int.parse(data["TotalMessages"]); + var connections = int.parse(data["Connections"]); + serverListState.updateServerStats(data["Identity"], totalMessages, connections); + break; case "GroupCreated": // Retrieve Server Status from Cache... diff --git a/lib/l10n/intl_de.arb b/lib/l10n/intl_de.arb index b3793cca..4c3e33d7 100644 --- a/lib/l10n/intl_de.arb +++ b/lib/l10n/intl_de.arb @@ -1,6 +1,19 @@ { "@@locale": "de", - "@@last_modified": "2021-11-11T01:02:08+01:00", + "@@last_modified": "2021-11-26T02:43:31+01:00", + "serverConnectionsLabel": "Connection", + "serverTotalMessagesLabel": "Total Messages", + "serverMetricsLabel": "Server Metrics", + "manageKnownServersShort": "Servers", + "manageKnownServersLong": "Manage Known Servers", + "displayNameTooltip": "Please enter a display name", + "manageKnownServersButton": "Manage Known Servers", + "fieldDescriptionLabel": "Description", + "groupsOnThisServerLabel": "Groups I am in hosted on this server", + "importLocalServerButton": "Import %1", + "importLocalServerSelectText": "Select Local Server", + "importLocalServerLabel": "Import a locally hosted server", + "savePeerHistoryDescription": "Legt fest, ob ein mit dem anderen Nutzer verknüpfter Verlauf gelöscht werden soll oder nicht.", "newMessagesLabel": "New Messages", "localeRU": "Russian", "copyServerKeys": "Copy keys", @@ -55,7 +68,6 @@ "peerOfflineMessage": "Anderer Nutzer ist offline, Nachrichten können derzeit nicht zugestellt werden", "blockBtn": "Anderen Nutzer blockieren", "savePeerHistory": "Peer-Verlauf speichern", - "savePeerHistoryDescription": "Legt fest, ob ein mit dem anderen Nutzer verknüpfter Verlauf gelöscht werden soll oder nicht.", "dontSavePeerHistory": "Verlauf mit anderem Nutzer löschen", "unblockBtn": "Anderen Nutzer entsperren", "blockUnknownLabel": "Unbekannte Peers blockieren", @@ -190,7 +202,6 @@ "radioNoPassword": "Unverschlüsselt (kein Passwort)", "radioUsePassword": "Passwort", "copiedToClipboardNotification": "in die Zwischenablage kopiert", - "copyBtn": "Kopieren", "editProfile": "Profil bearbeiten", "newProfile": "Neues Profil", "defaultProfileName": "Alice", @@ -210,6 +221,7 @@ "acceptGroupInviteLabel": "Möchtest Du die Einladung annehmen", "newGroupBtn": "Neue Gruppe anlegen", "copiedClipboardNotification": "in die Zwischenablage kopiert", + "copyBtn": "Kopieren", "pendingLabel": "Bestätigung ausstehend", "acknowledgedLabel": "bestätigt", "couldNotSendMsgError": "Nachricht konnte nicht gesendet werden", diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 70f13992..2806071f 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -1,6 +1,19 @@ { "@@locale": "en", - "@@last_modified": "2021-11-11T01:02:08+01:00", + "@@last_modified": "2021-11-26T02:43:31+01:00", + "serverConnectionsLabel": "Connection", + "serverTotalMessagesLabel": "Total Messages", + "serverMetricsLabel": "Server Metrics", + "manageKnownServersShort": "Servers", + "manageKnownServersLong": "Manage Known Servers", + "displayNameTooltip": "Please enter a display name", + "manageKnownServersButton": "Manage Known Servers", + "fieldDescriptionLabel": "Description", + "groupsOnThisServerLabel": "Groups I am in hosted on this server", + "importLocalServerButton": "Import %1", + "importLocalServerSelectText": "Select Local Server", + "importLocalServerLabel": "Import a locally hosted server", + "savePeerHistoryDescription": "Determines whether to delete any history associated with the contact.", "newMessagesLabel": "New Messages", "localeRU": "Russian", "copyServerKeys": "Copy keys", @@ -55,7 +68,6 @@ "peerOfflineMessage": "Contact is offline, messages can't be delivered right now", "blockBtn": "Block Contact", "savePeerHistory": "Save History", - "savePeerHistoryDescription": "Determines whether or not to delete any history associated with the contact.", "dontSavePeerHistory": "Delete History", "unblockBtn": "Unblock Contact", "blockUnknownLabel": "Block Unknown Contacts", @@ -190,7 +202,6 @@ "radioNoPassword": "Unencrypted (No password)", "radioUsePassword": "Password", "copiedToClipboardNotification": "Copied to Clipboard", - "copyBtn": "Copy", "editProfile": "Edit Profille", "newProfile": "New Profile", "defaultProfileName": "Alice", @@ -210,6 +221,7 @@ "acceptGroupInviteLabel": "Do you want to accept the invitation to", "newGroupBtn": "Create new group", "copiedClipboardNotification": "Copied to clipboard", + "copyBtn": "Copy", "pendingLabel": "Pending", "acknowledgedLabel": "Acknowledged", "couldNotSendMsgError": "Could not send this message", diff --git a/lib/l10n/intl_es.arb b/lib/l10n/intl_es.arb index ba0a54bc..cf348c95 100644 --- a/lib/l10n/intl_es.arb +++ b/lib/l10n/intl_es.arb @@ -1,6 +1,19 @@ { "@@locale": "es", - "@@last_modified": "2021-11-11T01:02:08+01:00", + "@@last_modified": "2021-11-26T02:43:31+01:00", + "serverConnectionsLabel": "Connection", + "serverTotalMessagesLabel": "Total Messages", + "serverMetricsLabel": "Server Metrics", + "manageKnownServersShort": "Servers", + "manageKnownServersLong": "Manage Known Servers", + "displayNameTooltip": "Please enter a display name", + "manageKnownServersButton": "Manage Known Servers", + "fieldDescriptionLabel": "Description", + "groupsOnThisServerLabel": "Groups I am in hosted on this server", + "importLocalServerButton": "Import %1", + "importLocalServerSelectText": "Select Local Server", + "importLocalServerLabel": "Import a locally hosted server", + "savePeerHistoryDescription": "Determina si eliminar o no el historial asociado con el contacto.", "newMessagesLabel": "New Messages", "localeRU": "Russian", "copyServerKeys": "Copy keys", @@ -55,7 +68,6 @@ "peerOfflineMessage": "Este contacto no está en línea, los mensajes no pueden ser entregados en este momento", "blockBtn": "Bloquear contacto", "savePeerHistory": "Guardar el historial con contacto", - "savePeerHistoryDescription": "Determina si eliminar o no el historial asociado con el contacto.", "dontSavePeerHistory": "Eliminar historial de contacto", "unblockBtn": "Desbloquear contacto", "blockUnknownLabel": "Bloquear conexiones desconocidas", @@ -190,7 +202,6 @@ "radioNoPassword": "Sin cifrado (sin contraseña)", "radioUsePassword": "Contraseña", "copiedToClipboardNotification": "Copiado al portapapeles", - "copyBtn": "Copiar", "editProfile": "Editar perfil", "newProfile": "Nuevo perfil", "defaultProfileName": "Alicia", @@ -210,6 +221,7 @@ "acceptGroupInviteLabel": "¿Quieres aceptar la invitación a ", "newGroupBtn": "Crear un nuevo grupo de chat", "copiedClipboardNotification": "Copiado al portapapeles", + "copyBtn": "Copiar", "pendingLabel": "Pendiente", "acknowledgedLabel": "Reconocido", "couldNotSendMsgError": "No se pudo enviar este mensaje", diff --git a/lib/l10n/intl_fr.arb b/lib/l10n/intl_fr.arb index bb6e8810..1e9fdf48 100644 --- a/lib/l10n/intl_fr.arb +++ b/lib/l10n/intl_fr.arb @@ -1,8 +1,21 @@ { "@@locale": "fr", - "@@last_modified": "2021-11-11T01:02:08+01:00", - "newMessagesLabel": "New Messages", - "localeRU": "Russian", + "@@last_modified": "2021-11-26T02:43:31+01:00", + "serverConnectionsLabel": "Connection", + "serverTotalMessagesLabel": "Total Messages", + "serverMetricsLabel": "Server Metrics", + "manageKnownServersShort": "Serveurs", + "manageKnownServersLong": "Gérer les serveurs connus", + "displayNameTooltip": "Veuillez entrer un nom d'usage s'il vous plaît", + "manageKnownServersButton": "Gérer les serveurs connus", + "fieldDescriptionLabel": "Description", + "groupsOnThisServerLabel": "Les groupes dont je fais partie sont hébergés sur ce serveur", + "importLocalServerButton": "Importer %1", + "importLocalServerSelectText": "Sélectionnez le serveur local", + "importLocalServerLabel": "Importer un serveur hébergé localement", + "savePeerHistoryDescription": "Détermine s'il faut ou non supprimer tout historique associé au contact.", + "newMessagesLabel": "Nouveaux messages", + "localeRU": "Russe", "copyServerKeys": "Copier les clés", "verfiyResumeButton": "Vérifier\/reprendre", "fileCheckingStatus": "Vérification de l'état du téléchargement", @@ -55,7 +68,6 @@ "peerOfflineMessage": "Le contact est hors ligne, les messages ne peuvent pas être transmis pour le moment.", "blockBtn": "Bloquer le contact", "savePeerHistory": "Enregistrer l'historique", - "savePeerHistoryDescription": "Détermine s'il faut ou non supprimer tout historique associé au contact.", "dontSavePeerHistory": "Supprimer l'historique", "unblockBtn": "Débloquer le contact", "blockUnknownLabel": "Bloquer les pairs inconnus", @@ -190,7 +202,6 @@ "radioNoPassword": "Non chiffré (pas de mot de passe)", "radioUsePassword": "Mot de passe", "copiedToClipboardNotification": "Copié dans le presse-papier", - "copyBtn": "Copier", "editProfile": "Modifier le profil", "newProfile": "Nouveau profil", "defaultProfileName": "Alice", @@ -210,6 +221,7 @@ "acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe", "newGroupBtn": "Créer un nouveau groupe", "copiedClipboardNotification": "Copié dans le presse-papier", + "copyBtn": "Copier", "pendingLabel": "En attente", "acknowledgedLabel": "Accusé de réception", "couldNotSendMsgError": "Impossible d'envoyer ce message", diff --git a/lib/l10n/intl_it.arb b/lib/l10n/intl_it.arb index fce93d69..c0cd1485 100644 --- a/lib/l10n/intl_it.arb +++ b/lib/l10n/intl_it.arb @@ -1,52 +1,65 @@ { "@@locale": "it", - "@@last_modified": "2021-11-11T01:02:08+01:00", - "newMessagesLabel": "New Messages", - "localeRU": "Russian", - "copyServerKeys": "Copy keys", - "verfiyResumeButton": "Verify\/resume", - "fileCheckingStatus": "Checking download status", - "fileInterrupted": "Interrupted", - "fileSavedTo": "Saved to", - "plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.", - "encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.", - "deleteServerConfirmBtn": "Really delete server", - "deleteServerSuccess": "Successfully deleted server", - "enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server", - "copyAddress": "Copy Address", - "settingServersDescription": "The hosting servers experiment enables hosting and managing Cwtch servers", - "settingServers": "Hosting Servers", - "enterServerPassword": "Enter password to unlock server", - "unlockProfileTip": "Please create or unlock a profile to begin!", - "unlockServerTip": "Please create or unlock a server to begin!", - "addServerTooltip": "Add new server", - "serversManagerTitleShort": "Servers", - "serversManagerTitleLong": "Servers You Host", - "saveServerButton": "Save Server", - "serverAutostartDescription": "Controls if the application will automatically launch the server on start", - "serverAutostartLabel": "Autostart", - "serverEnabledDescription": "Start or stop the server", - "serverEnabled": "Server Enabled", - "serverDescriptionDescription": "Your description of the server for personal management use only, will never be shared", - "serverDescriptionLabel": "Server Description", - "serverAddress": "Server Address", - "editServerTitle": "Edit Server", - "addServerTitle": "Add Server", - "titleManageProfilesShort": "Profiles", - "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses", + "@@last_modified": "2021-11-26T02:43:31+01:00", + "serverConnectionsLabel": "Connection", + "serverTotalMessagesLabel": "Total Messages", + "serverMetricsLabel": "Server Metrics", + "manageKnownServersShort": "Servers", + "manageKnownServersLong": "Manage Known Servers", + "displayNameTooltip": "Please enter a display name", + "manageKnownServersButton": "Manage Known Servers", + "fieldDescriptionLabel": "Description", + "groupsOnThisServerLabel": "Groups I am in hosted on this server", + "importLocalServerButton": "Import %1", + "importLocalServerSelectText": "Select Local Server", + "importLocalServerLabel": "Import a locally hosted server", + "savePeerHistoryDescription": "Determina se eliminare o meno ogni cronologia eventualmente associata al peer.", + "newMessagesLabel": "Nuovi messaggi", + "localeRU": "Russo", + "copyServerKeys": "Copia chiavi", + "verfiyResumeButton": "Verifica\/riprendi", + "fileCheckingStatus": "Controllo dello stato del download", + "fileInterrupted": "Interrotto", + "fileSavedTo": "Salvato in", + "plainServerDescription": "Ti raccomandiamo di proteggere i tuoi server Cwtch con una password. Se non imposti una password su questo server, chiunque abbia accesso a questo dispositivo potrebbe essere in grado di accedere alle relativ informazioni, compresi dati sensibili come le chiavi crittografiche.", + "encryptedServerDescription": "Criptare un server con una password lo protegge da altre persone che potrebbero usare questo dispositivo. I server criptati non possono essere decriptati, visualizzati o accessibili finché non viene inserita la password corretta per sbloccarli.", + "deleteServerConfirmBtn": "Elimina davvero il server", + "deleteServerSuccess": "Server eliminato con successo", + "enterCurrentPasswordForDeleteServer": "Inserisci la password attuale per eliminare questo server", + "copyAddress": "Copia indirizzo", + "settingServersDescription": "L'esperimento dei server di hosting permette di allocare e gestire i server Cwtch", + "settingServers": "Server di hosting", + "enterServerPassword": "Inserisci la password per sbloccare il server", + "unlockProfileTip": "Crea o sblocca un profilo per iniziare!", + "unlockServerTip": "Crea o sblocca un server per iniziare!", + "addServerTooltip": "Aggiungi nuovo server", + "serversManagerTitleShort": "Gestisci i server", + "serversManagerTitleLong": "Server che gestisci", + "saveServerButton": "Salva il server", + "serverAutostartDescription": "Controlla se l'applicazione avvierà automaticamente il server all'avvio", + "serverAutostartLabel": "Avvio automatico", + "serverEnabledDescription": "Avvia o arresta il server", + "serverEnabled": "Server abilitato", + "serverDescriptionDescription": "La tua descrizione del server solo per gestione personale, non sarà mai condivisa", + "serverDescriptionLabel": "Descrizione del server", + "serverAddress": "Indirizzo del server", + "editServerTitle": "Modifica il server", + "addServerTitle": "Aggiungi server", + "titleManageProfilesShort": "Profili", + "descriptionStreamerMode": "Se attivata, questa opzione rende l'applicazione visivamente più privata per lo streaming o la presentazione, ad esempio nascondendo il profilo e gli indirizzi di contatto", "descriptionFileSharing": "L'esperimento di condivisione dei file ti consente di inviare e ricevere file dai contatti e dai gruppi di Cwtch. Tieni presente che la condivisione di un file con un gruppo farà sì che i membri di quel gruppo si colleghino con te direttamente su Cwtch per scaricarlo.", "settingFileSharing": "Condivisione file", "tooltipSendFile": "Invia file", "messageFileOffered": "Il contatto offre l'invio di un file", - "messageFileSent": "You sent a file", - "messageEnableFileSharing": "Enable the file sharing experiment to view this message.", - "labelFilesize": "Size", - "labelFilename": "Filename", - "downloadFileButton": "Download", - "openFolderButton": "Open Folder", - "retrievingManifestMessage": "Retrieving file information...", - "streamerModeLabel": "Streamer\/Presentation Mode", - "archiveConversation": "Archive this Conversation", + "messageFileSent": "Hai inviato un file", + "messageEnableFileSharing": "Abilita l'esperimento di condivisione dei file per visualizzare questo messaggio.", + "labelFilesize": "Dimensione", + "labelFilename": "Nome del file", + "downloadFileButton": "Scarica", + "openFolderButton": "Apri cartella", + "retrievingManifestMessage": "Recupero delle informazioni sul file in corso...", + "streamerModeLabel": "Modalità Streamer\/Presentazione", + "archiveConversation": "Archivia questa conversazione", "profileOnionLabel": "Inviare questo indirizzo ai peer con cui si desidera connettersi", "addPeerTab": "Aggiungi un peer", "addPeer": "Aggiungi peer", @@ -55,29 +68,28 @@ "peerOfflineMessage": "Il peer è offline, i messaggi non possono essere recapitati in questo momento", "blockBtn": "Blocca il peer", "savePeerHistory": "Salva cronologia peer", - "savePeerHistoryDescription": "Determina se eliminare o meno ogni cronologia eventualmente associata al peer.", "dontSavePeerHistory": "Elimina cronologia dei peer", "unblockBtn": "Sblocca il peer", "blockUnknownLabel": "Blocca peer sconosciuti", - "blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings", + "blockUnknownConnectionsEnabledDescription": "Le connessioni da contatti sconosciuti sono bloccate. Puoi modificare questa impostazione in Impostazioni", "networkStatusConnecting": "Connessione alla rete e ai peer ...", - "showMessageButton": "Show Message", - "blockedMessageMessage": "This message is from a profile you have blocked.", - "placeholderEnterMessage": "Type a message...", - "plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.", - "encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.", - "addContactConfirm": "Add contact %1", - "addContact": "Add contact", - "contactGoto": "Go to conversation with %1", - "settingUIColumnOptionSame": "Same as portrait mode setting", - "settingUIColumnDouble14Ratio": "Double (1:4)", - "settingUIColumnDouble12Ratio": "Double (1:2)", - "settingUIColumnSingle": "Single", - "settingUIColumnLandscape": "UI Columns in Landscape Mode", - "settingUIColumnPortrait": "UI Columns in Portrait Mode", - "localePl": "Polish", - "tooltipRemoveThisQuotedMessage": "Remove quoted message.", - "tooltipReplyToThisMessage": "Reply to this message", + "showMessageButton": "Mostra il messaggio", + "blockedMessageMessage": "Questo messaggio proviene da un profilo che hai bloccato.", + "placeholderEnterMessage": "Scrivi un messaggio...", + "plainProfileDescription": "Ti raccomandiamo di proteggere i tuoi profili Cwtch con una password. Se non imposti una password su questo profilo, chiunque abbia accesso a questo dispositivo potrebbe essere in grado di accedere alle relative informazioni, compresi contatti, messaggi e altri dati sensibili come le chiavi crittografiche.", + "encryptedProfileDescription": "Criptare un profilo con una password lo protegge da altre persone che potrebbero usare questo dispositivo. I profili criptati non possono essere decriptati, visualizzati o accessibili finché non viene inserita la password corretta per sbloccarli.", + "addContactConfirm": "Aggiungi %1 come contatto", + "addContact": "Aggiungi contatto", + "contactGoto": "Vai alla conversazione con %1", + "settingUIColumnOptionSame": "Stessa impostazione della modalità verticale", + "settingUIColumnDouble14Ratio": "Doppia (1:4)", + "settingUIColumnDouble12Ratio": "Doppia (1:2)", + "settingUIColumnSingle": "Singola", + "settingUIColumnLandscape": "Colonne dell'interfaccia utente in modalità orizzontale", + "settingUIColumnPortrait": "Colonne dell'interfaccia utente in modalità verticale", + "localePl": "Polacco", + "tooltipRemoveThisQuotedMessage": "Rimuovi il messaggio citato.", + "tooltipReplyToThisMessage": "Rispondi a questo messaggio", "tooltipRejectContactRequest": "Rifiuta questa richiesta di contatto", "tooltipAcceptContactRequest": "Accetta questa richiesta di contatto.", "notificationNewMessageFromGroup": "Nuovo messaggio in un gruppo!", @@ -190,7 +202,6 @@ "radioNoPassword": "Non criptato (senza password)", "radioUsePassword": "Password", "copiedToClipboardNotification": "Copiato negli Appunti", - "copyBtn": "Copia", "editProfile": "Modifica profilo", "newProfile": "Nuovo profilo", "defaultProfileName": "Alice", @@ -210,6 +221,7 @@ "acceptGroupInviteLabel": "Vuoi accettare l'invito a", "newGroupBtn": "Crea un nuovo gruppo", "copiedClipboardNotification": "Copiato negli Appunti", + "copyBtn": "Copia", "pendingLabel": "In corso", "acknowledgedLabel": "Riconosciuto", "couldNotSendMsgError": "Impossibile inviare questo messaggio", diff --git a/lib/l10n/intl_pl.arb b/lib/l10n/intl_pl.arb index aa2e5366..6d36e8fc 100644 --- a/lib/l10n/intl_pl.arb +++ b/lib/l10n/intl_pl.arb @@ -1,8 +1,21 @@ { "@@locale": "pl", - "@@last_modified": "2021-11-11T01:02:08+01:00", - "newMessagesLabel": "New Messages", - "localeRU": "Russian", + "@@last_modified": "2021-11-26T02:43:31+01:00", + "serverConnectionsLabel": "Connection", + "serverTotalMessagesLabel": "Total Messages", + "serverMetricsLabel": "Server Metrics", + "manageKnownServersShort": "Servers", + "manageKnownServersLong": "Manage Known Servers", + "displayNameTooltip": "Please enter a display name", + "manageKnownServersButton": "Manage Known Servers", + "fieldDescriptionLabel": "Description", + "groupsOnThisServerLabel": "Groups I am in hosted on this server", + "importLocalServerButton": "Import %1", + "importLocalServerSelectText": "Select Local Server", + "importLocalServerLabel": "Import a locally hosted server", + "savePeerHistoryDescription": "Determines whether to delete any history associated with the contact.", + "newMessagesLabel": "Nowe wiadomości", + "localeRU": "Rosyjski", "copyServerKeys": "Kopiuj klucze", "verfiyResumeButton": "Zweryfikuj\/wznów", "fileCheckingStatus": "Sprawdzanie stanu pobierania", @@ -12,26 +25,26 @@ "encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.", "deleteServerConfirmBtn": "Naprawdę usuń serwer", "deleteServerSuccess": "Pomyślnie usunięto serwer", - "enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server", + "enterCurrentPasswordForDeleteServer": "Wprowadź aktualne hasło, aby usunąć ten serwer", "copyAddress": "Skopiuj adres", "settingServersDescription": "The hosting servers experiment enables hosting and managing Cwtch servers", - "settingServers": "Hosting Servers", - "enterServerPassword": "Enter password to unlock server", + "settingServers": "Hosting serwerów", + "enterServerPassword": "Wprowadź hasło, aby odblokować serwer", "unlockProfileTip": "Please create or unlock a profile to begin!", "unlockServerTip": "Please create or unlock a server to begin!", - "addServerTooltip": "Add new server", - "serversManagerTitleShort": "Servers", - "serversManagerTitleLong": "Servers You Host", - "saveServerButton": "Save Server", + "addServerTooltip": "Dodaj nowy serwer", + "serversManagerTitleShort": "Serwery", + "serversManagerTitleLong": "Serwery, które hostujesz", + "saveServerButton": "Zapisz serwer", "serverAutostartDescription": "Controls if the application will automatically launch the server on start", "serverAutostartLabel": "Autostart", - "serverEnabledDescription": "Start or stop the server", - "serverEnabled": "Server Enabled", + "serverEnabledDescription": "Uruchom lub zatrzymaj serwer", + "serverEnabled": "Serwer włączony", "serverDescriptionDescription": "Your description of the server for personal management use only, will never be shared", - "serverDescriptionLabel": "Server Description", - "serverAddress": "Server Address", - "editServerTitle": "Edit Server", - "addServerTitle": "Add Server", + "serverDescriptionLabel": "Opis serwera", + "serverAddress": "Adres serwera", + "editServerTitle": "Edytuj serwer", + "addServerTitle": "Dodaj serwer", "titleManageProfilesShort": "Profile", "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses", "descriptionFileSharing": "Eksperyment udostępniania plików pozwala na wysyłanie i odbieranie plików od kontaktów i grup Cwtch. Zauważ, że udostępnienie pliku grupie spowoduje, że członkowie tej grupy połączą się z Tobą bezpośrednio przez Cwtch, aby go pobrać.", @@ -55,70 +68,69 @@ "peerOfflineMessage": "Contact is offline, messages can't be delivered right now", "blockBtn": "Block Contact", "savePeerHistory": "Save History", - "savePeerHistoryDescription": "Determines whether or not to delete any history associated with the contact.", "dontSavePeerHistory": "Delete History", "unblockBtn": "Unblock Contact", "blockUnknownLabel": "Block Unknown Contacts", "blockUnknownConnectionsEnabledDescription": "Połączenia od nieznanych kontaktów są blokowane. Można to zmienić w Ustawieniach", "networkStatusConnecting": "Connecting to network and contacts...", - "showMessageButton": "Show Message", - "blockedMessageMessage": "This message is from a profile you have blocked.", - "placeholderEnterMessage": "Type a message...", + "showMessageButton": "Pokaż wiadomość", + "blockedMessageMessage": "Ta wiadomość pochodzi z profilu, który został przez Ciebie zablokowany.", + "placeholderEnterMessage": "Wpisz wiadomość...", "plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.", "encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.", - "addContactConfirm": "Add contact %1", - "addContact": "Add contact", - "contactGoto": "Go to conversation with %1", - "settingUIColumnOptionSame": "Same as portrait mode setting", - "settingUIColumnDouble14Ratio": "Double (1:4)", - "settingUIColumnDouble12Ratio": "Double (1:2)", - "settingUIColumnSingle": "Single", + "addContactConfirm": "Dodaj kontakt %1", + "addContact": "Dodaj kontakt", + "contactGoto": "Przejdź do rozmowy z %1", + "settingUIColumnOptionSame": "Tak samo jak w przypadku trybu portretowego", + "settingUIColumnDouble14Ratio": "Podwójny (1:4)", + "settingUIColumnDouble12Ratio": "Podwójny (1:2)", + "settingUIColumnSingle": "Pojedynczy", "settingUIColumnLandscape": "UI Columns in Landscape Mode", "settingUIColumnPortrait": "UI Columns in Portrait Mode", - "localePl": "Polish", - "tooltipRemoveThisQuotedMessage": "Remove quoted message.", - "tooltipReplyToThisMessage": "Reply to this message", - "tooltipRejectContactRequest": "Reject this contact request", - "tooltipAcceptContactRequest": "Accept this contact request.", - "notificationNewMessageFromGroup": "New message in a group!", - "notificationNewMessageFromPeer": "New message from a contact!", - "tooltipHidePassword": "Hide Password", - "tooltipShowPassword": "Show Password", + "localePl": "Polski", + "tooltipRemoveThisQuotedMessage": "Usuń cytowaną wiadomość.", + "tooltipReplyToThisMessage": "Odpowiedz na tę wiadomość", + "tooltipRejectContactRequest": "Odrzuć tę prośbę o kontakt", + "tooltipAcceptContactRequest": "Zaakceptuj tę prośbę o kontakt.", + "notificationNewMessageFromGroup": "Nowa wiadomość w grupie!", + "notificationNewMessageFromPeer": "Nowa wiadomość od kontaktu!", + "tooltipHidePassword": "Ukryj hasło", + "tooltipShowPassword": "Pokaż hasło", "serverNotSynced": "Syncing New Messages (This can take some time)...", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", - "shutdownCwtchAction": "Shutdown Cwtch", + "shutdownCwtchAction": "Zamknij Cwtch", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", - "shutdownCwtchDialogTitle": "Shutdown Cwtch?", - "shutdownCwtchTooltip": "Shutdown Cwtch", - "malformedMessage": "Malformed message", - "profileDeleteSuccess": "Successfully deleted profile", - "debugLog": "Turn on console debug logging", - "torNetworkStatus": "Tor network status", + "shutdownCwtchDialogTitle": "Zamknąć Cwtch?", + "shutdownCwtchTooltip": "Zamknij Cwtch", + "malformedMessage": "Źle sformatowana wiadomość", + "profileDeleteSuccess": "Pomyślnie usunięto profil", + "debugLog": "Włącz logowanie debugowania konsoli", + "torNetworkStatus": "Stan sieci Tor", "addContactFirst": "Add or pick a contact to begin chatting.", "createProfileToBegin": "Please create or unlock a profile to begin", - "nickChangeSuccess": "Profile nickname changed successfully", + "nickChangeSuccess": "Nick w profilu został zmieniony pomyślnie", "addServerFirst": "You need to add a server before you can create a group", - "deleteProfileSuccess": "Successfully deleted profile", - "sendInvite": "Send a contact or group invite", - "sendMessage": "Send Message", - "cancel": "Cancel", + "deleteProfileSuccess": "Pomyślnie usunięto profil", + "sendInvite": "Wyślij kontakt lub zaproszenie do grupy", + "sendMessage": "Wyślij wiadomość", + "cancel": "Anuluj", "resetTor": "Reset", - "torStatus": "Tor Status", - "torVersion": "Tor Version", + "torStatus": "Status Tor", + "torVersion": "Wersja Tor", "sendAnInvitation": "You sent an invitation for: ", "contactSuggestion": "This is a contact suggestion for: ", - "rejected": "Rejected!", - "accepted": "Accepted!", + "rejected": "Odrzucone!", + "accepted": "Przyjęte!", "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.", - "newPassword": "New Password", - "yesLeave": "Yes, Leave This Conversation", + "newPassword": "Nowe hasło", + "yesLeave": "Tak, wyjdź z tej rozmowy", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.", - "leaveGroup": "Leave This Conversation", + "leaveGroup": "Wyjdź z tej rozmowy", "inviteToGroup": "You have been invited to join a group:", "pasteAddressToAddContact": "Paste a cwtch address, invitation or key bundle here to add a new conversation", "tooltipAddContact": "Add a new contact or conversation", "titleManageContacts": "Conversations", - "titleManageServers": "Manage Servers", + "titleManageServers": "Zarządzaj serwerami", "dateNever": "Never", "dateLastYear": "Last Year", "dateYesterday": "Yesterday", @@ -190,7 +202,6 @@ "radioNoPassword": "Unencrypted (No password)", "radioUsePassword": "Password", "copiedToClipboardNotification": "Copied to Clipboard", - "copyBtn": "Copy", "editProfile": "Edit Profille", "newProfile": "New Profile", "defaultProfileName": "Alice", @@ -210,6 +221,7 @@ "acceptGroupInviteLabel": "Do you want to accept the invitation to", "newGroupBtn": "Create new group", "copiedClipboardNotification": "Copied to clipboard", + "copyBtn": "Copy", "pendingLabel": "Pending", "acknowledgedLabel": "Acknowledged", "couldNotSendMsgError": "Could not send this message", diff --git a/lib/l10n/intl_pt.arb b/lib/l10n/intl_pt.arb index 137e8a2b..5049e75b 100644 --- a/lib/l10n/intl_pt.arb +++ b/lib/l10n/intl_pt.arb @@ -1,6 +1,19 @@ { "@@locale": "pt", - "@@last_modified": "2021-11-11T01:02:08+01:00", + "@@last_modified": "2021-11-26T02:43:31+01:00", + "serverConnectionsLabel": "Connection", + "serverTotalMessagesLabel": "Total Messages", + "serverMetricsLabel": "Server Metrics", + "manageKnownServersShort": "Servers", + "manageKnownServersLong": "Manage Known Servers", + "displayNameTooltip": "Please enter a display name", + "manageKnownServersButton": "Manage Known Servers", + "fieldDescriptionLabel": "Description", + "groupsOnThisServerLabel": "Groups I am in hosted on this server", + "importLocalServerButton": "Import %1", + "importLocalServerSelectText": "Select Local Server", + "importLocalServerLabel": "Import a locally hosted server", + "savePeerHistoryDescription": "Determines whether to delete any history associated with the contact.", "newMessagesLabel": "New Messages", "localeRU": "Russian", "copyServerKeys": "Copy keys", @@ -55,7 +68,6 @@ "peerOfflineMessage": "Contact is offline, messages can't be delivered right now", "blockBtn": "Block Contact", "savePeerHistory": "Save History", - "savePeerHistoryDescription": "Determines whether or not to delete any history associated with the contact.", "dontSavePeerHistory": "Delete History", "unblockBtn": "Unblock Contact", "blockUnknownLabel": "Block Unknown Contacts", @@ -190,7 +202,6 @@ "radioNoPassword": "Unencrypted (No password)", "radioUsePassword": "Password", "copiedToClipboardNotification": "Copiado", - "copyBtn": "Copiar", "editProfile": "Edit Profille", "newProfile": "New Profile", "defaultProfileName": "Alice", @@ -210,6 +221,7 @@ "acceptGroupInviteLabel": "Você quer aceitar o convite para", "newGroupBtn": "Criar novo grupo", "copiedClipboardNotification": "Copiado", + "copyBtn": "Copiar", "pendingLabel": "Pendente", "acknowledgedLabel": "Confirmada", "couldNotSendMsgError": "Não deu para enviar esta mensagem", diff --git a/lib/models/servers.dart b/lib/models/servers.dart index bf9710dd..e904b2d9 100644 --- a/lib/models/servers.dart +++ b/lib/models/servers.dart @@ -44,11 +44,34 @@ class ServerListState extends ChangeNotifier { notifyListeners(); } + void updateServerStats(String onion, int newTotalMessages, int newConnections) { + var server = getServer(onion); + if (server != null) { + server.setStats(newTotalMessages, newConnections); + resort(); + notifyListeners(); + } + } + void delete(String onion) { _servers.removeWhere((element) => element.onion == onion); notifyListeners(); } + void resort() { + _servers.sort((ServerInfoState a, ServerInfoState b) { + // return -1 = a first in list + // return 1 = b first in list + if (a.totalMessages > b.totalMessages) { + return -1; + } else if (b.totalMessages > a.totalMessages) { + return 1; + } + + return 0; + }); + } + List get servers => _servers.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier } @@ -60,6 +83,8 @@ class ServerInfoState extends ChangeNotifier { bool running; bool autoStart; bool isEncrypted; + int totalMessages = 0; + int connections = 0; ServerInfoState({required this.onion, required this.serverBundle, required this.running, required this.description, required this.autoStart, required this.isEncrypted}); @@ -77,4 +102,10 @@ class ServerInfoState extends ChangeNotifier { description = val; notifyListeners(); } + + void setStats(int newTotalMessages, int newConnections) { + totalMessages = newTotalMessages; + connections = newConnections; + notifyListeners(); + } } diff --git a/lib/views/addeditservers.dart b/lib/views/addeditservers.dart index c551ea4d..56aa07fc 100644 --- a/lib/views/addeditservers.dart +++ b/lib/views/addeditservers.dart @@ -82,8 +82,8 @@ class _AddEditServerViewState extends State { child: Form( key: _formKey, child: Container( - margin: EdgeInsets.fromLTRB(30, 0, 30, 10), - padding: EdgeInsets.fromLTRB(20, 0 , 20, 10), + margin: EdgeInsets.fromLTRB(30, 5, 30, 10), + padding: EdgeInsets.fromLTRB(20, 5 , 20, 10), child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ @@ -91,13 +91,7 @@ class _AddEditServerViewState extends State { Visibility( visible: serverInfoState.onion.isNotEmpty, child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - height: 20, - ), CwtchLabel(label: AppLocalizations.of(context)!.serverAddress), - SizedBox( - height: 20, - ), SelectableText( serverInfoState.onion ) @@ -161,6 +155,35 @@ class _AddEditServerViewState extends State { secondary: Icon(CwtchIcons.favorite_24dp, color: settings.current().mainTextColor()), ), + // metrics + Visibility( + visible: serverInfoState.onion.isNotEmpty, + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + SizedBox( + height: 20, + ), + Text(AppLocalizations.of(context)!.serverMetricsLabel, style: Provider.of(context).biggerFont), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text(AppLocalizations.of(context)!.serverTotalMessagesLabel), + ]), + Text(serverInfoState.totalMessages.toString()) + ]), + + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ + Text(AppLocalizations.of(context)!.serverConnectionsLabel), + ]), + Text(serverInfoState.connections.toString()) + ]), + + + ])), + // ***** Password *****