widgets/localization: update label constant

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2020-11-05 19:58:59 +01:00
parent 00ad56ce71
commit df6bae482c
2 changed files with 13 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ pub static ID_CONFIGURATION_LANGUAGE_ID: &str = "configuration_language_id";
pub static ID_LOCALIZATION_FORM: &str = "localization_form"; pub static ID_LOCALIZATION_FORM: &str = "localization_form";
pub static ID_LOCALIZATION_HEADER: &str = "localization_header"; pub static ID_LOCALIZATION_HEADER: &str = "localization_header";
pub static ID_LOCALIZATION_LANGUAGES: &str = "localization_languages"; pub static ID_LOCALIZATION_LANGUAGES: &str = "localization_languages";
pub static ID_LOCALIZATION_LABEL_LANGUAGE_NAME: &str = "localization_label_language_name";
pub static ID_LOCALIZATION_LANGUAGE_NAME: &str = "localization_language_name"; pub static ID_LOCALIZATION_LANGUAGE_NAME: &str = "localization_language_name";
pub static ID_POLICY_CHECK_FORM: &str = "policy_check_form"; pub static ID_POLICY_CHECK_FORM: &str = "policy_check_form";

View File

@@ -59,10 +59,22 @@ impl Template for LocalizationView {
.style("header") .style("header")
.build(ctx), .build(ctx),
) )
.child(
TextBlock::new()
.id(ID_LOCALIZATION_LABEL_LANGUAGE_NAME)
.attach(Grid::column(0))
.attach(Grid::row(2))
.v_align("center")
.h_align("end")
.text("Language ID")
.build(ctx),
)
.child( .child(
ComboBox::new() ComboBox::new()
.id(ID_LOCALIZATION_LANGUAGES) .id(ID_LOCALIZATION_LANGUAGES)
.count(count) .count(count)
.attach(Grid::column(2))
.attach(Grid::row(2))
.items_builder(move |bc, index| { .items_builder(move |bc, index| {
let text = bc.get_widget(id) let text = bc.get_widget(id)
.get::<Vec<String>>("languages")[index] .get::<Vec<String>>("languages")[index]