Forráskód Böngészése

Convert error dialogs to lowercase

Vishnu Mohandas 4 éve
szülő
commit
e86e38739a

+ 3 - 3
lib/services/user_service.dart

@@ -52,8 +52,8 @@ class UserService {
         } else if (response.statusCode == 403) {
           showErrorDialog(
             context,
-            "Please wait...",
-            "We are currently not accepting new registrations. You have been added to the waitlist and we will let you know once we are ready for you.",
+            "please wait...",
+            "we are currently not accepting new registrations. you have been added to the waitlist and we will let you know once we are ready for you.",
           );
         }
       } else {
@@ -114,7 +114,7 @@ class UserService {
         );
       } else {
         showErrorDialog(
-            context, "Oops.", "Verification failed, please try again.");
+            context, "oops", "verification failed, please try again");
       }
     });
   }

+ 2 - 2
lib/ui/email_entry_page.dart

@@ -181,8 +181,8 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                 onPressed: _email != null && _name != null
                     ? () {
                         if (!isValidEmail(_email)) {
-                          showErrorDialog(context, "Invalid email address",
-                              "Please enter a valid email address.");
+                          showErrorDialog(context, "invalid email address",
+                              "please enter a valid email address.");
                           return;
                         }
                         _config.setEmail(_email);

+ 2 - 2
lib/ui/password_entry_page.dart

@@ -118,8 +118,8 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
                             ? () {
                                 if (_passwordController1.text !=
                                     _passwordController2.text) {
-                                  showErrorDialog(context, "Uhm...",
-                                      "The passwords you entered don't match.");
+                                  showErrorDialog(context, "uhm...",
+                                      "the passwords you entered don't match");
                                 } else {
                                   _showPasswordConfirmationDialog();
                                 }

+ 4 - 4
lib/ui/share_collection_widget.dart

@@ -149,15 +149,15 @@ class _SharingDialogState extends State<SharingDialog> {
     String publicKey,
   }) async {
     if (!isValidEmail(email)) {
-      showErrorDialog(context, "Invalid email address",
-          "Please enter a valid email address.");
+      showErrorDialog(context, "invalid email address",
+          "please enter a valid email address.");
       return;
     } else if (email == Configuration.instance.getEmail()) {
-      showErrorDialog(context, "Oops", "You cannot share with yourself.");
+      showErrorDialog(context, "oops", "you cannot share with yourself");
       return;
     } else if (widget.collection.sharees.any((user) => user.email == email)) {
       showErrorDialog(
-          context, "Oops", "You're already sharing this with " + email + ".");
+          context, "oops", "you're already sharing this with " + email);
       return;
     }
     if (publicKey == null) {

+ 2 - 3
lib/utils/dialog_util.dart

@@ -27,7 +27,7 @@ void showErrorDialog(BuildContext context, String title, String content) {
     content: Text(content),
     actions: [
       FlatButton(
-        child: Text("OK"),
+        child: Text("ok"),
         onPressed: () {
           Navigator.of(context).pop();
         },
@@ -44,6 +44,5 @@ void showErrorDialog(BuildContext context, String title, String content) {
 }
 
 void showGenericErrorDialog(BuildContext context) {
-  showErrorDialog(
-      context, "Oops.", "Sorry, something went wrong. Please try again.");
+  showErrorDialog(context, "something went wrong", "please try again.");
 }