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

@@ -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),
),
),
),