Skip to content

Commit

Permalink
ru localization
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Oct 6, 2024
1 parent f513a9e commit 47b7249
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 28 deletions.
11 changes: 11 additions & 0 deletions res/localization/en.tml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,15 @@ vocabulary{
str{"SpO2 %, SIMULATION"}
}

quit_dialog:title{
str{"Quit program?"}
}

quit_dialog:yes{
str{"Yes"}
}

quit_dialog:no{
str{"No"}
}
}
65 changes: 53 additions & 12 deletions res/localization/fi.tml
Original file line number Diff line number Diff line change
@@ -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"}
}
}
65 changes: 53 additions & 12 deletions res/localization/ru.tml
Original file line number Diff line number Diff line change
@@ -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{"Нет"}
}
}
8 changes: 4 additions & 4 deletions src/bedsidemon/quit_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ constexpr auto dimension_button_height = 40_pp;
namespace {
std::vector<utki::shared_ref<ruis::widget>> make_root_widget_structure(utki::shared_ref<ruis::context> 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,
{
Expand Down Expand Up @@ -84,7 +84,7 @@ std::vector<utki::shared_ref<ruis::widget>> 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,
{
Expand All @@ -96,15 +96,15 @@ std::vector<utki::shared_ref<ruis::widget>> 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{
.dims = {dimension_gap, 1_px}
}
}
),
make_button("no_button"s, U"No"s),
make_button("no_button"s, c.get().localization.get("quit_dialog:no")),
}
)
}
Expand Down

0 comments on commit 47b7249

Please sign in to comment.