Skip to content

Commit

Permalink
use ruis formatted localization
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Oct 15, 2024
1 parent 5608874 commit a824552
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
20 changes: 10 additions & 10 deletions res/localization/en.tml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
vocabulary{
settings_menu_title{
settings_menu:title{
str{Settings}
}

sweep_speed_setting_title{
settings_menu:sweep_speed_title{
str{"Sweep speed:"}
}

mm_per_sec{
str{"mm/s"}
settings_menu:sweep_speed_value{
str{"{0} mm/s"}
}
language_setting_title{

settings_menu:language_title{
str{"Language:"}
}

spo2_settings_menu_title{
spo2_settings_menu:title{
str{"SpO2 settings"}
}

waveform_color_setting_title{
spo2_settings_menu:color_title{
str{"Color:"}
}

about_menu_title{
about_menu:title{
str{"About"}
}

Expand All @@ -32,7 +32,7 @@ vocabulary{
}

about_menu:version{
str{"Version"}
str{"Version: {0}"}
}

about_menu:powered_by{
Expand Down
18 changes: 9 additions & 9 deletions res/localization/fi.tml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
vocabulary{
settings_menu_title{
settings_menu:title{
str{Asetukset}
}

sweep_speed_setting_title{
settings_menu:sweep_speed_title{
str{"Lakaisunopeus:"}
}

mm_per_sec{
str{"mm/s"}
settings_menu:sweep_speed_value{
str{"{0} mm/s"}
}

language_setting_title{
settings_menu:language_title{
str{"Kieli (Language):"}
}

spo2_settings_menu_title{
spo2_settings_menu:title{
str{"SpO2 asetukset"}
}

waveform_color_setting_title{
spo2_settings_menu:color_title{
str{"Väri:"}
}

about_menu_title{
about_menu:title{
str{"Tietoja ohjelmasta"}
}

Expand All @@ -32,7 +32,7 @@ vocabulary{
}

about_menu:version{
str{"Versio"}
str{"Versio: {0}"}
}

about_menu:powered_by{
Expand Down
20 changes: 10 additions & 10 deletions res/localization/ru.tml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
vocabulary{
settings_menu_title{
settings_menu:title{
str{Настройки}
}

sweep_speed_setting_title{
str{"Скорость заметания:"}
settings_menu:sweep_speed_title{
str{"Скорость развертки:"}
}

mm_per_sec{
str{"мм/с"}
settings_menu:sweep_speed_value{
str{"{0} мм/с"}
}

language_setting_title{
settings_menu:language_title{
str{"Язык (Language):"}
}

spo2_settings_menu_title{
spo2_settings_menu:title{
str{"Настройки SpO2"}
}

waveform_color_setting_title{
spo2_settings_menu:color_title{
str{"Цвет:"}
}

about_menu_title{
about_menu:title{
str{"О программе"}
}

Expand All @@ -32,7 +32,7 @@ vocabulary{
}

about_menu:version{
str{"Версия"}
str{"Версия: {0}"}
}

about_menu:powered_by{
Expand Down
4 changes: 2 additions & 2 deletions src/bedsidemon/about_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_contents(utki::shared_ref<ruis:
),
m::text(c,
{},
std::u32string(c.get().localization.get("about_menu:version").string()).append(U": "sv).append(utki::to_utf32(program_version))
c.get().localization.get("about_menu:version").format({utki::to_utf32(program_version)})
),
m::gap(c,
{
Expand Down Expand Up @@ -133,7 +133,7 @@ about_menu::about_menu(utki::shared_ref<ruis::context> context) :
),
menu(
this->context, //
this->context.get().localization.get("about_menu_title"),
this->context.get().localization.get("about_menu:title"),
make_contents(this->context)
)
{}
8 changes: 4 additions & 4 deletions src/bedsidemon/settings_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class sweep_speed_selection_box_provider : public ruis::selection_box::provider
.font_size = style::font_size_setting
}
},
utki::to_utf32(utki::cat(speed_mm_per_sec, ' ')).append(c.get().localization.get("mm_per_sec").string())
c.get().localization.get("settings_menu:sweep_speed_value").format({utki::to_utf32(utki::cat(speed_mm_per_sec))})
)
}
);
Expand Down Expand Up @@ -201,7 +201,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_menu_contents(utki::shared_ref<
.font_size = style::font_size_setting
}
},
c.get().localization.get("sweep_speed_setting_title")
c.get().localization.get("settings_menu:sweep_speed_title")
),
m::gap(c,
{
Expand Down Expand Up @@ -240,7 +240,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_menu_contents(utki::shared_ref<
.font_size = style::font_size_setting
}
},
c.get().localization.get("language_setting_title")
c.get().localization.get("settings_menu:language_title")
),
m::gap(c,
{
Expand All @@ -265,7 +265,7 @@ settings_menu::settings_menu(utki::shared_ref<ruis::context> context) :
),
menu(
this->context, //
this->context.get().localization.get("settings_menu_title"),
this->context.get().localization.get("settings_menu:title"),
make_menu_contents(this->context)
)
{
Expand Down
4 changes: 2 additions & 2 deletions src/bedsidemon/spo2/spo2_parameter_window_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ std::vector<utki::shared_ref<ruis::widget>> make_menu_contents(utki::shared_ref<
.font_size = style::font_size_setting
}
},
c.get().localization.get("waveform_color_setting_title")
c.get().localization.get("spo2_settings_menu:color_title")
),
m::gap(c,
{
Expand Down Expand Up @@ -138,7 +138,7 @@ spo2_parameter_window_menu::spo2_parameter_window_menu(
),
menu(
this->context, //
this->context.get().localization.get("spo2_settings_menu_title"),
this->context.get().localization.get("spo2_settings_menu:title"),
make_menu_contents(this->context)
),
spo2_pw(std::move(spo2_pw))
Expand Down

0 comments on commit a824552

Please sign in to comment.