File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 308
308
"@loginServerUrlInputLabel": {
309
309
"description": "Input label in login page for Zulip server URL entry."
310
310
},
311
+ "errorUnableToOpenLinkTitle": "Unable to open link",
312
+ "@errorUnableToOpenLinkTitle": {
313
+ "description": "Error title when a link fails to open."
314
+ },
315
+ "errorUnableToOpenLinkMessage": "Link could not be opened: {url}",
316
+ "@errorUnableToOpenLinkMessage": {
317
+ "description": "Error message when a link fails to open.",
318
+ "placeholders": {
319
+ "url": {"type": "String", "example": "http://example.com/"}
320
+ }
321
+ },
311
322
"loginHidePassword": "Hide password",
312
323
"@loginHidePassword": {
313
324
"description": "Icon label for button to hide password in input form."
Original file line number Diff line number Diff line change 1
1
import 'package:flutter/foundation.dart' ;
2
2
import 'package:flutter/material.dart' ;
3
3
import 'package:flutter/services.dart' ;
4
+ import 'package:flutter_gen/gen_l10n/zulip_localizations.dart' ;
4
5
5
6
import '../model/binding.dart' ;
6
7
import '../model/internal_link.dart' ;
@@ -10,11 +11,12 @@ import 'store.dart';
10
11
11
12
/// Handles showing an error dialog with a customizable message.
12
13
Future <void > _showError (BuildContext context, String ? message, String urlString) {
14
+ final zulipLocalizations = ZulipLocalizations .of (context);
13
15
return showErrorDialog (
14
16
context: context,
15
- title: 'Unable to open link' ,
17
+ title: zulipLocalizations.errorUnableToOpenLinkTitle ,
16
18
message: [
17
- 'Link could not be opened: $ urlString ' ,
19
+ zulipLocalizations. errorUnableToOpenLinkMessage ( urlString) ,
18
20
if (message != null ) message,
19
21
].join ("\n\n " ));
20
22
}
You can’t perform that action at this time.
0 commit comments