diff -r 2a97905cb637 -r fe6346211b5b src/EditProductTab5.cpp --- a/src/EditProductTab5.cpp Sun Jun 19 19:42:29 2022 +0200 +++ b/src/EditProductTab5.cpp Mon Jun 20 19:55:23 2022 +0200 @@ -71,11 +71,11 @@ ui->miscsTable->setItem(i, 0, new QTableWidgetItem(product->miscs.at(i).name)); - item = new QTableWidgetItem(misc_types[product->miscs.at(i).type]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscType", g_misc_types[product->miscs.at(i).type])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(i, 1, item); - item = new QTableWidgetItem(misc_uses[product->miscs.at(i).use_use]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscUse", g_misc_uses[product->miscs.at(i).use_use])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(i, 2, item); @@ -423,11 +423,11 @@ mnameEdit->setText(product->miscs.at(product->miscs_row).name); ui->miscsTable->setItem(product->miscs_row, 0, new QTableWidgetItem(product->miscs.at(product->miscs_row).name)); - item = new QTableWidgetItem(misc_types[product->miscs.at(product->miscs_row).type]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscType", g_misc_types[product->miscs.at(product->miscs_row).type])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(product->miscs_row, 1, item); - item = new QTableWidgetItem(misc_uses[product->miscs.at(product->miscs_row).use_use]); + item = new QTableWidgetItem(QCoreApplication::translate("MiscUse", g_misc_uses[product->miscs.at(product->miscs_row).use_use])); item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter); ui->miscsTable->setItem(product->miscs_row, 2, item); useatEdit->setCurrentIndex(product->miscs.at(product->miscs_row).use_use); @@ -504,7 +504,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(); } @@ -517,7 +517,7 @@ qDebug() << "misc_useat_changed" << val; product->miscs[product->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(product->miscs_row, 2, item);