adding i18n to all other pages batch3
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:math';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import '../../l10n/app_localizations.dart';
|
||||
import '../../providers/token_manager.dart';
|
||||
import 'Bookmarks_api_service.dart';
|
||||
|
||||
@@ -27,7 +28,8 @@ class _UpdateEntityScreenState extends State<UpdateEntityScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('Update Bookmarks')),
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.updateBookmarks)),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
@@ -41,7 +43,8 @@ class _UpdateEntityScreenState extends State<UpdateEntityScreen> {
|
||||
const InputDecoration(labelText: 'bookmark_firstletter'),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter a bookmark_firstletter';
|
||||
return AppLocalizations.of(context)!.pleaseEnterThis(
|
||||
'bookmark_firstletter');
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -55,7 +58,8 @@ class _UpdateEntityScreenState extends State<UpdateEntityScreen> {
|
||||
decoration: const InputDecoration(labelText: 'bookmark_link'),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter a bookmark_link';
|
||||
return AppLocalizations.of(context)!.pleaseEnterThis(
|
||||
'bookmark_link');
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -70,7 +74,8 @@ class _UpdateEntityScreenState extends State<UpdateEntityScreen> {
|
||||
const InputDecoration(labelText: 'fileupload_field'),
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Please enter a fileupload_field';
|
||||
return AppLocalizations.of(context)!.pleaseEnterThis(
|
||||
'fileupload_field');
|
||||
}
|
||||
return null;
|
||||
},
|
||||
@@ -99,11 +104,14 @@ class _UpdateEntityScreenState extends State<UpdateEntityScreen> {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Error'),
|
||||
content: Text('Failed to update entity: $e'),
|
||||
title: Text(AppLocalizations.of(context)!
|
||||
.error),
|
||||
content: Text(AppLocalizations.of(context)!
|
||||
.failedUpdateEntity(e.toString())),
|
||||
actions: [
|
||||
TextButton(
|
||||
child: const Text('OK'),
|
||||
child: Text(AppLocalizations.of(context)!
|
||||
.ok),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user