瀏覽代碼

l10n: extract strings

Neeraj Gupta 2 年之前
父節點
當前提交
d98550c84e
共有 5 個文件被更改,包括 203 次插入40 次删除
  1. 31 10
      lib/generated/intl/messages_en.dart
  2. 120 0
      lib/generated/l10n.dart
  3. 24 1
      lib/l10n/intl_en.arb
  4. 11 14
      lib/ui/home/status_bar_widget.dart
  5. 17 15
      lib/utils/magic_util.dart

+ 31 - 10
lib/generated/intl/messages_en.dart

@@ -153,17 +153,20 @@ class MessageLookup extends MessageLookupByLibrary {
   static String m47(endDate) =>
   static String m47(endDate) =>
       "Your subscription will be cancelled on ${endDate}";
       "Your subscription will be cancelled on ${endDate}";
 
 
-  static String m48(storageAmountInGB) =>
+  static String m48(completed, total) =>
+      "${completed}/${total} memories preserved";
+
+  static String m49(storageAmountInGB) =>
       "They also get ${storageAmountInGB} GB";
       "They also get ${storageAmountInGB} GB";
 
 
-  static String m49(email) => "This is ${email}\'s Verification ID";
+  static String m50(email) => "This is ${email}\'s Verification ID";
 
 
-  static String m50(email) => "Verify ${email}";
+  static String m51(email) => "Verify ${email}";
 
 
-  static String m51(count) =>
+  static String m52(count) =>
       "${Intl.plural(count, one: '${count} year ago', other: '${count} years ago')}";
       "${Intl.plural(count, one: '${count} year ago', other: '${count} years ago')}";
 
 
-  static String m52(storageSaved) =>
+  static String m53(storageSaved) =>
       "You have successfully freed up ${storageSaved}!";
       "You have successfully freed up ${storageSaved}!";
 
 
   final messages = _notInlinedMessages(_notInlinedMessages);
   final messages = _notInlinedMessages(_notInlinedMessages);
@@ -205,6 +208,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "albumUpdated": MessageLookupByLibrary.simpleMessage("Album updated"),
         "albumUpdated": MessageLookupByLibrary.simpleMessage("Album updated"),
         "albums": MessageLookupByLibrary.simpleMessage("Albums"),
         "albums": MessageLookupByLibrary.simpleMessage("Albums"),
         "allClear": MessageLookupByLibrary.simpleMessage("✨ All clear"),
         "allClear": MessageLookupByLibrary.simpleMessage("✨ All clear"),
+        "allMemoriesPreserved":
+            MessageLookupByLibrary.simpleMessage("All memories preserved"),
         "allowAddPhotosDescription": MessageLookupByLibrary.simpleMessage(
         "allowAddPhotosDescription": MessageLookupByLibrary.simpleMessage(
             "Allow people with the link to also add photos to the shared album."),
             "Allow people with the link to also add photos to the shared album."),
         "allowAddingPhotos":
         "allowAddingPhotos":
@@ -223,6 +228,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("AppStore subscription"),
             MessageLookupByLibrary.simpleMessage("AppStore subscription"),
         "archive": MessageLookupByLibrary.simpleMessage("Archive"),
         "archive": MessageLookupByLibrary.simpleMessage("Archive"),
         "archiveAlbum": MessageLookupByLibrary.simpleMessage("Archive album"),
         "archiveAlbum": MessageLookupByLibrary.simpleMessage("Archive album"),
+        "archiving": MessageLookupByLibrary.simpleMessage("Archiving..."),
         "areYouSureThatYouWantToLeaveTheFamily":
         "areYouSureThatYouWantToLeaveTheFamily":
             MessageLookupByLibrary.simpleMessage(
             MessageLookupByLibrary.simpleMessage(
                 "Are you sure that you want to leave the family plan?"),
                 "Are you sure that you want to leave the family plan?"),
@@ -476,6 +482,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "email": MessageLookupByLibrary.simpleMessage("Email"),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
         "emailChangedTo": m12,
         "emailChangedTo": m12,
         "emailNoEnteAccount": m13,
         "emailNoEnteAccount": m13,
+        "encryptingBackup":
+            MessageLookupByLibrary.simpleMessage("Encrypting backup..."),
         "encryption": MessageLookupByLibrary.simpleMessage("Encryption"),
         "encryption": MessageLookupByLibrary.simpleMessage("Encryption"),
         "encryptionKeys":
         "encryptionKeys":
             MessageLookupByLibrary.simpleMessage("Encryption keys"),
             MessageLookupByLibrary.simpleMessage("Encryption keys"),
@@ -496,6 +504,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "enterCodeDescription": MessageLookupByLibrary.simpleMessage(
         "enterCodeDescription": MessageLookupByLibrary.simpleMessage(
             "Enter the code provided by your friend to claim free storage for both of you"),
             "Enter the code provided by your friend to claim free storage for both of you"),
         "enterEmail": MessageLookupByLibrary.simpleMessage("Enter email"),
         "enterEmail": MessageLookupByLibrary.simpleMessage("Enter email"),
+        "enterFileName":
+            MessageLookupByLibrary.simpleMessage("Enter file name"),
         "enterNewPasswordToEncrypt": MessageLookupByLibrary.simpleMessage(
         "enterNewPasswordToEncrypt": MessageLookupByLibrary.simpleMessage(
             "Enter a new password we can use to encrypt your data"),
             "Enter a new password we can use to encrypt your data"),
         "enterPassword": MessageLookupByLibrary.simpleMessage("Enter password"),
         "enterPassword": MessageLookupByLibrary.simpleMessage("Enter password"),
@@ -626,6 +636,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "linkNeverExpires": MessageLookupByLibrary.simpleMessage("Never"),
         "linkNeverExpires": MessageLookupByLibrary.simpleMessage("Never"),
         "loadingExifData":
         "loadingExifData":
             MessageLookupByLibrary.simpleMessage("Loading EXIF data..."),
             MessageLookupByLibrary.simpleMessage("Loading EXIF data..."),
+        "loadingGallery":
+            MessageLookupByLibrary.simpleMessage("Loading gallery..."),
         "lockButtonLabel": MessageLookupByLibrary.simpleMessage("Lock"),
         "lockButtonLabel": MessageLookupByLibrary.simpleMessage("Lock"),
         "lockScreenEnablePreSteps": MessageLookupByLibrary.simpleMessage(
         "lockScreenEnablePreSteps": MessageLookupByLibrary.simpleMessage(
             "To enable lockscreen, please setup device passcode or screen lock in your system settings."),
             "To enable lockscreen, please setup device passcode or screen lock in your system settings."),
@@ -822,6 +834,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Removing from favorites..."),
             MessageLookupByLibrary.simpleMessage("Removing from favorites..."),
         "rename": MessageLookupByLibrary.simpleMessage("Rename"),
         "rename": MessageLookupByLibrary.simpleMessage("Rename"),
         "renameAlbum": MessageLookupByLibrary.simpleMessage("Rename album"),
         "renameAlbum": MessageLookupByLibrary.simpleMessage("Rename album"),
+        "renameFile": MessageLookupByLibrary.simpleMessage("Rename file"),
         "renewSubscription":
         "renewSubscription":
             MessageLookupByLibrary.simpleMessage("Renew subscription"),
             MessageLookupByLibrary.simpleMessage("Renew subscription"),
         "renewsOn": m34,
         "renewsOn": m34,
@@ -944,9 +957,16 @@ class MessageLookup extends MessageLookupByLibrary {
             "Looks like your subscription has expired. Please subscribe to enable sharing."),
             "Looks like your subscription has expired. Please subscribe to enable sharing."),
         "subscription": MessageLookupByLibrary.simpleMessage("Subscription"),
         "subscription": MessageLookupByLibrary.simpleMessage("Subscription"),
         "success": MessageLookupByLibrary.simpleMessage("Success"),
         "success": MessageLookupByLibrary.simpleMessage("Success"),
+        "successfullyArchived":
+            MessageLookupByLibrary.simpleMessage("Successfully archived"),
+        "successfullyUnarchived":
+            MessageLookupByLibrary.simpleMessage("Successfully unarchived"),
         "suggestFeatures":
         "suggestFeatures":
             MessageLookupByLibrary.simpleMessage("Suggest features"),
             MessageLookupByLibrary.simpleMessage("Suggest features"),
         "support": MessageLookupByLibrary.simpleMessage("Support"),
         "support": MessageLookupByLibrary.simpleMessage("Support"),
+        "syncProgress": m48,
+        "syncStopped": MessageLookupByLibrary.simpleMessage("Sync stopped"),
+        "syncing": MessageLookupByLibrary.simpleMessage("Syncing..."),
         "systemTheme": MessageLookupByLibrary.simpleMessage("System"),
         "systemTheme": MessageLookupByLibrary.simpleMessage("System"),
         "tapToCopy": MessageLookupByLibrary.simpleMessage("tap to copy"),
         "tapToCopy": MessageLookupByLibrary.simpleMessage("tap to copy"),
         "tapToEnterCode":
         "tapToEnterCode":
@@ -969,7 +989,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage(
             MessageLookupByLibrary.simpleMessage(
                 "The recovery key you entered is incorrect"),
                 "The recovery key you entered is incorrect"),
         "theme": MessageLookupByLibrary.simpleMessage("Theme"),
         "theme": MessageLookupByLibrary.simpleMessage("Theme"),
-        "theyAlsoGetXGb": m48,
+        "theyAlsoGetXGb": m49,
         "thisAlbumAlreadyHDACollaborativeLink":
         "thisAlbumAlreadyHDACollaborativeLink":
             MessageLookupByLibrary.simpleMessage(
             MessageLookupByLibrary.simpleMessage(
                 "This album already has a collaborative link"),
                 "This album already has a collaborative link"),
@@ -981,7 +1001,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "This email is already in use"),
             "This email is already in use"),
         "thisImageHasNoExifData":
         "thisImageHasNoExifData":
             MessageLookupByLibrary.simpleMessage("This image has no exif data"),
             MessageLookupByLibrary.simpleMessage("This image has no exif data"),
-        "thisIsPersonVerificationId": m49,
+        "thisIsPersonVerificationId": m50,
         "thisIsYourVerificationId": MessageLookupByLibrary.simpleMessage(
         "thisIsYourVerificationId": MessageLookupByLibrary.simpleMessage(
             "This is your Verification ID"),
             "This is your Verification ID"),
         "thisWillLogYouOutOfTheFollowingDevice":
         "thisWillLogYouOutOfTheFollowingDevice":
@@ -1015,6 +1035,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "unarchive": MessageLookupByLibrary.simpleMessage("Unarchive"),
         "unarchive": MessageLookupByLibrary.simpleMessage("Unarchive"),
         "unarchiveAlbum":
         "unarchiveAlbum":
             MessageLookupByLibrary.simpleMessage("Unarchive album"),
             MessageLookupByLibrary.simpleMessage("Unarchive album"),
+        "unarchiving": MessageLookupByLibrary.simpleMessage("Unarchiving..."),
         "uncategorized": MessageLookupByLibrary.simpleMessage("Uncategorized"),
         "uncategorized": MessageLookupByLibrary.simpleMessage("Uncategorized"),
         "unhide": MessageLookupByLibrary.simpleMessage("Unhide"),
         "unhide": MessageLookupByLibrary.simpleMessage("Unhide"),
         "unhideToAlbum":
         "unhideToAlbum":
@@ -1045,7 +1066,7 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Verification ID"),
             MessageLookupByLibrary.simpleMessage("Verification ID"),
         "verify": MessageLookupByLibrary.simpleMessage("Verify"),
         "verify": MessageLookupByLibrary.simpleMessage("Verify"),
         "verifyEmail": MessageLookupByLibrary.simpleMessage("Verify email"),
         "verifyEmail": MessageLookupByLibrary.simpleMessage("Verify email"),
-        "verifyEmailID": m50,
+        "verifyEmailID": m51,
         "verifyPassword":
         "verifyPassword":
             MessageLookupByLibrary.simpleMessage("Verify password"),
             MessageLookupByLibrary.simpleMessage("Verify password"),
         "verifying": MessageLookupByLibrary.simpleMessage("Verifying..."),
         "verifying": MessageLookupByLibrary.simpleMessage("Verifying..."),
@@ -1071,7 +1092,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "weveSentAMailTo":
         "weveSentAMailTo":
             MessageLookupByLibrary.simpleMessage("We\'ve sent a mail to"),
             MessageLookupByLibrary.simpleMessage("We\'ve sent a mail to"),
         "yearly": MessageLookupByLibrary.simpleMessage("Yearly"),
         "yearly": MessageLookupByLibrary.simpleMessage("Yearly"),
-        "yearsAgo": m51,
+        "yearsAgo": m52,
         "yes": MessageLookupByLibrary.simpleMessage("Yes"),
         "yes": MessageLookupByLibrary.simpleMessage("Yes"),
         "yesCancel": MessageLookupByLibrary.simpleMessage("Yes, cancel"),
         "yesCancel": MessageLookupByLibrary.simpleMessage("Yes, cancel"),
         "yesConvertToViewer":
         "yesConvertToViewer":
@@ -1099,7 +1120,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "You cannot share with yourself"),
             "You cannot share with yourself"),
         "youDontHaveAnyArchivedItems": MessageLookupByLibrary.simpleMessage(
         "youDontHaveAnyArchivedItems": MessageLookupByLibrary.simpleMessage(
             "You don\'t have any archived items."),
             "You don\'t have any archived items."),
-        "youHaveSuccessfullyFreedUp": m52,
+        "youHaveSuccessfullyFreedUp": m53,
         "yourAccountHasBeenDeleted": MessageLookupByLibrary.simpleMessage(
         "yourAccountHasBeenDeleted": MessageLookupByLibrary.simpleMessage(
             "Your account has been deleted"),
             "Your account has been deleted"),
         "yourPlanWasSuccessfullyDowngraded":
         "yourPlanWasSuccessfullyDowngraded":

+ 120 - 0
lib/generated/l10n.dart

@@ -6021,6 +6021,126 @@ class S {
       args: [],
       args: [],
     );
     );
   }
   }
+
+  /// `All memories preserved`
+  String get allMemoriesPreserved {
+    return Intl.message(
+      'All memories preserved',
+      name: 'allMemoriesPreserved',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Loading gallery...`
+  String get loadingGallery {
+    return Intl.message(
+      'Loading gallery...',
+      name: 'loadingGallery',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Syncing...`
+  String get syncing {
+    return Intl.message(
+      'Syncing...',
+      name: 'syncing',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Encrypting backup...`
+  String get encryptingBackup {
+    return Intl.message(
+      'Encrypting backup...',
+      name: 'encryptingBackup',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Sync stopped`
+  String get syncStopped {
+    return Intl.message(
+      'Sync stopped',
+      name: 'syncStopped',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `{completed}/{total} memories preserved`
+  String syncProgress(int completed, int total) {
+    return Intl.message(
+      '$completed/$total memories preserved',
+      name: 'syncProgress',
+      desc: 'Text to tell user how many memories have been preserved',
+      args: [completed, total],
+    );
+  }
+
+  /// `Archiving...`
+  String get archiving {
+    return Intl.message(
+      'Archiving...',
+      name: 'archiving',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Unarchiving...`
+  String get unarchiving {
+    return Intl.message(
+      'Unarchiving...',
+      name: 'unarchiving',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Successfully archived`
+  String get successfullyArchived {
+    return Intl.message(
+      'Successfully archived',
+      name: 'successfullyArchived',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Successfully unarchived`
+  String get successfullyUnarchived {
+    return Intl.message(
+      'Successfully unarchived',
+      name: 'successfullyUnarchived',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Rename file`
+  String get renameFile {
+    return Intl.message(
+      'Rename file',
+      name: 'renameFile',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Enter file name`
+  String get enterFileName {
+    return Intl.message(
+      'Enter file name',
+      name: 'enterFileName',
+      desc: '',
+      args: [],
+    );
+  }
 }
 }
 
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 24 - 1
lib/l10n/intl_en.arb

@@ -860,5 +860,28 @@
   "yourVerificationCodeHasExpired": "Your verification code has expired",
   "yourVerificationCodeHasExpired": "Your verification code has expired",
   "emailChangedTo": "Email changed to {newEmail}",
   "emailChangedTo": "Email changed to {newEmail}",
   "verifying": "Verifying...",
   "verifying": "Verifying...",
-  "disablingTwofactorAuthentication": "Disabling two-factor authentication..."
+  "disablingTwofactorAuthentication": "Disabling two-factor authentication...",
+  "allMemoriesPreserved": "All memories preserved",
+  "loadingGallery": "Loading gallery...",
+  "syncing": "Syncing...",
+  "encryptingBackup": "Encrypting backup...",
+  "syncStopped": "Sync stopped",
+  "syncProgress": "{completed}/{total} memories preserved",
+  "@syncProgress": {
+    "description": "Text to tell user how many memories have been preserved",
+    "placeholders": {
+      "completed" :{
+        "type": "int"
+      },
+      "total": {
+        "type": "int"
+      }
+    }
+  },
+  "archiving": "Archiving...",
+  "unarchiving": "Unarchiving...",
+  "successfullyArchived": "Successfully archived",
+  "successfullyUnarchived": "Successfully unarchived",
+  "renameFile": "Rename file",
+  "enterFileName": "Enter file name"
 }
 }

+ 11 - 14
lib/ui/home/status_bar_widget.dart

@@ -207,7 +207,7 @@ class RefreshIndicatorWidget extends StatelessWidget {
                 ),
                 ),
                 Padding(
                 Padding(
                   padding: const EdgeInsets.fromLTRB(12, 4, 0, 0),
                   padding: const EdgeInsets.fromLTRB(12, 4, 0, 0),
-                  child: Text(_getRefreshingText()),
+                  child: Text(_getRefreshingText(context)),
                 ),
                 ),
               ],
               ],
             ),
             ),
@@ -217,22 +217,19 @@ class RefreshIndicatorWidget extends StatelessWidget {
     );
     );
   }
   }
 
 
-  String _getRefreshingText() {
+  String _getRefreshingText(BuildContext context) {
     if (event!.status == SyncStatus.startedFirstGalleryImport ||
     if (event!.status == SyncStatus.startedFirstGalleryImport ||
         event!.status == SyncStatus.completedFirstGalleryImport) {
         event!.status == SyncStatus.completedFirstGalleryImport) {
-      return "Loading gallery...";
+      return S.of(context).loadingGallery;
     }
     }
     if (event!.status == SyncStatus.applyingRemoteDiff) {
     if (event!.status == SyncStatus.applyingRemoteDiff) {
-      return "Syncing...";
+      return S.of(context).syncing;
     }
     }
     if (event!.status == SyncStatus.preparingForUpload) {
     if (event!.status == SyncStatus.preparingForUpload) {
-      return "Encrypting backup...";
+      return S.of(context).encryptingBackup;
     }
     }
     if (event!.status == SyncStatus.inProgress) {
     if (event!.status == SyncStatus.inProgress) {
-      return event!.completed.toString() +
-          "/" +
-          event!.total.toString() +
-          " memories preserved";
+      return S.of(context).syncProgress(event!.completed!, event!.total!);
     }
     }
     if (event!.status == SyncStatus.paused) {
     if (event!.status == SyncStatus.paused) {
       return event!.reason;
       return event!.reason;
@@ -242,10 +239,10 @@ class RefreshIndicatorWidget extends StatelessWidget {
     }
     }
     if (event!.status == SyncStatus.completedBackup) {
     if (event!.status == SyncStatus.completedBackup) {
       if (event!.wasStopped) {
       if (event!.wasStopped) {
-        return "Sync stopped";
+        return S.of(context).syncStopped;
       }
       }
     }
     }
-    return "All memories preserved";
+    return S.of(context).allMemoriesPreserved;
   }
   }
 }
 }
 
 
@@ -272,9 +269,9 @@ class SyncStatusCompletedWidget extends StatelessWidget {
                   color: Theme.of(context).colorScheme.greenAlternative,
                   color: Theme.of(context).colorScheme.greenAlternative,
                   size: 22,
                   size: 22,
                 ),
                 ),
-                const Padding(
-                  padding: EdgeInsets.only(left: 12),
-                  child: Text("All memories preserved"),
+                Padding(
+                  padding: const EdgeInsets.only(left: 12),
+                  child: Text(S.of(context).allMemoriesPreserved),
                 ),
                 ),
               ],
               ],
             ),
             ),

+ 17 - 15
lib/utils/magic_util.dart

@@ -3,6 +3,7 @@ import 'package:logging/logging.dart';
 import 'package:path/path.dart';
 import 'package:path/path.dart';
 import 'package:photos/core/event_bus.dart';
 import 'package:photos/core/event_bus.dart';
 import 'package:photos/events/force_reload_home_gallery_event.dart';
 import 'package:photos/events/force_reload_home_gallery_event.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/models/collection.dart';
 import 'package:photos/models/collection.dart';
 import 'package:photos/models/file.dart';
 import 'package:photos/models/file.dart';
 import 'package:photos/models/magic_metadata.dart';
 import 'package:photos/models/magic_metadata.dart';
@@ -22,9 +23,8 @@ Future<void> changeVisibility(
   final dialog = createProgressDialog(
   final dialog = createProgressDialog(
     context,
     context,
     newVisibility == visibilityArchive
     newVisibility == visibilityArchive
-        ? "Archiving..."
-        : "Unarchiving..."
-            "...",
+        ? S.of(context).archiving
+        : S.of(context).unarchiving,
   );
   );
   await dialog.show();
   await dialog.show();
   try {
   try {
@@ -32,8 +32,8 @@ Future<void> changeVisibility(
     showShortToast(
     showShortToast(
       context,
       context,
       newVisibility == visibilityArchive
       newVisibility == visibilityArchive
-          ? "Successfully archived"
-          : "Successfully unarchived",
+          ? S.of(context).successfullyArchived
+          : S.of(context).successfullyUnarchived,
     );
     );
 
 
     await dialog.hide();
     await dialog.hide();
@@ -51,7 +51,9 @@ Future<void> changeCollectionVisibility(
 ) async {
 ) async {
   final dialog = createProgressDialog(
   final dialog = createProgressDialog(
     context,
     context,
-    newVisibility == visibilityArchive ? "Archiving..." : "Unarchiving...",
+    newVisibility == visibilityArchive
+        ? S.of(context).archiving
+        : S.of(context).unarchiving,
   );
   );
   await dialog.show();
   await dialog.show();
   try {
   try {
@@ -62,8 +64,8 @@ Future<void> changeCollectionVisibility(
     showShortToast(
     showShortToast(
       context,
       context,
       newVisibility == visibilityArchive
       newVisibility == visibilityArchive
-          ? "Successfully archived"
-          : "Successfully unarchived",
+          ? S.of(context).successfullyArchived
+          : S.of(context).successfullyUnarchived,
     );
     );
 
 
     await dialog.hide();
     await dialog.hide();
@@ -88,7 +90,7 @@ Future<bool> editTime(
     );
     );
     return true;
     return true;
   } catch (e) {
   } catch (e) {
-    showShortToast(context, 'something went wrong');
+    showShortToast(context, S.of(context).somethingWentWrong);
     return false;
     return false;
   }
   }
 }
 }
@@ -102,12 +104,12 @@ Future<void> editFilename(
   final extName = extension(fileName);
   final extName = extension(fileName);
   final result = await showTextInputDialog(
   final result = await showTextInputDialog(
     context,
     context,
-    title: "Rename file",
-    submitButtonLabel: "Rename",
+    title: S.of(context).renameFile,
+    submitButtonLabel: S.of(context).rename,
     initialValue: nameWithoutExt,
     initialValue: nameWithoutExt,
     message: extName.toUpperCase(),
     message: extName.toUpperCase(),
     alignMessage: Alignment.centerRight,
     alignMessage: Alignment.centerRight,
-    hintText: "Enter file name",
+    hintText: S.of(context).enterFileName,
     maxLength: 50,
     maxLength: 50,
     alwaysShowSuccessState: true,
     alwaysShowSuccessState: true,
     onSubmit: (String text) async {
     onSubmit: (String text) async {
@@ -147,7 +149,7 @@ Future<bool> editFileCaption(
     return true;
     return true;
   } catch (e) {
   } catch (e) {
     if (context != null) {
     if (context != null) {
-      showShortToast(context, "Something went wrong");
+      showShortToast(context, S.of(context).somethingWentWrong);
     }
     }
     return false;
     return false;
   }
   }
@@ -166,7 +168,7 @@ Future<void> _updatePublicMetadata(
   }
   }
   ProgressDialog? dialog;
   ProgressDialog? dialog;
   if (context != null && showProgressDialogs) {
   if (context != null && showProgressDialogs) {
-    dialog = createProgressDialog(context, 'Please wait...');
+    dialog = createProgressDialog(context, S.of(context).pleaseWait);
     await dialog.show();
     await dialog.show();
   }
   }
   try {
   try {
@@ -174,7 +176,7 @@ Future<void> _updatePublicMetadata(
     await FileMagicService.instance.updatePublicMagicMetadata(files, update);
     await FileMagicService.instance.updatePublicMagicMetadata(files, update);
     if (context != null) {
     if (context != null) {
       if (showDoneToast) {
       if (showDoneToast) {
-        showShortToast(context, 'Done');
+        showShortToast(context, S.of(context).done);
       }
       }
       await dialog?.hide();
       await dialog?.hide();
     }
     }