From b8f671d160c714ee26fe35143084b25296c853a4 Mon Sep 17 00:00:00 2001 From: rrandomsky Date: Tue, 23 Apr 2024 15:09:18 +0200 Subject: [PATCH] [BH-1941] Add translations for Focus timer app Added a translations for new texts in Focus timer application. --- image/system_a/data/lang/Deutsch.json | 17 ++++++++------ image/system_a/data/lang/English.json | 5 +++- image/system_a/data/lang/Espanol.json | 23 +++++++++++-------- image/system_a/data/lang/Francais.json | 13 +++++++---- image/system_a/data/lang/Polski.json | 23 +++++++++++-------- .../data/FocusTimerStyle.hpp | 4 ++-- .../presenter/FocusTimerPresenter.cpp | 2 +- .../windows/FocusTimerWindow.cpp | 20 +++++++--------- 8 files changed, 59 insertions(+), 48 deletions(-) diff --git a/image/system_a/data/lang/Deutsch.json b/image/system_a/data/lang/Deutsch.json index 6f2f4e797566f15668934aac4736a6afaac03ed9..1480dac1479ba98329932d7d2295e75e540ce8b8 100644 --- a/image/system_a/data/lang/Deutsch.json +++ b/image/system_a/data/lang/Deutsch.json @@ -31,12 +31,16 @@ "app_bell_focus_settings": "Einstellungen", "app_bell_focus_start": "Nun konzentriert", "app_bell_focus_time": "Konzent.-Timer", - "app_bell_focus_repeats": "-", + "app_bell_focus_repeats": "Timer-Wiederholung", "app_bell_focus_short_break": "Kurze Pause", "app_bell_focus_long_break": "Lange Pause", - "app_bell_focus_long_break_after": "-", - "app_bell_focus_time_once": "-", - "app_bell_focus_time_many": "-", + "app_bell_focus_time_for_focus": "Konzentration", + "app_bell_focus_time_for_break": "Nun eine Pause", + "app_bell_focus_well_done": "Super!", + "app_bell_focus_long_break_after": "Lange Pause nach", + "app_bell_focus_time_once": "Konzent.-Phase", + "app_bell_focus_time_many": "Konzent.-Phase", + "app_bell_focus_summary": "Super! $VALUE Konzentration

beendet.
", "app_bell_goodbye": "Auf Wiedersehen", "app_bell_greeting_msg": [ "Guten Morgen! Stehen Sie auf" @@ -74,7 +78,6 @@ "app_bell_relaxation_sounds": "Entspannende Sounds", "app_bell_relaxation_timer_title": "Timer", "app_bell_relaxation_uploaded_sounds": "Hochgeladene Sounds", - "app_bell_focus_timer_summary": "", "app_bell_settings_about": "Information", "app_bell_settings_about_info_text": "www.mudita.com", "app_bell_settings_about_info_title": "Handbuch & Zertifikat-Info", @@ -621,8 +624,8 @@ "common_mo": "MO", "common_mon": "Mo", "common_monday": "Montag", - "common_multiplicity_once": "mal", - "common_multiplicity_many": "mal", + "common_multiplicity_once": "Mal", + "common_multiplicity_many": "Mal", "common_no": "Nein", "common_november": "November", "common_october": "Oktober", diff --git a/image/system_a/data/lang/English.json b/image/system_a/data/lang/English.json index fb9bd487b3ce9c2599b1afba888c96b79b20ed3b..f3f5782ad4d8e96b30bc00eb04b0d7b2a31b0783 100644 --- a/image/system_a/data/lang/English.json +++ b/image/system_a/data/lang/English.json @@ -35,9 +35,13 @@ "app_bell_focus_repeats": "Focus timer repeats", "app_bell_focus_short_break": "Short break", "app_bell_focus_long_break": "Long break", + "app_bell_focus_time_for_focus": "Time to focus", + "app_bell_focus_time_for_break": "Time for a break", + "app_bell_focus_well_done": "Well done!", "app_bell_focus_long_break_after": "Long break after", "app_bell_focus_time_once": "focus time", "app_bell_focus_time_many": "focus times", + "app_bell_focus_summary": "Well done! $VALUE focus

complete.
", "app_bell_goodbye": "Goodbye", "app_bell_greeting_msg": [ "Good Morning!
It's a Beautiful Day!
", @@ -107,7 +111,6 @@ "app_bell_relaxation_sounds": "Relaxation sounds", "app_bell_relaxation_timer_title": "Relaxation time", "app_bell_relaxation_uploaded_sounds": "Uploaded sounds", - "app_bell_focus_timer_summary": "Well done! $VALUE focus

complete.
", "app_bell_reset_message": "Resetting Mudita
Harmony
", "app_bell_settings_about": "About", "app_bell_settings_about_info_text": "www.mudita.com", diff --git a/image/system_a/data/lang/Espanol.json b/image/system_a/data/lang/Espanol.json index 7e4d0eb2811ef07bdc79b9841622d34941ed3167..5e7932b8179b3afc936ea85e0134f9cf92cc862e 100644 --- a/image/system_a/data/lang/Espanol.json +++ b/image/system_a/data/lang/Espanol.json @@ -28,14 +28,18 @@ "app_bell_charging_done_notification": "Completamente cargado", "app_bell_charging_notification": "Cargando", "app_bell_focus_settings": "Ajustes", - "app_bell_focus_start": "Concéntrate", - "app_bell_focus_time": "T. de concentración", - "app_bell_focus_repeats": "-", - "app_bell_focus_short_break": "Descanso pequeño", - "app_bell_focus_long_break": "Descanso largo", - "app_bell_focus_long_break_after": "-", - "app_bell_focus_time_once": "-", - "app_bell_focus_time_many": "-", + "app_bell_focus_start": "Conc\u00e9ntrate", + "app_bell_focus_time": "Tempo focus", + "app_bell_focus_repeats": "Concentraci\u00f3n repite", + "app_bell_focus_short_break": "Pausa breve", + "app_bell_focus_long_break": "Pausa larga", + "app_bell_focus_time_for_focus": "\u00a1A concentrarse!", + "app_bell_focus_time_for_break": "\u00a1Toca descansar!", + "app_bell_focus_well_done": "\u00a1Genial!", + "app_bell_focus_long_break_after": "Pausa larga tras", + "app_bell_focus_time_once": "concentraci\u00f3n", + "app_bell_focus_time_many": "concentraciones", + "app_bell_focus_summary": "\u00a1Genial! Te has concentrado

$VALUE
", "app_bell_goodbye": "Adi\u00f3s", "app_bell_greeting_msg": [ "\u00a1Hola! Lev\u00e1ntate y brilla" @@ -73,7 +77,6 @@ "app_bell_relaxation_sounds": "Sonidos de relajaci\u00f3n", "app_bell_relaxation_timer_title": "Temporizador", "app_bell_relaxation_uploaded_sounds": "Sonidos subidos", - "app_bell_focus_timer_summary": "", "app_bell_settings_about": "Informaci\u00f3n", "app_bell_settings_about_info_text": "www.mudita.com", "app_bell_settings_about_info_title": "Manual y certificaci\u00f3n", @@ -130,7 +133,7 @@ "app_bell_welcome_message": "Mudita Harmony
est\u00e1 apagado
", "app_bellmain_alarm": "Alarma", "app_bellmain_bedtime": "Hora de dormir", - "app_bellmain_focus_timer": "T. de concentración", + "app_bellmain_focus_timer": "Tempo focus", "app_bellmain_home_screen_bottom_desc": "La siguiente alarma sonar\u00e1", "app_bellmain_home_screen_bottom_desc_and": "&", "app_bellmain_home_screen_bottom_desc_dp": "Presionar a fondo para activar", diff --git a/image/system_a/data/lang/Francais.json b/image/system_a/data/lang/Francais.json index 88f07ed68f84fcb0dbb0c9c316be76196f28bbf5..0bbdbfbb8d17bb17cf12d35f79e9448a44b11147 100644 --- a/image/system_a/data/lang/Francais.json +++ b/image/system_a/data/lang/Francais.json @@ -32,12 +32,16 @@ "app_bell_focus_settings": "Param\u00e8tres", "app_bell_focus_start": "Concentration", "app_bell_focus_time": "Minuteur concen.", - "app_bell_focus_repeats": "-", + "app_bell_focus_repeats": "Minuteur en boucle", "app_bell_focus_short_break": "Petite pause", "app_bell_focus_long_break": "Longue pause", - "app_bell_focus_long_break_after": "-", - "app_bell_focus_time_once": "-", - "app_bell_focus_time_many": "-", + "app_bell_focus_time_for_focus": "H de la concen.", + "app_bell_focus_time_for_break": "H de la pause", + "app_bell_focus_well_done": "Bien jou\u00e9 !", + "app_bell_focus_long_break_after": "Longue pause apr\u00e8s", + "app_bell_focus_time_once": "temps de concen.", + "app_bell_focus_time_many": "temps de concen.", + "app_bell_focus_summary": "Super ! $VALUE de

concentration \u00e9coul\u00e9es.
", "app_bell_goodbye": "Au revoir", "app_bell_greeting_msg": [ "Re-bonjour!" @@ -75,7 +79,6 @@ "app_bell_relaxation_sounds": "Sons de relaxation", "app_bell_relaxation_timer_title": "Minuterie", "app_bell_relaxation_uploaded_sounds": "Sons t\u00e9l\u00e9charg\u00e9s", - "app_bell_focus_timer_summary": "", "app_bell_settings_about": "\u00c0 propos", "app_bell_settings_about_info_text": "www.mudita.com", "app_bell_settings_about_info_title": "Manuel et certification", diff --git a/image/system_a/data/lang/Polski.json b/image/system_a/data/lang/Polski.json index ccb9236f68f81460e904b318b6b352a0700eac82..a584beba550f95ea92885788c48d011bd42302b7 100644 --- a/image/system_a/data/lang/Polski.json +++ b/image/system_a/data/lang/Polski.json @@ -29,14 +29,18 @@ "app_bell_charging_done_notification": "W pe\u0142ni na\u0142adowany", "app_bell_charging_notification": "\u0141adowanie", "app_bell_focus_settings": "Ustawienia", - "app_bell_focus_start": "Skup się", - "app_bell_focus_time": "Timer skupienia", - "app_bell_focus_repeats": "-", - "app_bell_focus_short_break": "Krótka przerwa", - "app_bell_focus_long_break": "Długa przerwa", - "app_bell_focus_long_break_after": "Długa przerwa po", - "app_bell_focus_time_once": "-", - "app_bell_focus_time_many": "-", + "app_bell_focus_start": "Skup si\u0119", + "app_bell_focus_time": "Czas skupienia", + "app_bell_focus_repeats": "Powtarzanie skupienia", + "app_bell_focus_short_break": "Kr\u00f3tka przerwa", + "app_bell_focus_long_break": "D\u0142uga przerwa", + "app_bell_focus_time_for_focus": "Czas si\u0119 skupi\u0107", + "app_bell_focus_time_for_break": "Czas na przerw\u0119", + "app_bell_focus_well_done": "Dobra robota!", + "app_bell_focus_long_break_after": "D\u0142uga przerwa po", + "app_bell_focus_time_once": "czasie skupienia", + "app_bell_focus_time_many": "czasach skupienia", + "app_bell_focus_summary": "\u015awietnie! $VALUE skupienia

za tob\u0105.
", "app_bell_goodbye": "Do widzenia", "app_bell_greeting_msg": [ "Dzie\u0144 dobry!
Pobudka
" @@ -74,7 +78,6 @@ "app_bell_relaxation_sounds": "D\u017awi\u0119ki relaksacji", "app_bell_relaxation_timer_title": "Wy\u0142\u0105cznik czasowy", "app_bell_relaxation_uploaded_sounds": "Przes\u0142ane d\u017awi\u0119ki", - "app_bell_focus_timer_summary": "", "app_bell_settings_about": "O produkcie", "app_bell_settings_about_info_text": "www.mudita.com", "app_bell_settings_about_info_title": "Instrukcja i informacje dot. certyfikacji", @@ -131,7 +134,7 @@ "app_bell_welcome_message": "Mudita Harmony
jest wy\u0142\u0105czony
", "app_bellmain_alarm": "Alarm", "app_bellmain_bedtime": "Pora snu", - "app_bellmain_focus_timer": "Timer skupienia", + "app_bellmain_focus_timer": "Zegar skupienia", "app_bellmain_home_screen_bottom_desc": "Alarm zadzwoni", "app_bellmain_home_screen_bottom_desc_and": "i", "app_bellmain_home_screen_bottom_desc_dp": "Naci\u015bnij g\u0142\u0119boko, aby aktywowa\u0107", diff --git a/products/BellHybrid/apps/application-bell-focus-timer/data/FocusTimerStyle.hpp b/products/BellHybrid/apps/application-bell-focus-timer/data/FocusTimerStyle.hpp index b6f66dec278eed4ebc4a71793b20955ee57b1bb2..eea2c7cbb8a21ca1f5a7bc2491c2f16aba1cc3ed 100644 --- a/products/BellHybrid/apps/application-bell-focus-timer/data/FocusTimerStyle.hpp +++ b/products/BellHybrid/apps/application-bell-focus-timer/data/FocusTimerStyle.hpp @@ -44,8 +44,8 @@ namespace app::focusTimerStyle namespace bottomDescription { inline constexpr auto marginTop = 38u; - inline constexpr auto maxSizeX = style::bell_base_layout::w; - inline constexpr auto maxSizeY = 42u; + inline constexpr auto maxSizeX = 340u; + inline constexpr auto maxSizeY = 80u; inline constexpr auto font = style::window::font::verybig; } // namespace bottomDescription diff --git a/products/BellHybrid/apps/application-bell-focus-timer/presenter/FocusTimerPresenter.cpp b/products/BellHybrid/apps/application-bell-focus-timer/presenter/FocusTimerPresenter.cpp index 8534f82626f46da314dba3d2bdf26df153e315b4..c90a9b61b1d25271f25236c289d11aeea9d68f14 100644 --- a/products/BellHybrid/apps/application-bell-focus-timer/presenter/FocusTimerPresenter.cpp +++ b/products/BellHybrid/apps/application-bell-focus-timer/presenter/FocusTimerPresenter.cpp @@ -111,7 +111,7 @@ namespace app::focus (allFocusSessionsCount - focusSessionsLeft) * focusSessionDuration.count(); const auto &sumOfFocusTime = std::to_string(minutesInFocus) + " " + utils::language::getCorrectMinutesAccusativeForm(minutesInFocus); - const auto &textToComplete = utils::translate("app_bell_focus_timer_summary"); + const auto &textToComplete = utils::translate("app_bell_focus_summary"); const auto &summaryText = createSummaryText(textToComplete, sumOfFocusTime); app->switchWindow( diff --git a/products/BellHybrid/apps/application-bell-focus-timer/windows/FocusTimerWindow.cpp b/products/BellHybrid/apps/application-bell-focus-timer/windows/FocusTimerWindow.cpp index fbee7db9ab47a761b24f22a63e4993d001bf9d8e..c9ac9bfb44acc4b6d6d241852583197ffe722c93 100644 --- a/products/BellHybrid/apps/application-bell-focus-timer/windows/FocusTimerWindow.cpp +++ b/products/BellHybrid/apps/application-bell-focus-timer/windows/FocusTimerWindow.cpp @@ -15,11 +15,6 @@ namespace constexpr auto progressTimerName{"FocusProgressTimer"}; constexpr auto progressTimerPeriod{std::chrono::seconds{1}}; constexpr auto progressMode{app::ProgressCountdownMode::Increasing}; - constexpr auto focusTimerText{"Focus timer"}; - constexpr auto timeToFocusText{"Time to focus"}; - constexpr auto shortBreakTimeText{"Short break"}; - constexpr auto timeForBreakText{"Time for a break"}; - constexpr auto endOfAllSessionText{"Well done!"}; } // namespace namespace app::focus @@ -100,7 +95,8 @@ namespace app::focus iconRing->image->set(runningStyle::ringIcon::image, gui::ImageTypeSpecifier::W_G); iconRing->setVisible(false); - bottomDescription = new gui::TextFixedSize(mainVBox, 0, 0, 250, 80); + bottomDescription = new gui::TextFixedSize( + mainVBox, 0, 0, runningStyle::bottomDescription::maxSizeX, runningStyle::bottomDescription::maxSizeY); bottomDescription->setMaximumSize(runningStyle::bottomDescription::maxSizeX, runningStyle::bottomDescription::maxSizeY); bottomDescription->setFont(runningStyle::bottomDescription::font); @@ -108,7 +104,7 @@ namespace app::focus bottomDescription->activeItem = false; bottomDescription->setAlignment( gui::Alignment(gui::Alignment::Horizontal::Center, gui::Alignment::Vertical::Top)); - bottomDescription->setRichText(focusTimerText); + bottomDescription->setRichText(utils::translate("app_bell_focus_time")); bottomDescription->drawUnderline(false); bottomDescription->setVisible(true); @@ -155,7 +151,7 @@ namespace app::focus iconPause->setVisible(false); iconRing->setVisible(true); bottomDescription->setVisible(true); - bottomDescription->setText(endOfAllSessionText); + bottomDescription->setText(utils::translate("app_bell_focus_well_done")); mainVBox->resizeItems(); presenter->playGong(); } @@ -166,7 +162,7 @@ namespace app::focus iconPause->setVisible(false); iconRing->setVisible(false); bottomDescription->setVisible(true); - bottomDescription->setText(focusTimerText); + bottomDescription->setText(utils::translate("app_bell_focus_time")); mainVBox->resizeItems(); } @@ -176,7 +172,7 @@ namespace app::focus iconPause->setVisible(false); iconRing->setVisible(true); bottomDescription->setVisible(true); - bottomDescription->setText(timeForBreakText); + bottomDescription->setText(utils::translate("app_bell_focus_time_for_break")); mainVBox->resizeItems(); presenter->playGong(); } @@ -187,7 +183,7 @@ namespace app::focus iconPause->setVisible(false); iconRing->setVisible(false); bottomDescription->setVisible(true); - bottomDescription->setText(shortBreakTimeText); + bottomDescription->setText(utils::translate("app_bell_focus_short_break")); mainVBox->resizeItems(); } @@ -207,7 +203,7 @@ namespace app::focus iconPause->setVisible(false); iconRing->setVisible(true); bottomDescription->setVisible(true); - bottomDescription->setText(timeToFocusText); + bottomDescription->setText(utils::translate("app_bell_focus_time_for_focus")); mainVBox->resizeItems(); presenter->playGong(); }