Refactored gender-related labels in multiple languages for chat input fields, improving localization consistency and user experience across the application.

This commit is contained in:
Torsten Schulz (local)
2025-11-16 13:55:53 +01:00
parent 4abc966fc0
commit e69ae0148c
13 changed files with 120 additions and 172 deletions

View File

@@ -372,7 +372,8 @@ void App::connectToServer() {
void App::populateGenderComboBox(Wt::WComboBox *genderWidget) {
int markIndex{-1};
for (const auto &genderItem: genders_) {
genderWidget->addItem(genderItem.second);
auto label = Wt::WString::tr(genderItem.second.toUTF8());
genderWidget->addItem(label);
if (genderItem.first == "F") {
markIndex = genderWidget->count();
}
@@ -382,7 +383,8 @@ void App::populateGenderComboBox(Wt::WComboBox *genderWidget) {
std::string App::getGenderShortByGender(std::string gender) {
for (const auto &genderItem: genders_) {
if (gender == genderItem.second) {
auto label = Wt::WString::tr(genderItem.second.toUTF8()).toUTF8();
if (gender == label) {
return genderItem.first.toUTF8();
}
}