Language Change

This commit is contained in:
Nilanjan Chakrabarti
2025-07-10 13:19:31 +05:30
parent 9b439338a9
commit d4de89a91f
22 changed files with 334 additions and 227 deletions

View File

@@ -36,7 +36,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
// Call your backend logic here
final snackBar = SnackBar(
content: const Text('Card has been blocked'),
content: Text(AppLocalizations.of(context).cardBlocked),
action: SnackBarAction(
label: 'X',
onPressed: () {
@@ -62,8 +62,8 @@ class _BlockCardScreen extends State<BlockCardScreen> {
Navigator.pop(context);
},
),
title: const Text(
'Block Card',
title: Text(
AppLocalizations.of(context).blockCard,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
@@ -109,7 +109,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
textInputAction: TextInputAction.next,
validator: (value) => value != null && value.length == 11
? null
: 'Enter valid card number',
: AppLocalizations.of(context).enterValidCardNumber,
),
const SizedBox(height: 24),
Row(
@@ -135,7 +135,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
obscureText: true,
validator: (value) => value != null && value.length == 3
? null
: 'CVV must be 3 digits',
: AppLocalizations.of(context).cvv3Digits,
),
),
const SizedBox(width: 16),
@@ -160,7 +160,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
),
validator: (value) => value != null && value.isNotEmpty
? null
: 'Select expiry date',
: AppLocalizations.of(context).selectExpiryDate,
),
),
],

View File

@@ -18,8 +18,8 @@ class _CardManagementScreen extends State<CardManagementScreen> {
return Scaffold(
appBar: AppBar(
automaticallyImplyLeading: false,
title: const Text(
'Card Management',
title: Text(
AppLocalizations.of(context).cardManagement,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,

View File

@@ -52,8 +52,8 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
Navigator.pop(context);
},
),
title: const Text(
'Card Details',
title: Text(
AppLocalizations.of(context).cardDetails,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
@@ -99,7 +99,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
textInputAction: TextInputAction.next,
validator: (value) => value != null && value.length == 11
? null
: 'Enter valid card number',
: AppLocalizations.of(context).enterValidCardNumber,
),
const SizedBox(height: 24),
Row(
@@ -125,7 +125,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
obscureText: true,
validator: (value) => value != null && value.length == 3
? null
: 'CVV must be 3 digits',
: AppLocalizations.of(context).cvv3Digits,
),
),
const SizedBox(width: 16),
@@ -150,7 +150,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
),
validator: (value) => value != null && value.isNotEmpty
? null
: 'Select expiry date',
: AppLocalizations.of(context).selectExpiryDate,
),
),
],
@@ -176,7 +176,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
keyboardType: TextInputType.phone,
validator: (value) => value != null && value.length >= 10
? null
: 'Enter valid phone number',
: AppLocalizations.of(context).enterValidPhone,
),
const SizedBox(height: 45),
Align(

View File

@@ -19,7 +19,7 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
if (_formKey.currentState!.validate()) {
// Handle PIN submission logic here
final snackBar = SnackBar(
content: const Text('PIN set successfully'),
content: Text(AppLocalizations.of(context).pinSetSuccess),
action: SnackBarAction(
label: 'X',
onPressed: () {
@@ -52,8 +52,8 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
Navigator.pop(context);
},
),
title: const Text(
'Card PIN',
title: Text(
AppLocalizations.of(context).cardPin,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
@@ -82,8 +82,8 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
TextFormField(
controller: _pinController,
obscureText: true,
decoration: const InputDecoration(
labelText: 'Enter new PIN',
decoration: InputDecoration(
labelText: AppLocalizations.of(context).enterNewPin,
border: OutlineInputBorder(),
isDense: true,
filled: true,
@@ -99,10 +99,10 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
textInputAction: TextInputAction.next,
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter new PIN';
return AppLocalizations.of(context).pleaseEnterNewPin;
}
if (value.length < 4) {
return 'PIN must be at least 4 digits';
return AppLocalizations.of(context).pin4Digits;
}
return null;
},
@@ -111,8 +111,8 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
TextFormField(
controller: _confirmPinController,
obscureText: true,
decoration: const InputDecoration(
labelText: 'Enter Again',
decoration: InputDecoration(
labelText: AppLocalizations.of(context).enterAgain,
border: OutlineInputBorder(),
isDense: true,
filled: true,
@@ -128,7 +128,7 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
textInputAction: TextInputAction.done,
validator: (value) {
if (value != _pinController.text) {
return 'PINs do not match';
return AppLocalizations.of(context).pinsDoNotMatch;
}
return null;
},
@@ -146,7 +146,7 @@ class _CardPinSetScreen extends State<CardPinSetScreen> {
backgroundColor: Colors.blue[900],
foregroundColor: Colors.white,
),
child: const Text('Submit'),
child: Text(AppLocalizations.of(context).submit),
),
),
),