diff -r 2a97905cb637 -r fe6346211b5b src/EditRecipeTab4.cpp --- a/src/EditRecipeTab4.cpp Sun Jun 19 19:42:29 2022 +0200 +++ b/src/EditRecipeTab4.cpp Mon Jun 20 19:55:23 2022 +0200 @@ -70,11 +70,11 @@ ui->miscsTable->setItem(i, 0, new QTableWidgetItem(recipe->miscs.at(i).name)); - item = new QTableWidgetItem(misc_types[recipe->miscs.at(i).type]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscType", g_misc_types[recipe->miscs.at(i).type])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(i, 1, item); - item = new QTableWidgetItem(misc_uses[recipe->miscs.at(i).use_use]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscUse", g_misc_uses[recipe->miscs.at(i).use_use])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(i, 2, item); @@ -395,11 +395,11 @@ mnameEdit->setText(recipe->miscs.at(recipe->miscs_row).name); ui->miscsTable->setItem(recipe->miscs_row, 0, new QTableWidgetItem(recipe->miscs.at(recipe->miscs_row).name)); - item = new QTableWidgetItem(misc_types[recipe->miscs.at(recipe->miscs_row).type]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscType", g_misc_types[recipe->miscs.at(recipe->miscs_row).type])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(recipe->miscs_row, 1, item); - item = new QTableWidgetItem(misc_uses[recipe->miscs.at(recipe->miscs_row).use_use]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscUse", g_misc_uses[recipe->miscs.at(recipe->miscs_row).use_use])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(recipe->miscs_row, 2, item); useatEdit->setCurrentIndex(recipe->miscs.at(recipe->miscs_row).use_use); @@ -467,7 +467,7 @@ query.first(); this->mselectEdit->addItem(""); // Start with empty value for (int i = 0; i < query.size(); i++) { - this->mselectEdit->addItem(query.value(0).toString()+ " (" + misc_types[query.value(1).toInt()] + ") " + + this->mselectEdit->addItem(query.value(0).toString()+ " (" + QCoreApplication::translate("MiscType", g_misc_types[query.value(1).toInt()]) + ") " + QString("%1 %2").arg(query.value(3).toDouble() * 1000.0, 3, 'f', 2, '0').arg(query.value(2).toInt()?"gr":"ml")); query.next(); } @@ -480,7 +480,7 @@ qDebug() << "misc_useat_changed" << val; recipe->miscs[recipe->miscs_row].use_use = val; - item = new QTableWidgetItem(misc_uses[val]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscUse", g_misc_uses[val])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(recipe->miscs_row, 2, item);