Przeglądaj źródła

[mob][photos] Extract strings

Neeraj Gupta 1 rok temu
rodzic
commit
7c9160478d

+ 4 - 0
mobile/lib/generated/intl/messages_en.dart

@@ -1342,6 +1342,10 @@ class MessageLookup extends MessageLookupByLibrary {
         "sparkleSuccess": MessageLookupByLibrary.simpleMessage("✨ Success"),
         "startBackup": MessageLookupByLibrary.simpleMessage("Start backup"),
         "status": MessageLookupByLibrary.simpleMessage("Status"),
+        "stopCastingBody": MessageLookupByLibrary.simpleMessage(
+            "Do you want to stop casting?"),
+        "stopCastingTitle":
+            MessageLookupByLibrary.simpleMessage("Stop casting"),
         "storage": MessageLookupByLibrary.simpleMessage("Storage"),
         "storageBreakupFamily": MessageLookupByLibrary.simpleMessage("Family"),
         "storageBreakupYou": MessageLookupByLibrary.simpleMessage("You"),

+ 20 - 0
mobile/lib/generated/l10n.dart

@@ -8643,6 +8643,26 @@ class S {
       args: [],
     );
   }
+
+  /// `Stop casting`
+  String get stopCastingTitle {
+    return Intl.message(
+      'Stop casting',
+      name: 'stopCastingTitle',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Do you want to stop casting?`
+  String get stopCastingBody {
+    return Intl.message(
+      'Do you want to stop casting?',
+      name: 'stopCastingBody',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 3 - 1
mobile/lib/l10n/intl_en.arb

@@ -1220,5 +1220,7 @@
   "connectToDevice": "Connect to device",
   "autoCastDialogBody": "You'll see available Cast devices here.",
   "autoCastiOSPermission": "Make sure Local Network permissions are turned on for the Ente Photos app, in Settings.",
-  "noDeviceFound": "No device found"
+  "noDeviceFound": "No device found",
+  "stopCastingTitle": "Stop casting",
+  "stopCastingBody": "Do you want to stop casting?"
 }

+ 0 - 2
mobile/lib/ui/cast/auto.dart

@@ -113,8 +113,6 @@ class _AutoCastDialogState extends State<AutoCastDialog> {
     BuildContext context,
     Object castDevice,
   ) async {
-    // sleep for 10 seconds
-    await Future.delayed(const Duration(seconds: 10));
     await castService.connectDevice(
       context,
       castDevice,

+ 4 - 5
mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart

@@ -863,10 +863,10 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
     if (castService.getActiveSessions().isNotEmpty) {
       await showChoiceDialog(
         context,
-        title: "Stop casting",
-        firstButtonLabel: "Yes",
-        secondButtonLabel: "No",
-        body: "Do you want to stop casting?",
+        title: S.of(context).stopCastingTitle,
+        firstButtonLabel: S.of(context).yes,
+        secondButtonLabel: S.of(context).no,
+        body: S.of(context).stopCastingBody,
         firstButtonOnTap: () async {
           gw.revokeAllTokens().ignore();
           await castService.closeActiveCasts();
@@ -884,7 +884,6 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
         return const CastChooseDialog();
       },
     );
-    _logger.info("Cast result: $result");
     if (result == null) {
       return;
     }

+ 0 - 2
mobile/plugins/ente_cast_normal/lib/src/service.dart

@@ -39,8 +39,6 @@ class CastServiceImpl extends CastService {
 
     session.stateStream.listen((state) {
       if (state == CastSessionState.connected) {
-        const snackBar = SnackBar(content: Text('Connected'));
-        ScaffoldMessenger.of(context).showSnackBar(snackBar);
         debugPrint("Send request to pair");
         session.sendMessage(_pairRequestNamespace, {});
       } else if (state == CastSessionState.closed) {