[TD]translate line names at time of use

This commit is contained in:
wandererfan
2024-07-15 20:01:05 -04:00
committed by WandererFan
parent 4d29b50ef5
commit 16f25ec4a2
3 changed files with 37 additions and 1 deletions

View File

@@ -180,9 +180,10 @@ void DrawGuiUtil::loadLineStyleChoices(QComboBox* combo, LineGenerator* generato
choices = LineGenerator::getLineDescriptions();
}
auto translationContext = LineName::currentTranslationContext();
int itemNumber {0};
for (auto& entry : choices) {
QString qentry = Base::Tools::fromStdString(entry);
QString qentry = QCoreApplication::translate(translationContext.c_str(), entry.c_str());
combo->addItem(qentry);
if (generator) {
combo->setItemIcon(itemNumber, iconForLine(itemNumber + 1, generator));