From a911995955a4258b1bc9fb6b2a599a5e2463c9ff Mon Sep 17 00:00:00 2001 From: maxxkim Date: Tue, 19 Dec 2023 10:57:55 +0300 Subject: [PATCH] Switched app language to russian & added some english locales jic --- lib/localization/app_localization.dart | 6 +- .../en_us/en_us_translations.dart | 60 ++++++++--------- lib/localization/ru/ru_translations.dart | 64 +++++++++++++++++++ lib/main.dart | 2 +- .../bloc/language_select_bloc.dart | 4 +- .../language_select_screen.dart | 2 +- 6 files changed, 103 insertions(+), 35 deletions(-) create mode 100644 lib/localization/ru/ru_translations.dart diff --git a/lib/localization/app_localization.dart b/lib/localization/app_localization.dart index e72734ef..d711fa4b 100644 --- a/lib/localization/app_localization.dart +++ b/lib/localization/app_localization.dart @@ -1,3 +1,4 @@ +import 'ru/ru_translations.dart'; import 'en_us/en_us_translations.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/cupertino.dart'; @@ -8,7 +9,10 @@ class AppLocalization { Locale locale; - static final Map> _localizedValues = {'en': enUs}; + static final Map> _localizedValues = {'ru': ru}; + static final Map> __localizedValues = { + 'en': enUs + }; static AppLocalization of() { return Localizations.of( diff --git a/lib/localization/en_us/en_us_translations.dart b/lib/localization/en_us/en_us_translations.dart index c3fd14c5..04c0fc1e 100644 --- a/lib/localization/en_us/en_us_translations.dart +++ b/lib/localization/en_us/en_us_translations.dart @@ -1,64 +1,66 @@ final Map enUs = { // date_of_birth Screen - "date_of_birth": "Дата Рождения", + "date_of_birth": "Date of Birth", // city_of_living Screen - "country": "Страна", "Russia": "Россия", "city": "Город", "Moscow": "Москва", - "place_of_living": "Место проживания", + "country": "Country", "Russia": "Russia", "city": "City", "Moscow": "Moscow", + "place_of_living": "Place of Living", // body_circumferences Screen - "hip_circumference": "Обхват бедр", "chest_circumference": "Обхват груди", - "waist_circumference": "Обхват талии", - "initial_measurements": "Первичные замеры", + "hip_circumference": "Hip circumference", + "chest_circumference": "Chest circumference", + "waist_circumference": "Waist circumference", + "initial_measurements": "Initial measurements", // weight Screen - "weight_measurements": "Замер Веса", "your_weight": "Ваш вес:", + "weight_measurements": "Weight measurements", "your_weight": "Your weight:", "lbl_70": "70", // allergies Screen - "allergies_presence": "Наличие аллергии", + "allergies_presence": "Allergies presence", // medicine_intake Screen - "do_you_take_pills": "Принимаете ли вы лекарства или бады?", + "do_you_take_pills": "Do you take pills or supplements?", // gender Screen - "your_gender": "Ваш пол?", + "your_gender": "Your Gender?", // blood_pressure Screen - "no": "Нет", - "do_you_have_hypertension_tendency": "Есть ли у вас склонность к гипертонии?", - "your_blood_pressure": "Ваше артериальное давление?", - "average_pressure": "Средние показатели давления:", - "do_you_have_hypotension_tendency": "Есть ли у вас склонность к гипотонии?", + "no": "No", + "do_you_have_hypertension_tendency": + "Do you have a tendency for hypertension?", + "your_blood_pressure": "Your blood pressure?", + "average_pressure": "Average pressure:", + "do_you_have_hypotension_tendency": "Do you have a tendency for hypotension?", // favorite_sports Screen - "your_favorite_sports": "Ваши спортивные увлечения?", + "your_favorite_sports": "Your Favorite Sports?", // favorite_foods Screen - "favorite_foods": "Люблю продукты:", - "favorite_unfavorite_foods": "Ваши любимые/нелюбимые продукты питания?", - "unfavorite_foods": "Нелюбимые продукты:", + "favorite_foods": "Favorite Foods:", + "favorite_unfavorite_foods": "Your most ot reast favorite foods?", + "unfavorite_foods": "Unfavorite Foods:", // schedule Screen - "your_schedule": "Ваш режим дня?", + "your_schedule": "Your Daily Schedule?", "tell_your_schedule": - "Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:", + "Tell us about your daily routine, when you wake up, eat, and go to sleep:", // additional_information Screen - "additional_information": "Дополнительная информация:", + "additional_information": "Additional Information:", "enter_additional_information": - "Введите любую дополнительную информацию на своё усмотрение:", + "Enter any additional information you would like to share:", // language_select Screen "lbl_english": "English", - "preferred_language": "Предпочетаемый язык общения?", + "preferred_language": "Preferred Language?", // Common String - "continue": "Продолжить", "skip": "Пропустить", - "fill_in_information": "Заполните информацию:", - "enter_information": "Введите информацию...", + "continue": "Continue", "skip": "Skip", + "fill_in_information": "Fill in Information:", + "enter_information": "Enter Information...", // Network Error String - "msg_network_err": "Сетевая ошибка!", - "msg_something_went_wrong": "Что то пошло не так!", + "msg_network_err": "Network Error!", + "msg_something_went_wrong": "Something went wrong!", }; diff --git a/lib/localization/ru/ru_translations.dart b/lib/localization/ru/ru_translations.dart new file mode 100644 index 00000000..d653273b --- /dev/null +++ b/lib/localization/ru/ru_translations.dart @@ -0,0 +1,64 @@ +final Map ru = { + // date_of_birth Screen + "date_of_birth": "Дата рождения", + + // city_of_living Screen + "country": "Страна", "Russia": "Россия", "city": "Город", "Moscow": "Москва", + "place_of_living": "Место проживания", + + // body_circumferences Screen + "hip_circumference": "Обхват бедр", "chest_circumference": "Обхват груди", + "waist_circumference": "Обхват талии", + "initial_measurements": "Первичные замеры", + + // weight Screen + "weight_measurements": "Замер веса", "your_weight": "Ваш вес:", + "lbl_70": "70", + + // allergies Screen + "allergies_presence": "Наличие аллергии", + + // medicine_intake Screen + "do_you_take_pills": "Принимаете ли вы лекарства или бады?", + + // gender Screen + "your_gender": "Ваш пол?", + + // blood_pressure Screen + "no": "Нет", + "do_you_have_hypertension_tendency": "Есть ли у вас склонность к гипертонии?", + "your_blood_pressure": "Ваше артериальное давление?", + "average_pressure": "Средние показатели давления:", + "do_you_have_hypotension_tendency": "Есть ли у вас склонность к гипотонии?", + + // favorite_sports Screen + "your_favorite_sports": "Ваши спортивные увлечения?", + + // favorite_foods Screen + "favorite_foods": "Люблю продукты:", + "favorite_unfavorite_foods": "Ваши любимые/нелюбимые продукты питания?", + "unfavorite_foods": "Нелюбимые продукты:", + + // schedule Screen + "your_schedule": "Ваш режим дня?", + "tell_your_schedule": + "Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:", + + // additional_information Screen + "additional_information": "Дополнительная информация:", + "enter_additional_information": + "Введите любую дополнительную информацию на своё усмотрение:", + + // language_select Screen + "lbl_english": "English", + "preferred_language": "Предпочетаемый язык общения?", + + // Common String + "continue": "Продолжить", "skip": "Пропустить", + "fill_in_information": "Заполните информацию:", + "enter_information": "Введите информацию...", + +// Network Error String + "msg_network_err": "Сетевая ошибка!", + "msg_something_went_wrong": "Что то пошло не так!", +}; diff --git a/lib/main.dart b/lib/main.dart index e56d855b..5db43df0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -40,7 +40,7 @@ class MyApp extends StatelessWidget { ], supportedLocales: [ Locale( - 'en', + 'ru', '', ), ], diff --git a/lib/presentation/language_select_screen/bloc/language_select_bloc.dart b/lib/presentation/language_select_screen/bloc/language_select_bloc.dart index 20e6503a..8560203b 100644 --- a/lib/presentation/language_select_screen/bloc/language_select_bloc.dart +++ b/lib/presentation/language_select_screen/bloc/language_select_bloc.dart @@ -31,9 +31,7 @@ class LanguageSelectBloc List fillDropdownItemList() { return [ - SelectionPopupModel(id: 1, title: "Item One", isSelected: true), - SelectionPopupModel(id: 2, title: "Item Two"), - SelectionPopupModel(id: 3, title: "Item Three") + SelectionPopupModel(id: 1, title: "Русский", isSelected: true), ]; } } diff --git a/lib/presentation/language_select_screen/language_select_screen.dart b/lib/presentation/language_select_screen/language_select_screen.dart index 91641fdc..2cc0e368 100644 --- a/lib/presentation/language_select_screen/language_select_screen.dart +++ b/lib/presentation/language_select_screen/language_select_screen.dart @@ -55,7 +55,7 @@ class LanguageSelectScreen extends StatelessWidget { imagePath: ImageConstant.imgFavorite, height: 12.adaptSize, width: 12.adaptSize)), - hintText: "lbl_english".tr, + hintText: "Русский".tr, items: languageSelectModelObj?.dropdownItemList ?? [], onChanged: (value) {