added account settings texts to I18n
This commit is contained in:
@@ -50,34 +50,34 @@ class AccountSettingsScreen extends ConsumerWidget {
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.personalData);},
|
||||
icon: SFIcons.account,
|
||||
text: 'Personal Data'
|
||||
text: I18n.legacyPersonalData
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){},
|
||||
icon: Icons.add_circle_outline,
|
||||
text: 'Add a new SaveFamily'
|
||||
text: I18n.legacyAddNewSF
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.linkedDevices);},
|
||||
icon: Icons.account_circle_outlined,
|
||||
text: 'Linked Devices'
|
||||
text: I18n.legacyLinkedDevices
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){navigationContract.pushTo(AppRoutes.appUsers);},
|
||||
icon: Icons.groups_outlined,
|
||||
text: 'App Users'
|
||||
text: I18n.legacyAppUsers
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 16, big: 15)),
|
||||
AppSectionButton(
|
||||
onPressed: (){},
|
||||
icon: SFIcons.privacy,
|
||||
text: 'User privacy policy'
|
||||
text: I18n.legacyPrivacyPolicy
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 48, big: 47)),
|
||||
PrimaryButton(text: 'Log out', color: Color(0xFF588EA5))
|
||||
PrimaryButton(text: context.translate(I18n.legacyLogOut), color: Color(0xFF588EA5))
|
||||
],
|
||||
),
|
||||
)),
|
||||
|
||||
@@ -53,7 +53,7 @@ class AppUsersScreen extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
Center(
|
||||
child: Text(context.translate('App users'),
|
||||
child: Text(context.translate(I18n.legacyAppUsers),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 28, big: 27)
|
||||
),
|
||||
@@ -87,7 +87,7 @@ class AppUsersScreen extends ConsumerWidget {
|
||||
),
|
||||
child: PrimaryButton(
|
||||
onPressed: vm.toggleIsEditing,
|
||||
text: 'Save',
|
||||
text: context.translate(I18n.legacySave),
|
||||
color: Color(0xFF588EA5),
|
||||
height: SizeUtils.getByScreen(small: 44, big: 42),
|
||||
),
|
||||
@@ -148,12 +148,12 @@ class AppUserCard extends ConsumerWidget {
|
||||
fontWeight: FontWeight.w500
|
||||
)
|
||||
),
|
||||
Text('Account: ${user.email}',
|
||||
Text(context.translate(I18n.legacyUserAccount, args: {'email': user.email}),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 14, big: 13),
|
||||
)
|
||||
),
|
||||
Text('Role: ${user.role}',
|
||||
Text(context.translate(I18n.legacyUserRole, args: {'role': user.role}),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 14, big: 13),
|
||||
)
|
||||
@@ -178,7 +178,7 @@ class AppUserCard extends ConsumerWidget {
|
||||
height: SizeUtils.getByScreen(small: 195, big: 185),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Are you sure you want to delete this user from the list?',
|
||||
Text(context.translate(I18n.legacyDeleteUserDialog),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 19, big: 18)),
|
||||
),
|
||||
@@ -188,7 +188,7 @@ class AppUserCard extends ConsumerWidget {
|
||||
children: [
|
||||
Expanded(child: PrimaryButton(
|
||||
onPressed: (){Navigator.pop(context);},
|
||||
text: 'Cancel',
|
||||
text: context.translate(I18n.legacyCancel),
|
||||
color: Color(0xFF588EA5),
|
||||
height: SizeUtils.getByScreen(small: 38, big: 36),
|
||||
radius: SizeUtils.getByScreen(small: 32, big: 34),
|
||||
@@ -198,7 +198,7 @@ class AppUserCard extends ConsumerWidget {
|
||||
onPressed: (){
|
||||
Navigator.pop(context);
|
||||
},
|
||||
text: 'Delete',
|
||||
text: context.translate(I18n.legacyDelete),
|
||||
color: Color(0xFF588EA5),
|
||||
height: SizeUtils.getByScreen(small: 38, big: 36),
|
||||
radius: SizeUtils.getByScreen(small: 32, big: 34),
|
||||
|
||||
@@ -36,7 +36,7 @@ class EditLinkedDeviceScreen extends ConsumerWidget {
|
||||
IconButton(onPressed: () {Navigator.pop(context);},
|
||||
icon: Icon(Icons.arrow_back)),
|
||||
Center(
|
||||
child: Text(context.translate('Edit device'),
|
||||
child: Text(context.translate(I18n.legacyEditDeviceTitle),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 28, big: 27)
|
||||
),
|
||||
@@ -87,13 +87,13 @@ class EditLinkedDeviceScreen extends ConsumerWidget {
|
||||
CustomTextField(
|
||||
controller: vm.deviceNameController,
|
||||
hint: device.name,
|
||||
label: 'Name',
|
||||
label: context.translate(I18n.legacyName),
|
||||
)
|
||||
],
|
||||
),
|
||||
PrimaryButton(
|
||||
onPressed: (){vm.updateDevice(device);},
|
||||
text: 'Save',
|
||||
text: context.translate(I18n.legacySave),
|
||||
color: Color(0xFF588EA5)
|
||||
)
|
||||
],
|
||||
|
||||
@@ -52,7 +52,7 @@ class LinkedDevicesScreen extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
Center(
|
||||
child: Text(context.translate('Linked Devices'),
|
||||
child: Text(context.translate(I18n.legacyLinkedDevices),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 28, big: 27)
|
||||
),
|
||||
@@ -161,7 +161,7 @@ class LinkedDeviceCard extends ConsumerWidget {
|
||||
height: SizeUtils.getByScreen(small: 195, big: 185),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Are you sure you want to delete this device from the list?',
|
||||
Text(context.translate(I18n.legacyDeleteDeviceDialog),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 19, big: 18)),
|
||||
),
|
||||
@@ -171,7 +171,7 @@ class LinkedDeviceCard extends ConsumerWidget {
|
||||
children: [
|
||||
Expanded(child: PrimaryButton(
|
||||
onPressed: (){Navigator.pop(context);},
|
||||
text: 'Cancel',
|
||||
text: context.translate(I18n.legacyCancel),
|
||||
color: Color(0xFF588EA5),
|
||||
height: SizeUtils.getByScreen(small: 38, big: 36),
|
||||
radius: SizeUtils.getByScreen(small: 32, big: 34),
|
||||
@@ -179,17 +179,10 @@ class LinkedDeviceCard extends ConsumerWidget {
|
||||
SizedBox(width: SizeUtils.getByScreen(small: 4, big: 16)),
|
||||
Expanded(child: PrimaryButton(
|
||||
onPressed: () async {
|
||||
if (!await onDelete()) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: CustomSnackBar(
|
||||
message: 'AAAAAAAAA',
|
||||
type: MessageType.warning,
|
||||
).build(context))
|
||||
);
|
||||
}
|
||||
await onDelete();
|
||||
Navigator.pop(context);
|
||||
},
|
||||
text: 'Delete',
|
||||
text: context.translate(I18n.legacyDelete),
|
||||
color: Color(0xFF588EA5),
|
||||
height: SizeUtils.getByScreen(small: 38, big: 36),
|
||||
radius: SizeUtils.getByScreen(small: 32, big: 34),
|
||||
|
||||
@@ -34,7 +34,7 @@ class PersonalDataScreen extends ConsumerWidget {
|
||||
IconButton(onPressed: () {Navigator.pop(context);},
|
||||
icon: Icon(Icons.arrow_back)),
|
||||
Center(
|
||||
child: Text(context.translate('Personal data'),
|
||||
child: Text(context.translate(I18n.legacyPersonalData),
|
||||
style: TextStyle(
|
||||
fontSize: SizeUtils.getByScreen(small: 28, big: 27)
|
||||
),
|
||||
@@ -82,7 +82,7 @@ class PersonalDataScreen extends ConsumerWidget {
|
||||
],
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 18, big: 16)),
|
||||
Text('(Login email)',
|
||||
Text(context.translate(I18n.legacyLoginEmail),
|
||||
style: TextStyle(fontSize: SizeUtils.getByScreen(small: 14, big: 13))
|
||||
),
|
||||
Text(state.user?.email ?? '',
|
||||
@@ -92,33 +92,33 @@ class PersonalDataScreen extends ConsumerWidget {
|
||||
CustomTextField(
|
||||
controller: vm.nameController,
|
||||
hint: state.user?.firstName ?? '',
|
||||
label: 'Name',
|
||||
label: context.translate(I18n.legacyUserNameLabel),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
CustomTextField(
|
||||
controller: vm.phoneController,
|
||||
hint: state.user?.phone ?? '',
|
||||
label: 'Phone number',
|
||||
label: context.translate(I18n.legacyUserPhoneLabel),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
CustomTextField(
|
||||
controller: vm.emailController,
|
||||
hint: state.user?.email ?? '',
|
||||
label: 'Email',
|
||||
label: context.translate(I18n.legacyContactEmailLabel),
|
||||
),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
CustomTextField(
|
||||
controller: vm.passwordController,
|
||||
showPassword: state.showPassword,
|
||||
hint: '********',
|
||||
label: 'Password (6 to 12 digits)',
|
||||
label: context.translate(I18n.passwordLabel),
|
||||
),
|
||||
],
|
||||
))),
|
||||
SizedBox(height: SizeUtils.getByScreen(small: 24, big: 22)),
|
||||
PrimaryButton(
|
||||
onPressed: vm.updateUser,
|
||||
text: 'Submit',
|
||||
text: context.translate(I18n.legacySubmit),
|
||||
color: Color(0xFF588EA5)
|
||||
)
|
||||
],
|
||||
|
||||
@@ -139,5 +139,25 @@
|
||||
"watchesOnMap": "Smartwatch on the map",
|
||||
"home": "Home",
|
||||
"location": "Location",
|
||||
"chat": "Chat"
|
||||
"chat": "Chat",
|
||||
"personalData": "Personal Data",
|
||||
"addNewSF": "Add a new SaveFamily",
|
||||
"linkedDevices": "Linked Devices",
|
||||
"appUsers": "App Users",
|
||||
"privacyPolicy": "User privacy policy",
|
||||
"logOut": "Log out",
|
||||
"loginEmail": "(Login email)",
|
||||
"userNameLabel": "User name",
|
||||
"userPhoneLabel": "User phone number",
|
||||
"contactEmailLabel": "Contact email",
|
||||
"passwordLabel": "Password (6 to 12 digits)",
|
||||
"submit": "Submit",
|
||||
"save": "Save",
|
||||
"editDeviceTitle": "Edit Device",
|
||||
"name": "Name",
|
||||
"deleteDeviceDialog": "Are you sure you want to delete this device from the list?",
|
||||
"cancel": "Cancel",
|
||||
"delete": "Delete",
|
||||
"userAccount": "Account: {email}",
|
||||
"userRole": "Role: {role}"
|
||||
}
|
||||
@@ -139,5 +139,25 @@
|
||||
"watchesOnMap": "Reloj inteligente en el mapa",
|
||||
"home": "Inicio",
|
||||
"location": "Mapa",
|
||||
"chat": "Chat"
|
||||
"chat": "Chat",
|
||||
"personalData": "Datos Personales",
|
||||
"addNewSF": "Añadir un nuevo SaveFamily",
|
||||
"linkedDevices": "Dispositivos vinculados",
|
||||
"appUsers": "Usuarios de la App",
|
||||
"privacyPolicy": "Política de privacidad",
|
||||
"logOut": "Cerrar sesión",
|
||||
"loginEmail": "(Correo electrónico)",
|
||||
"userNameLabel": "Nombre del usuario",
|
||||
"userPhoneLabel": "Número de teléfono del usuario",
|
||||
"contactEmailLabel": "Correo de contacto",
|
||||
"passwordLabel": "Contraseña (de 6 a 12 caracteres)",
|
||||
"submit": "Enviar",
|
||||
"save": "Guardar",
|
||||
"editDeviceTitle": "Editar Dispositivo",
|
||||
"name": "Nombre",
|
||||
"deleteDeviceDialog": "¿Estás seguro de que quieres eliminar este dispositivo de la lista?",
|
||||
"cancel": "Cancelar",
|
||||
"delete": "Eliminar",
|
||||
"userAccount": "Cuenta: {email}",
|
||||
"userRole": "Rol: {role}"
|
||||
}
|
||||
@@ -170,4 +170,25 @@ class I18n {
|
||||
static const String home = 'home';
|
||||
static const String location = 'location';
|
||||
static const String chat = 'chat';
|
||||
static const String legacyPersonalData = 'personalData';
|
||||
static const String legacyAddNewSF = 'addNewSF';
|
||||
static const String legacyLinkedDevices = 'linkedDevices';
|
||||
static const String legacyAppUsers = 'appUsers';
|
||||
static const String legacyPrivacyPolicy = 'privacyPolicy';
|
||||
static const String legacyLogOut = 'logOut';
|
||||
static const String legacyLoginEmail = 'loginEmail';
|
||||
static const String legacyUserNameLabel = 'userNameLabel';
|
||||
static const String legacyUserPhoneLabel = 'userPhoneLabel';
|
||||
static const String legacyContactEmailLabel = 'contactEmailLabel';
|
||||
static const String passwordLabel = 'passwordLabel';
|
||||
static const String legacySubmit = 'submit';
|
||||
static const String legacySave = 'save';
|
||||
static const String legacyEditDeviceTitle = 'editDeviceTitle';
|
||||
static const String legacyName = 'name';
|
||||
static const String legacyDeleteDeviceDialog = 'deleteDeviceDialog';
|
||||
static const String legacyDeleteUserDialog = 'deleteUserDialog';
|
||||
static const String legacyCancel = 'cancel';
|
||||
static const String legacyDelete = 'delete';
|
||||
static const String legacyUserAccount = 'userAccount';
|
||||
static const String legacyUserRole = 'userRole';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user