Statistics Dialog: merge unit name and count labels
Makes it easier for translators to do something specific with this label if needs
be. I remember the reason the count (NUMx) label was moved prior to the name had
to do with language conventions too, so this should alleviate any other such issues.
Also made the name label default size instead of small.
(cherry-picked from commit 142a2f20ca
)
This commit is contained in:
parent
1871a32995
commit
1e1839de3d
2 changed files with 4 additions and 18 deletions
|
@ -264,19 +264,6 @@
|
|||
[/image]
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_grow = true
|
||||
|
||||
[label]
|
||||
id = "unit_count"
|
||||
definition = "default"
|
||||
linked_group = "unit_count"
|
||||
[/label]
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
border = "all"
|
||||
|
@ -285,7 +272,7 @@
|
|||
|
||||
[label]
|
||||
id = "unit_name"
|
||||
definition = "default_small"
|
||||
definition = "default"
|
||||
linked_group = "unit_name"
|
||||
[/label]
|
||||
[/column]
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "font/constants.hpp"
|
||||
#include "formatter.hpp"
|
||||
#include "formula/string_utils.hpp"
|
||||
#include "gettext.hpp"
|
||||
#include "gui/auxiliary/find_widget.hpp"
|
||||
#include "gui/widgets/label.hpp"
|
||||
|
@ -242,12 +243,10 @@ void statistics_dialog::on_primary_list_select(window& window)
|
|||
item["label"] = (formatter() << type->image() << "~RC(" << type->flag_rgb() << ">" << current_team_.color() << ")").str();
|
||||
data.emplace("unit_image", item);
|
||||
|
||||
item["label"] = type->type_name();
|
||||
// Note: the x here is a font::unicode_multiplication_sign
|
||||
item["label"] = VGETTEXT("$count|× $name", {{"count", std::to_string(i.second)}, {"name", type->type_name()}});
|
||||
data.emplace("unit_name", item);
|
||||
|
||||
item["label"] = (formatter() << i.second << font::unicode_multiplication_sign).str();
|
||||
data.emplace("unit_count", item);
|
||||
|
||||
unit_list.add_row(data);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue