[mob][photos] Extract strings
This commit is contained in:
parent
16888c8aad
commit
7c9160478d
6 changed files with 31 additions and 10 deletions
4
mobile/lib/generated/intl/messages_en.dart
generated
4
mobile/lib/generated/intl/messages_en.dart
generated
|
@ -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
mobile/lib/generated/l10n.dart
generated
20
mobile/lib/generated/l10n.dart
generated
|
@ -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> {
|
||||
|
|
|
@ -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?"
|
||||
}
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue