Localizations + Allow Editing
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2022-03-21 09:18:17 -07:00
parent d8e19de5b1
commit f48b6af3dd
17 changed files with 96 additions and 31 deletions

View File

@ -1,6 +1,10 @@
{
"@@locale": "cy",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "da",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "de",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "el",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "en",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "es",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,16 +1,20 @@
{
"@@locale": "fr",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",
"importProfileTooltip": "Use an encrypted Cwtch backup to bring in a profile created in another instance of Cwtch.",
"importProfile": "Import Profile",
"exportProfileTooltip": "Backup this profile to an encrypted file. The encrypted file can be imported into another Cwtch app.",
"exportProfile": "Export Profile",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"acceptGroupBtn": "Accepter",
"successfullyImportedProfile": "Profil importé avec succès : %profile",
"shuttingDownApp": "Fermeture...",
"importProfileTooltip": "Utilisez une sauvegarde Cwtch chiffrée pour importer un profil créé dans une autre instance de Cwtch.",
"exportProfile": "Exporter un profile",
"importProfile": "Importer un profil",
"failedToImportProfile": "Erreur lors de l'importation du profil",
"exportProfileTooltip": "Sauvegardez ce profil dans un fichier chiffré. Le fichier crypté peut être importé dans une autre application Cwtch.",
"contactSuggestion": "Il s'agit d'une suggestion de contact pour:",
"contactGoto": "Aller à la conversation avec %1",
"acceptGroupBtn": "Accepter",
"yourDisplayName": "Votre nom d'usage",
"profileName": "Nom d'usage",
"displayNameLabel": "Nom d'usage",

View File

@ -1,6 +1,10 @@
{
"@@locale": "it",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "lb",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "no",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "pl",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "pt",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "ro",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -1,6 +1,10 @@
{
"@@locale": "ru",
"@@last_modified": "2022-03-11T01:06:46+01:00",
"@@last_modified": "2022-03-21T17:12:38+01:00",
"clickableLinkError": "Error encountered while attempting to open URL",
"clickableLinksCopy": "Copy URL",
"clickableLinkOpen": "Open URL",
"clickableLinksWarning": "Opening this URL will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open URLs from people you trust. Are you sure you want to continue?",
"shuttingDownApp": "Shutting down...",
"successfullyImportedProfile": "Successfully Imported Profile: %profile",
"failedToImportProfile": "Error Importing Profile",

View File

@ -199,7 +199,13 @@ class _MessageViewState extends State<MessageView> {
void _sendMessage([String? ignoredParam]) {
// Trim message
final messageWithoutNewLine = ctrlrCompose.value.text.trimRight();
ctrlrCompose.value = TextEditingValue(text: messageWithoutNewLine);
ctrlrCompose.value = TextEditingValue(text: messageWithoutNewLine, selection: TextSelection.fromPosition(TextPosition(offset: messageWithoutNewLine.length)));
// Do this after we trim to preserve enter-behaviour...
bool isOffline = Provider.of<ContactInfoState>(context).isOnline() == false;
if (isOffline) {
return;
}
var isGroup = Provider.of<ProfileInfoState>(context, listen: false).contactList.getContact(Provider.of<AppState>(context, listen: false).selectedConversation!)!.isGroup;
@ -302,7 +308,7 @@ class _MessageViewState extends State<MessageView> {
maxLengthEnforcement: MaxLengthEnforcement.enforced,
maxLines: null,
onFieldSubmitted: _sendMessage,
enabled: !isOffline,
enabled: true, // always allow editing...
onChanged: (String x) {
setState(() {
// we need to force a rerender here to update the max length count

View File

@ -49,8 +49,9 @@ class _SplashViewState extends State<SplashView> {
? appState.appError
: appState.modalState == ModalState.none
? AppLocalizations.of(context)!.loadingCwtch
: appState.modalState == ModalState.storageMigration ? AppLocalizations.of(context)!.storageMigrationModalMessage
: AppLocalizations.of(context)!.shuttingDownApp, // Todo l10n AppLocalizations.of(context)!.storageMigrationModalMessage
: appState.modalState == ModalState.storageMigration
? AppLocalizations.of(context)!.storageMigrationModalMessage
: AppLocalizations.of(context)!.shuttingDownApp, // Todo l10n AppLocalizations.of(context)!.storageMigrationModalMessage
style: TextStyle(
fontSize: 16.0, color: appState.appError == "" ? Provider.of<Settings>(context).theme.mainTextColor : Provider.of<Settings>(context).theme.textfieldErrorColor))),
Visibility(

View File

@ -129,13 +129,12 @@ class MessageBubbleState extends State<MessageBubble> {
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
"Opening this link will launch an application outside of Cwtch and may reveal metadata or otherwise compromise the security of Cwtch. Only open links from people you trust. Are you sure you want to continue?"),
Text(AppLocalizations.of(context)!.clickableLinksWarning),
Flex(direction: Axis.horizontal, mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Container(
margin: EdgeInsets.symmetric(vertical: 20, horizontal: 10),
child: ElevatedButton(
child: Text("Copy link", semanticsLabel: "Copy link"),
child: Text(AppLocalizations.of(context)!.clickableLinksCopy, semanticsLabel: AppLocalizations.of(context)!.clickableLinksCopy),
onPressed: () {
Clipboard.setData(new ClipboardData(text: link.url));
@ -151,13 +150,16 @@ class MessageBubbleState extends State<MessageBubble> {
Container(
margin: EdgeInsets.symmetric(vertical: 20, horizontal: 10),
child: ElevatedButton(
child: Text("Open link", semanticsLabel: "Open link"),
child: Text(AppLocalizations.of(context)!.clickableLinkOpen, semanticsLabel: AppLocalizations.of(context)!.clickableLinkOpen),
onPressed: () async {
if (await canLaunch(link.url)) {
await launch(link.url);
Navigator.pop(bcontext);
} else {
throw 'Could not launch $link';
final snackBar = SnackBar(
content: Text(AppLocalizations.of(context)!.clickableLinkError),
);
ScaffoldMessenger.of(context).showSnackBar(snackBar);
}
},
),