diff --git a/lib/pages/login_page.dart b/lib/pages/login_page.dart index d51f9e9..cd99e0b 100644 --- a/lib/pages/login_page.dart +++ b/lib/pages/login_page.dart @@ -47,8 +47,8 @@ class LoginPageController extends GetxController { }); } else { Get.snackbar( - "Login failed", - resp.statusMessage ?? "Unknown error", + "Ошибка входа", + resp.statusMessage ?? "Неизвестная ошибка", ); } } on DioError catch (e) { @@ -57,19 +57,19 @@ class LoginPageController extends GetxController { final error = errorData["error"]; if (error != null) { Get.snackbar( - "Login failed", + "Ошибка входа", "$error", ); } } else { Get.snackbar( - "Login failed", + "Ошибка входа", "$e", ); } } catch (e) { Get.snackbar( - "Login failed", + "Ошибка входа", "$e", ); } @@ -109,14 +109,14 @@ class LoginPage extends GetView { TextFormField( enabled: !controller.submitted, decoration: const InputDecoration( - labelText: 'Endpoint', - hintText: 'Enter Tuuli Endpoint', + labelText: 'Адрес бэкенда', + hintText: 'Введите адрес бэкенда Tuuli', ), initialValue: ApiController.to.endPoint, onChanged: (value) => controller.endpoint = value, validator: (value) { if (value == null || value.isEmpty) { - return 'Please enter Tuuli Endpoint'; + return 'Пожалуйста, введите адрес бэкенда Tuuli'; } return null; }, @@ -124,13 +124,13 @@ class LoginPage extends GetView { TextFormField( enabled: !controller.submitted, decoration: const InputDecoration( - labelText: 'Login', - hintText: 'Enter your username', + labelText: 'Логин', + hintText: 'Введите логин', ), onChanged: (value) => controller.username = value, validator: (value) { if (value == null || value.isEmpty) { - return 'Please enter your Login'; + return 'Пожалуйста, введите логин'; } return null; }, @@ -139,13 +139,13 @@ class LoginPage extends GetView { obscureText: true, enabled: !controller.submitted, decoration: const InputDecoration( - labelText: 'Password', - hintText: 'Enter your password', + labelText: 'Пароль', + hintText: 'Введите пароль', ), onChanged: (value) => controller.password = value, validator: (value) { if (value == null || value.isEmpty) { - return 'Please enter your password'; + return 'Пожалуйста, введите пароль'; } return null; }, @@ -156,7 +156,7 @@ class LoginPage extends GetView { !controller.isFormValid || controller.submitted ? null : () => controller.submitForm(), - child: const Text('Login'), + child: const Text('Войти'), ), ], ),