ソースを参照

Capitalize words

Neeraj Gupta 3 年 前
コミット
de7e9d97fc

+ 1 - 1
lib/ui/billing_questions_widget.dart

@@ -29,7 +29,7 @@ class BillingQuestionsWidget extends StatelessWidget {
           faqs.add(Padding(
             padding: const EdgeInsets.all(24),
             child: Text(
-              "faqs",
+              "FAQs",
               style: TextStyle(
                 fontSize: 18,
                 fontWeight: FontWeight.bold,

+ 5 - 5
lib/ui/change_email_dialog.dart

@@ -16,7 +16,7 @@ class _ChangeEmailDialogState extends State<ChangeEmailDialog> {
   @override
   Widget build(BuildContext context) {
     return AlertDialog(
-      title: Text("enter your email address"),
+      title: Text("Enter your email address"),
       content: SingleChildScrollView(
         child: Column(
           mainAxisAlignment: MainAxisAlignment.start,
@@ -46,7 +46,7 @@ class _ChangeEmailDialogState extends State<ChangeEmailDialog> {
       actions: [
         TextButton(
           child: Text(
-            "cancel",
+            "Cancel",
             style: TextStyle(
               color: Colors.redAccent,
             ),
@@ -57,15 +57,15 @@ class _ChangeEmailDialogState extends State<ChangeEmailDialog> {
         ),
         TextButton(
           child: Text(
-            "verify",
+            "Verify",
             style: TextStyle(
               color: Colors.green,
             ),
           ),
           onPressed: () {
             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;
             }
             UserService.instance.getOtt(context, _email, isChangeEmail: true);

+ 2 - 2
lib/ui/common/report_bug_popup.dart

@@ -10,7 +10,7 @@ PopupMenuButton<dynamic> reportBugPopupMenu(BuildContext context) {
           value: 1,
           child: Row(
             children: const [
-              Text("contact support"),
+              Text("Contact support"),
             ],
           ),
         ),
@@ -19,7 +19,7 @@ PopupMenuButton<dynamic> reportBugPopupMenu(BuildContext context) {
     },
     onSelected: (value) async {
       if (value == 1) {
-        await sendLogs(context, "contact support", "support@ente.io",
+        await sendLogs(context, "Contact support", "support@ente.io",
             postShare: () {});
       }
     },

+ 1 - 1
lib/ui/common_elements.dart

@@ -6,7 +6,7 @@ Widget nothingToSeeHere({Color textColor}) {
     child: Padding(
       padding: const EdgeInsets.all(8.0),
       child: Text(
-        "nothing to see here! 👀",
+        "Nothing to see here! 👀",
         style: TextStyle(
           fontFamily: "Inter",
           color: textColor.withOpacity(0.35),

+ 6 - 6
lib/ui/create_collection_page.dart

@@ -24,13 +24,13 @@ String _actionName(CollectionActionType type, bool plural) {
   String text = "";
   switch (type) {
     case CollectionActionType.addFiles:
-      text = "add file";
+      text = "Add file";
       break;
     case CollectionActionType.moveFiles:
-      text = "move file";
+      text = "Move file";
       break;
     case CollectionActionType.restoreFiles:
-      text = "restore file";
+      text = "Restore file";
       break;
   }
   return text + titleSuffix;
@@ -280,7 +280,7 @@ class _CreateCollectionPageState extends State<CreateCollectionPage> {
       return true;
     } on AssertionError catch (e, s) {
       await dialog.hide();
-      showErrorDialog(context, "oops", e.message);
+      showErrorDialog(context, "Oops", e.message);
       return false;
     } catch (e, s) {
       _logger.severe("Could not move to album", e, s);
@@ -291,7 +291,7 @@ class _CreateCollectionPageState extends State<CreateCollectionPage> {
   }
 
   Future<bool> _restoreFilesToCollection(int toCollectionID) async {
-    final dialog = createProgressDialog(context, "restoring files...");
+    final dialog = createProgressDialog(context, "Restoring files...");
     await dialog.show();
     try {
       await CollectionsService.instance
@@ -302,7 +302,7 @@ class _CreateCollectionPageState extends State<CreateCollectionPage> {
       return true;
     } on AssertionError catch (e, s) {
       await dialog.hide();
-      showErrorDialog(context, "oops", e.message);
+      showErrorDialog(context, "Oops", e.message);
       return false;
     } catch (e, s) {
       _logger.severe("Could not move to album", e, s);

+ 2 - 2
lib/ui/detail_page.dart

@@ -267,10 +267,10 @@ class _DetailPageState extends State<DetailPage> {
       _logger.severe("Attempt to edit unowned file", UnauthorizedEditError(),
           StackTrace.current);
       showErrorDialog(context, "Sorry",
-          "we don't support editing photos and albums that you don't own yet");
+          "We don't support editing photos and albums that you don't own yet");
       return;
     }
-    final dialog = createProgressDialog(context, "please wait...");
+    final dialog = createProgressDialog(context, "Please wait...");
     await dialog.show();
     final imageProvider =
         ExtendedFileImageProvider(await getFile(file), cacheRawData: true);

+ 6 - 6
lib/ui/fading_bottom_bar.dart

@@ -62,7 +62,7 @@ class FadingBottomBarState extends State<FadingBottomBar> {
     List<Widget> children = [];
     children.add(
       Tooltip(
-        message: "info",
+        message: "Info",
         child: Padding(
           padding: const EdgeInsets.only(top: 12, bottom: 12),
           child: IconButton(
@@ -83,7 +83,7 @@ class FadingBottomBarState extends State<FadingBottomBar> {
           widget.file.fileType == FileType.livePhoto) {
         children.add(
           Tooltip(
-            message: "edit",
+            message: "Edit",
             child: Padding(
               padding: const EdgeInsets.only(top: 12, bottom: 12),
               child: IconButton(
@@ -102,7 +102,7 @@ class FadingBottomBarState extends State<FadingBottomBar> {
             widget.file.magicMetadata.visibility == kVisibilityArchive;
         children.add(
           Tooltip(
-            message: isArchived ? "unarchive" : "archive",
+            message: isArchived ? "Unhide" : "Hide",
             child: Padding(
               padding: const EdgeInsets.only(top: 12, bottom: 12),
               child: IconButton(
@@ -128,7 +128,7 @@ class FadingBottomBarState extends State<FadingBottomBar> {
       }
       children.add(
         Tooltip(
-          message: "share",
+          message: "Share",
           child: Padding(
             padding: const EdgeInsets.only(top: 12, bottom: 12),
             child: IconButton(
@@ -174,7 +174,7 @@ class FadingBottomBarState extends State<FadingBottomBar> {
   void _addTrashOptions(List<Widget> children) {
     children.add(
       Tooltip(
-        message: "restore",
+        message: "Restore",
         child: Padding(
           padding: const EdgeInsets.only(top: 12, bottom: 12),
           child: IconButton(
@@ -199,7 +199,7 @@ class FadingBottomBarState extends State<FadingBottomBar> {
 
     children.add(
       Tooltip(
-        message: "delete",
+        message: "Delete",
         child: Padding(
           padding: const EdgeInsets.only(top: 12, bottom: 12),
           child: IconButton(

+ 1 - 1
lib/ui/gallery_app_bar_widget.dart

@@ -203,7 +203,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
 
   Future<void> _showShareCollectionDialog() async {
     var collection = widget.collection;
-    final dialog = createProgressDialog(context, "please wait...");
+    final dialog = createProgressDialog(context, "Please wait...");
     await dialog.show();
     try {
       if (collection == null) {

+ 2 - 2
lib/ui/gallery_overlay_widget.dart

@@ -352,7 +352,7 @@ class _OverlayWidgetState extends State<OverlayWidget> {
         widget.type == GalleryType.archive) {
       bool showArchive = widget.type == GalleryType.homepage;
       actions.add(Tooltip(
-        message: showArchive ? "archive" : "unarchive",
+        message: showArchive ? "Hide" : "Unhide",
         child: IconButton(
           color: Colors.black, //same for both themes
           icon: Icon(
@@ -370,7 +370,7 @@ class _OverlayWidgetState extends State<OverlayWidget> {
 
   void _addTrashAction(List<Widget> actions) {
     actions.add(Tooltip(
-      message: "restore",
+      message: "Restore",
       child: IconButton(
         color: Colors.black, //same for both themes
         icon: Icon(

+ 4 - 4
lib/ui/home_widget.dart

@@ -124,19 +124,19 @@ class _HomeWidgetState extends State<HomeWidget> {
     _triggerLogoutEvent =
         Bus.instance.on<TriggerLogoutEvent>().listen((event) async {
       AlertDialog alert = AlertDialog(
-        title: Text("session expired"),
-        content: Text("please login again"),
+        title: Text("Session expired"),
+        content: Text("Please login again"),
         actions: [
           TextButton(
             child: Text(
-              "ok",
+              "Ok",
               style: TextStyle(
                 color: Theme.of(context).buttonColor,
               ),
             ),
             onPressed: () async {
               Navigator.of(context, rootNavigator: true).pop('dialog');
-              final dialog = createProgressDialog(context, "logging out...");
+              final dialog = createProgressDialog(context, "Logging out...");
               await dialog.show();
               await Configuration.instance.logout();
               await dialog.hide();

+ 1 - 1
lib/ui/image_editor_page.dart

@@ -364,7 +364,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
         ),
       );
     } catch (e, s) {
-      showToast("oops, could not save edits");
+      showToast("Oops, could not save edits");
       _logger.severe(e, s);
     }
     await dialog.hide();

+ 2 - 2
lib/ui/manage_links_widget.dart

@@ -413,12 +413,12 @@ class _ManageSharedLinkWidgetState extends State<ManageSharedLinkWidget> {
 
   Future<void> _updateUrlSettings(
       BuildContext context, Map<String, dynamic> prop) async {
-    final dialog = createProgressDialog(context, "please wait...");
+    final dialog = createProgressDialog(context, "Please wait...");
     await dialog.show();
     try {
       await CollectionsService.instance.updateShareUrl(widget.collection, prop);
       await dialog.hide();
-      showToast("album updated");
+      showToast("Album updated");
     } catch (e) {
       await dialog.hide();
       await showGenericErrorDialog(context);

+ 1 - 1
lib/ui/ott_verification_page.dart

@@ -186,7 +186,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
                       UserService.instance.getOtt(context, widget.email,
                           isCreateAccountScreen: widget.isCreateAccountScreen);
                     },
-                    child: Text("resend email",
+                    child: Text("Resend email",
                         style: Theme.of(context).textTheme.subtitle1.copyWith(
                             fontSize: 14,
                             decoration: TextDecoration

+ 1 - 1
lib/ui/password_entry_page.dart

@@ -661,7 +661,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
       Configuration.instance.setVolatilePassword(null);
       await dialog.hide();
       onDone() async {
-        final dialog = createProgressDialog(context, "please wait...");
+        final dialog = createProgressDialog(context, "Please wait...");
         await dialog.show();
         try {
           await UserService.instance.setAttributes(result);

+ 4 - 4
lib/ui/password_reentry_page.dart

@@ -60,7 +60,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
           isFormValid: _passwordController.text.isNotEmpty,
           buttonText: 'Log in',
           onPressedFunction: () async {
-            final dialog = createProgressDialog(context, "please wait...");
+            final dialog = createProgressDialog(context, "Please wait...");
             await dialog.show();
             try {
               await Configuration.instance.decryptAndSaveSecrets(
@@ -173,7 +173,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
                       behavior: HitTestBehavior.opaque,
                       onTap: () async {
                         final dialog =
-                            createProgressDialog(context, "please wait...");
+                            createProgressDialog(context, "Please wait...");
                         await dialog.show();
                         await Configuration.instance.logout();
                         await dialog.hide();
@@ -182,7 +182,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
                       },
                       child: Container(
                         child: Center(
-                          child: Text("change email",
+                          child: Text("Change email",
                               style: Theme.of(context)
                                   .textTheme
                                   .subtitle1
@@ -208,7 +208,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
         //     onPressed: _passwordController.text.isNotEmpty
         //         ? () async {
         //             final dialog =
-        //                 createProgressDialog(context, "please wait...");
+        //                 createProgressDialog(context, "Please wait...");
         //             await dialog.show();
         //             try {
         //               await Configuration.instance.decryptAndSaveSecrets(

+ 5 - 5
lib/ui/payment/child_subscription_widget.dart

@@ -125,17 +125,17 @@ class ChildSubscriptionWidget extends StatelessWidget {
   Future<void> _leaveFamilyPlan(BuildContext context) async {
     final choice = await showChoiceDialog(
       context,
-      'leave family',
-      'are you sure that you want to leave the family plan?',
-      firstAction: 'no',
-      secondAction: 'yes',
+      'Leave family',
+      'Are you sure that you want to leave the family plan?',
+      firstAction: 'No',
+      secondAction: 'Yes',
       firstActionColor: Theme.of(context).buttonColor,
       secondActionColor: Colors.white,
     );
     if (choice != DialogUserChoice.secondChoice) {
       return;
     }
-    final dialog = createProgressDialog(context, "please wait...");
+    final dialog = createProgressDialog(context, "Please wait...");
     await dialog.show();
     try {
       await UserService.instance.leaveFamilyPlan();

+ 2 - 2
lib/ui/payment/payment_web_page.dart

@@ -47,7 +47,7 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
 
   @override
   Widget build(BuildContext context) {
-    _dialog = createProgressDialog(context, "please wait...");
+    _dialog = createProgressDialog(context, "Please wait...");
     if (initPaymentUrl == null) {
       return loadWidget;
     }
@@ -55,7 +55,7 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
         onWillPop: () async => _buildPageExitWidget(context),
         child: Scaffold(
           appBar: AppBar(
-            title: const Text('subscription'),
+            title: const Text('Subscription'),
           ),
           body: Column(
             children: <Widget>[

+ 1 - 1
lib/ui/payment/stripe_subscription_page.dart

@@ -121,7 +121,7 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
   Widget _getBody() {
     if (!_isLoading) {
       _isLoading = true;
-      _dialog = createProgressDialog(context, "please wait...");
+      _dialog = createProgressDialog(context, "Please wait...");
       _fetchSub();
     }
     if (_hasLoadedData) {

+ 1 - 1
lib/ui/payment/subscription_page.dart

@@ -129,7 +129,7 @@ class _SubscriptionPageState extends State<SubscriptionPage> {
       _isLoading = true;
       _fetchSubData();
     }
-    _dialog = createProgressDialog(context, "please wait...");
+    _dialog = createProgressDialog(context, "Please wait...");
     final appBar = AppBar(
       title: Text("Subscription"),
     );

+ 2 - 2
lib/ui/sessions_page.dart

@@ -108,7 +108,7 @@ class _SessionsPageState extends State<SessionsPage> {
   }
 
   Future<void> _terminateSession(Session session) async {
-    final dialog = createProgressDialog(context, "please wait...");
+    final dialog = createProgressDialog(context, "Please wait...");
     await dialog.show();
     try {
       await UserService.instance.terminateSession(session.token);
@@ -118,7 +118,7 @@ class _SessionsPageState extends State<SessionsPage> {
       await dialog.hide();
       _logger.severe('failed to terminate', e, s);
       showErrorDialog(
-          context, 'oops', "something went wrong, please try again");
+          context, 'Oops', "Something went wrong, please try again");
     }
   }
 

+ 11 - 4
lib/ui/settings/security_section_widget.dart

@@ -26,7 +26,7 @@ class SecuritySectionWidget extends StatefulWidget {
 
 class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
   static const kAuthToViewSessions =
-      "please authenticate to view your active sessions";
+      "Please authenticate to view your active sessions";
 
   final _config = Configuration.instance;
 
@@ -70,7 +70,10 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
             child: Row(
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
               children: [
-                Text("Two-factor", style: Theme.of(context).textTheme.subtitle1,),
+                Text(
+                  "Two-factor",
+                  style: Theme.of(context).textTheme.subtitle1,
+                ),
                 FutureBuilder(
                   future: UserService.instance.fetchTwoFactorStatus(),
                   builder: (_, snapshot) {
@@ -117,7 +120,10 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
         child: Row(
           mainAxisAlignment: MainAxisAlignment.spaceBetween,
           children: [
-            Text("Lockscreen", style: Theme.of(context).textTheme.subtitle1,),
+            Text(
+              "Lockscreen",
+              style: Theme.of(context).textTheme.subtitle1,
+            ),
             Switch.adaptive(
               value: _config.shouldShowLockScreen(),
               onChanged: (value) async {
@@ -147,7 +153,8 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
             child: Row(
               mainAxisAlignment: MainAxisAlignment.spaceBetween,
               children: [
-                Text("Hide from recents", style: Theme.of(context).textTheme.subtitle1),
+                Text("Hide from recents",
+                    style: Theme.of(context).textTheme.subtitle1),
                 Switch.adaptive(
                   value: _config.shouldHideFromRecents(),
                   onChanged: (value) async {

+ 10 - 10
lib/ui/share_collection_widget.dart

@@ -314,19 +314,19 @@ 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) {
-      final dialog = createProgressDialog(context, "searching for user...");
+      final dialog = createProgressDialog(context, "Searching for user...");
       await dialog.show();
 
       publicKey = await UserService.instance.getPublicKey(email);
@@ -335,9 +335,9 @@ class _SharingDialogState extends State<SharingDialog> {
     if (publicKey == null) {
       Navigator.of(context, rootNavigator: true).pop('dialog');
       final dialog = AlertDialog(
-        title: Text("invite to ente?"),
+        title: Text("Invite to ente?"),
         content: Text(
-          "looks like " +
+          "Looks like " +
               email +
               " hasn't signed up for ente yet. would you like to invite them?",
           style: TextStyle(
@@ -347,7 +347,7 @@ class _SharingDialogState extends State<SharingDialog> {
         actions: [
           TextButton(
             child: Text(
-              "invite",
+              "Invite",
               style: TextStyle(
                 color: Theme.of(context).buttonColor,
               ),
@@ -366,7 +366,7 @@ class _SharingDialogState extends State<SharingDialog> {
         },
       );
     } else {
-      final dialog = createProgressDialog(context, "sharing...");
+      final dialog = createProgressDialog(context, "Sharing...");
       await dialog.show();
       final collection = widget.collection;
       try {
@@ -380,7 +380,7 @@ class _SharingDialogState extends State<SharingDialog> {
         await CollectionsService.instance
             .share(widget.collection.id, email, publicKey);
         await dialog.hide();
-        showToast("shared successfully!");
+        showShortToast("Shared successfully!");
         setState(() {
           _sharees.add(User(email: email));
           _showEntryField = false;

+ 6 - 6
lib/utils/magic_util.dart

@@ -18,13 +18,13 @@ final _logger = Logger('MagicUtil');
 Future<void> changeVisibility(
     BuildContext context, List<File> files, int newVisibility) async {
   final dialog = createProgressDialog(context,
-      newVisibility == kVisibilityArchive ? "archiving..." : "unarchiving...");
+      newVisibility == kVisibilityArchive ? "Hiding..." : "Unhiding...");
   await dialog.show();
   try {
     await FileMagicService.instance.changeVisibility(files, newVisibility);
     showShortToast(newVisibility == kVisibilityArchive
-        ? "successfully archived"
-        : "successfully unarchived");
+        ? "Successfully hidden"
+        : "Successfully unhidden");
 
     await dialog.hide();
   } catch (e, s) {
@@ -37,7 +37,7 @@ Future<void> changeVisibility(
 Future<void> changeCollectionVisibility(
     BuildContext context, Collection collection, int newVisibility) async {
   final dialog = createProgressDialog(context,
-      newVisibility == kVisibilityArchive ? "archiving..." : "unarchiving...");
+      newVisibility == kVisibilityArchive ? "Hiding..." : "Unhiding...");
   await dialog.show();
   try {
     Map<String, dynamic> update = {kMagicKeyVisibility: newVisibility};
@@ -45,8 +45,8 @@ Future<void> changeCollectionVisibility(
     // Force reload home gallery to pull in the now unarchived files
     Bus.instance.fire(ForceReloadHomeGalleryEvent());
     showShortToast(newVisibility == kVisibilityArchive
-        ? "successfully archived"
-        : "successfully unarchived");
+        ? "Successfully hidden"
+        : "Successfully unhidden");
 
     await dialog.hide();
   } catch (e, s) {