src/EditProductTab4.cpp

changeset 301
fe6346211b5b
parent 300
2a97905cb637
child 305
35ce719998e1
--- a/src/EditProductTab4.cpp	Sun Jun 19 19:42:29 2022 +0200
+++ b/src/EditProductTab4.cpp	Mon Jun 20 19:55:23 2022 +0200
@@ -70,11 +70,11 @@
 	ui->hopsTable->setItem(i, 0, new QTableWidgetItem(product->hops.at(i).origin));
 	ui->hopsTable->setItem(i, 1, new QTableWidgetItem(product->hops.at(i).name));
 
-	item = new QTableWidgetItem(hop_types[product->hops.at(i).type]);
+    	item = new QTableWidgetItem(QCoreApplication::translate("HopTypes", g_hop_types[product->hops.at(i).type]));
         item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
         ui->hopsTable->setItem(i, 2, item);
 
-	item = new QTableWidgetItem(hop_forms[product->hops.at(i).form]);
+	item = new QTableWidgetItem(QCoreApplication::translate("HopForm", g_hop_forms[product->hops.at(i).form]));
         item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
         ui->hopsTable->setItem(i, 3, item);
 
@@ -82,7 +82,7 @@
         item->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
         ui->hopsTable->setItem(i, 4, item);
 
-	item = new QTableWidgetItem(hop_useat[product->hops.at(i).useat]);
+	item = new QTableWidgetItem(QCoreApplication::translate("HopUse", g_hop_useat[product->hops.at(i).useat]));
         item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
         ui->hopsTable->setItem(i, 5, item);
 
@@ -444,11 +444,13 @@
     ui->hopsTable->setItem(product->hops_row, 0, new QTableWidgetItem(product->hops.at(product->hops_row).origin));
     ui->hopsTable->setItem(product->hops_row, 1, new QTableWidgetItem(product->hops.at(product->hops_row).name));
 
-    item = new QTableWidgetItem(hop_types[product->hops.at(product->hops_row).type]);
+    QString hoptype = QCoreApplication::translate("HopTypes", g_hop_types[product->hops.at(product->hops_row).type]);
+    item = new QTableWidgetItem(hoptype);
     item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
     ui->hopsTable->setItem(product->hops_row, 2, item);
 
-    item = new QTableWidgetItem(hop_forms[product->hops.at(product->hops_row).form]);
+
+    item = new QTableWidgetItem(QCoreApplication::translate("HopForm", g_hop_forms[product->hops.at(product->hops_row).form]));
     item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
     ui->hopsTable->setItem(product->hops_row, 3, item);
 
@@ -504,7 +506,7 @@
     qDebug() << "hop_useat_changed()" << product->hops_row << val;
 
     product->hops[product->hops_row].useat = val;
-    QTableWidgetItem *item = new QTableWidgetItem(hop_useat[val]);
+    QTableWidgetItem *item = new QTableWidgetItem(QCoreApplication::translate("HopUse", g_hop_useat[val]));
     item->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
     ui->hopsTable->setItem(product->hops_row, 5, item);
 

mercurial