From 00cdaaa2d692d7fb35a209bb854ee1c28ee67b21 Mon Sep 17 00:00:00 2001 From: Iris Morelle Date: Mon, 22 Apr 2024 05:49:48 -0400 Subject: [PATCH] gui/language_selection: Additional UI work for clarity * Moved the Show All Languages checkbox from the main body to the bottom left of the dialog to save space and make it more obviously connected to the listbox. * Changed the Show All Languages checkbox label to reduce the word count a tiny bit. * Added text regarding translation percentages representing core textdomains only. * Added a link to gettext.wesnoth.org. --- data/gui/window/language_selection.cfg | 92 ++++++++++++++++++++------ src/gui/dialogs/language_selection.cpp | 3 + 2 files changed, 73 insertions(+), 22 deletions(-) diff --git a/data/gui/window/language_selection.cfg b/data/gui/window/language_selection.cfg index ada4cdfb56d..028335e6efa 100644 --- a/data/gui/window/language_selection.cfg +++ b/data/gui/window/language_selection.cfg @@ -72,6 +72,7 @@ [column] border = "all" border_size = 5 + horizontal_grow = true [label] use_markup = true @@ -127,12 +128,45 @@ If you are a first-time player, we recommend using a mostly-complete translation [column] border = "all" border_size = 5 - horizontal_alignment = "center" + horizontal_grow = true - [toggle_button] - id = "show_all" - label = _ "Show work-in-progress or abandoned translations" - [/toggle_button] + [label] + use_markup = true + link_aware = true + wrap = true + # po: Beneath the label widget displaying this text there is a widget displaying + # po: a decorated link to . + label = _ "Note: The translation percentages shown apply to the core game interface and in-game help only. More complete stats are available at the following page:" + [/label] + [/column] + [/row] + + [row] + [column] + border = "all" + border_size = 5 + horizontal_grow = true + + [panel] + definition = "box_display_no_blur_no_border" + [grid] + [row] + [column] + border = "all" + border_size = 10 + horizontal_grow = true + [label] + # Filled in at runtime + id = "stats_url" + use_markup = true + link_aware = true + wrap = true + text_alignment = "center" + [/label] + [/column] + [/row] + [/grid] + [/panel] [/column] [/row] [/definition] @@ -222,7 +256,7 @@ If you are a first-time player, we recommend using a mostly-complete translation grow_factor = 0 [column] - horizontal_alignment = "right" + horizontal_grow = true [grid] @@ -232,31 +266,45 @@ If you are a first-time player, we recommend using a mostly-complete translation [column] border = "all" border_size = 5 - horizontal_alignment = "right" - - [button] - id = "ok" - definition = "default" - - label = _ "Select" - [/button] + horizontal_alignment = "left" + [toggle_button] + id = "show_all" + label = _ "Show in-progress or abandoned translations" + [/toggle_button] [/column] [column] - border = "all" - border_size = 5 horizontal_alignment = "right" - [button] - id = "cancel" - definition = "default" + [grid] + [row] + [column] + border = "all" + border_size = 5 + horizontal_alignment = "right" - label = _ "Cancel" - [/button] + [button] + id = "ok" + definition = "default" + label = _ "Select" + [/button] + [/column] + [column] + border = "all" + border_size = 5 + horizontal_alignment = "right" + + [button] + id = "cancel" + definition = "default" + label = _ "Cancel" + [/button] + [/column] + [/row] + [/grid] [/column] - [/row] [/grid] diff --git a/src/gui/dialogs/language_selection.cpp b/src/gui/dialogs/language_selection.cpp index 42994288bc4..70a391d9ca1 100644 --- a/src/gui/dialogs/language_selection.cpp +++ b/src/gui/dialogs/language_selection.cpp @@ -34,6 +34,8 @@ namespace const std::string translations_wiki_url = "https://wiki.wesnoth.org/WesnothTranslations"; +const std::string translations_stats_url = "https://gettext.wesnoth.org/"; + } REGISTER_DIALOG(language_selection) @@ -65,6 +67,7 @@ language_selection::language_selection() register_bool("show_all", true, show_all); // Markup needs to be enabled for the link to be highlighted register_label("contrib_url", true, translations_wiki_url, true); + register_label("stats_url", true, translations_stats_url, true); } void language_selection::shown_filter_callback()