diff --git a/res/localization/en.tml b/res/localization/en.tml index 13fbecd..4434d15 100644 --- a/res/localization/en.tml +++ b/res/localization/en.tml @@ -47,4 +47,15 @@ vocabulary{ str{"SpO2 %, SIMULATION"} } + quit_dialog:title{ + str{"Quit program?"} + } + + quit_dialog:yes{ + str{"Yes"} + } + + quit_dialog:no{ + str{"No"} + } } diff --git a/res/localization/fi.tml b/res/localization/fi.tml index d7d6026..4434d15 100644 --- a/res/localization/fi.tml +++ b/res/localization/fi.tml @@ -1,20 +1,61 @@ vocabulary{ - sliders{ - str{liukusäädin} + settings_menu_title{ + str{Settings} } - image{ - str{kuva} + + sweep_speed_setting_title{ + str{"Sweep speed:"} } - selection_box{ - str{"valintalaatikko"} + + mm_per_sec{ + str{"mm/s"} } - hello_world{ - str{"Hei maailman!"} + + language_setting_title{ + str{"Language:"} } - some_checkbox{ - str{"jokin valintaruutu"} + + spo2_settings_menu_title{ + str{"SpO2 settings"} } - language{ - str{"Kieli (Language):"} + + waveform_color_setting_title{ + str{"Color:"} + } + + about_menu_title{ + str{"About"} + } + + about_menu:program_title{ + str{"Bedside Patient Monitor DEMO program"} + } + + about_menu:version{ + str{"Version"} + } + + about_menu:powered_by{ + str{"Powered by"} + } + + about_menu:copyright{ + str{"Copyright"} + } + + spo2_simulation{ + str{"SpO2 %, SIMULATION"} + } + + quit_dialog:title{ + str{"Quit program?"} + } + + quit_dialog:yes{ + str{"Yes"} + } + + quit_dialog:no{ + str{"No"} } } diff --git a/res/localization/ru.tml b/res/localization/ru.tml index 1c65a34..f5a9a2f 100644 --- a/res/localization/ru.tml +++ b/res/localization/ru.tml @@ -1,20 +1,61 @@ vocabulary{ - sliders{ - str{ползунки} + settings_menu_title{ + str{Настройки} } - image{ - str{изображение} + + sweep_speed_setting_title{ + str{"Скорость заметания:"} } - selection_box{ - str{"выпадающее меню выбора"} + + mm_per_sec{ + str{"мм/с"} } - hello_world{ - str{"Превед медвед!"} + + language_setting_title{ + str{"Язык (Language):"} } - some_checkbox{ - str{"какая-то галочка"} + + spo2_settings_menu_title{ + str{"Настройки SpO2"} } - language{ - str{"Язык (Language):"} + + waveform_color_setting_title{ + str{"Цвет:"} + } + + about_menu_title{ + str{"О программе"} + } + + about_menu:program_title{ + str{"Монитор Наблюдения Пациетов, ДЕМОНСТРАЦИОННАЯ программа"} + } + + about_menu:version{ + str{"Версия"} + } + + about_menu:powered_by{ + str{"Сделано с использованием"} + } + + about_menu:copyright{ + str{"Авторское право"} + } + + spo2_simulation{ + str{"SpO2 %, СИМУЛЯЦИЯ"} + } + + quit_dialog:title{ + str{"Выйти из программы?"} + } + + quit_dialog:yes{ + str{"Да"} + } + + quit_dialog:no{ + str{"Нет"} } } diff --git a/src/bedsidemon/quit_dialog.cpp b/src/bedsidemon/quit_dialog.cpp index 4ab19b6..ffd7829 100644 --- a/src/bedsidemon/quit_dialog.cpp +++ b/src/bedsidemon/quit_dialog.cpp @@ -45,7 +45,7 @@ constexpr auto dimension_button_height = 40_pp; namespace { std::vector> make_root_widget_structure(utki::shared_ref c) { - auto make_button = [&](std::string id, std::u32string text) { + auto make_button = [&](std::string id, ruis::string text) { // clang-format off return m::push_button(c, { @@ -84,7 +84,7 @@ std::vector> make_root_widget_structure(utki::sha .font_size = 20_pp // NOLINT(cppcoreguidelines-avoid-magic-numbers, "TODO: fix") } }, - U"Quit program?"s + c.get().localization.get("quit_dialog:title") ), m::gap(c, { @@ -96,7 +96,7 @@ std::vector> make_root_widget_structure(utki::sha m::row(c, {}, { - make_button("yes_button"s, U"Yes"s), + make_button("yes_button"s, c.get().localization.get("quit_dialog:yes")), m::gap(c, { .layout_params{ @@ -104,7 +104,7 @@ std::vector> make_root_widget_structure(utki::sha } } ), - make_button("no_button"s, U"No"s), + make_button("no_button"s, c.get().localization.get("quit_dialog:no")), } ) }