Commit 752270f8 authored by Alexander Rehnman's avatar Alexander Rehnman

Swedish UI text and clarifying comment

Translated the UI to Swedish and added a comment to clarify an initially confusing section.
parent 60a3d300
......@@ -128,9 +128,9 @@ MainWindow::MainWindow(QWidget *parent) :
model->select();
model->setHeaderData(0, Qt::Horizontal, "id");
model->setHeaderData(1, Qt::Horizontal, "Sorting ID");
model->setHeaderData(1, Qt::Horizontal, "Sorterings-ID");
model->setHeaderData(2, Qt::Horizontal, "Systembolaget ID");
model->setHeaderData(3, Qt::Horizontal, "Sträckkod");
model->setHeaderData(3, Qt::Horizontal, "Streckkod");
model->setHeaderData(4, Qt::Horizontal, "Namn");
model->setHeaderData(5, Qt::Horizontal, "Pris");
model->setHeaderData(6, Qt::Horizontal, "Till Salu?");
......@@ -165,8 +165,8 @@ MainWindow::MainWindow(QWidget *parent) :
QSqlRelationalTableModel* stockModel = new QSqlRelationalTableModel();
stockModel->setTable("stock");
stockModel->setHeaderData(0, Qt::Horizontal, "Namn"); // foreign
stockModel->setHeaderData(1, Qt::Horizontal, "Stock");
stockModel->setHeaderData(2, Qt::Horizontal, "Other Stock"); // hidden
stockModel->setHeaderData(1, Qt::Horizontal, "Lager");
stockModel->setHeaderData(2, Qt::Horizontal, "Annat lager"); // hidden
stockModel->setRelation(0, QSqlRelation("products", "id", "name"));
stockModel->setSort(0, Qt::AscendingOrder);
stockModel->select();
......@@ -187,7 +187,7 @@ MainWindow::MainWindow(QWidget *parent) :
listModel->setFilter("sale_status IN (0, 1)");
listModel->setSort(5, Qt::AscendingOrder);
listModel->setHeaderData(4, Qt::Horizontal, "Namn");
listModel->setHeaderData(5, Qt::Horizontal, "Sale Price");
listModel->setHeaderData(5, Qt::Horizontal, "Försäljningspris");
listModel->setHeaderData(6, Qt::Horizontal, "Försäljningsstatus");
listModel->select();
......@@ -357,7 +357,7 @@ void MainWindow::on_acquisitionModel_dataChanged(QModelIndex topLeft, QModelInde
int row = topLeft.row();
int col = topLeft.column();
// only 2 & 3 should be editable anyways
// only the amount and price should be editable anyways
if (col == 2 || col == 3) {
int amount = tempAcquisitionsModel->data(tempAcquisitionsModel->index(row, 2)).toInt();
int price = tempAcquisitionsModel->data(tempAcquisitionsModel->index(row, 3)).toInt();
......@@ -551,7 +551,6 @@ void MainWindow::transferMoney(QString from, QString to, int amount)
transferMoney(from, to, amount, NULL);
}
void MainWindow::on_addMoneySubmitButton_clicked()
{
addRemoveCommon(CASH_NULL, CASH_ACCOUNT);
......@@ -706,7 +705,7 @@ void MainWindow::updateCurrentDrainageStatus()
.arg(endStr));
ui->cancelDrainageButton->setVisible(true);
} else {
ui->drainageLabel->setText("Ingen Pågående Tömmning");
ui->drainageLabel->setText("Ingen pågående mning");
ui->cancelDrainageButton->setVisible(false);
}
}
......@@ -752,6 +751,11 @@ int MainWindow::setMoneyDiffLabels()
query.next();
int expected = query.value(0).toInt();
QString diff_text = QString("%1 kr").arg(expected / 100.0, 0, 'f', 2);
// This might seem like a mistake at first sight, though it isn't.
// This just sets a default value for diffTotal. The new value is
// calculated and set in setMoneyDiffLabels(int new_total)
ui->diffExpected->setText(diff_text);
ui->diffTotal->setText(diff_text);
......
......@@ -21,14 +21,14 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>6</number>
<number>5</number>
</property>
<property name="tabsClosable">
<bool>false</bool>
</property>
<widget class="QWidget" name="productListingTab">
<attribute name="title">
<string>Proudct Listings</string>
<string>Produktlista</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
......@@ -73,14 +73,14 @@
<bool>false</bool>
</property>
<property name="text">
<string>Delete Selected</string>
<string>Radera markerad</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="newItemButton">
<property name="text">
<string>New Item</string>
<string>Ny artikel</string>
</property>
</widget>
</item>
......@@ -94,7 +94,7 @@
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Show Hidden</string>
<string>Visa dolda produkter</string>
</property>
</widget>
</item>
......@@ -114,21 +114,21 @@
<item>
<widget class="QLabel" name="productListingDirtyLabel">
<property name="text">
<string>Everything Saved</string>
<string>Allt sparat</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="resetButton">
<property name="text">
<string>Reset</string>
<string>Återställ</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="saveButton">
<property name="text">
<string>Save</string>
<string>Spara</string>
</property>
</widget>
</item>
......@@ -138,7 +138,7 @@
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Stock</string>
<string>Lager</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
......@@ -154,7 +154,7 @@
<item>
<widget class="QPushButton" name="stockRefreshButton">
<property name="text">
<string>Refresh</string>
<string>Uppdatera</string>
</property>
</widget>
</item>
......@@ -187,7 +187,7 @@
<string/>
</property>
<property name="placeholderText">
<string>Search...</string>
<string>Sök...</string>
</property>
</widget>
</item>
......@@ -204,7 +204,7 @@
<item>
<widget class="QPushButton" name="buyAddBtn">
<property name="text">
<string>Add</string>
<string>Lägg till</string>
</property>
</widget>
</item>
......@@ -253,7 +253,7 @@
<item>
<widget class="QPushButton" name="buyRemoveButton">
<property name="text">
<string>Delete Selected</string>
<string>Ta bort markerad</string>
</property>
</widget>
</item>
......@@ -288,7 +288,7 @@
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>To get updated product names reset table</string>
<string>För uppdaterade produktnamn, återställ tabellen.</string>
</property>
</widget>
</item>
......@@ -303,7 +303,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Reset</string>
<string>Återställ</string>
</property>
</widget>
</item>
......@@ -354,7 +354,7 @@
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Expected:</string>
<string>Förväntad:</string>
</property>
</widget>
</item>
......@@ -375,7 +375,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Actual:</string>
<string>Faktiskt:</string>
</property>
</widget>
</item>
......@@ -457,7 +457,7 @@
<item row="1" column="0">
<widget class="QLabel" name="endTimeLabel">
<property name="text">
<string>End Time:</string>
<string>Sluttid:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -467,7 +467,7 @@
<item row="2" column="4">
<widget class="QLabel" name="minPriceLabel">
<property name="text">
<string>Min Price:</string>
<string>Minimipris:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -477,7 +477,7 @@
<item row="0" column="4" rowspan="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>TimeZone:</string>
<string>Tidszon:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -497,7 +497,7 @@
<item row="2" column="0">
<widget class="QLabel" name="amountPerHourLabel">
<property name="text">
<string>Amount/time:</string>
<string>Sänkning/tid:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -507,7 +507,7 @@
<item row="2" column="2">
<widget class="QLabel" name="howOftenLabel">
<property name="text">
<string>How Often (min):</string>
<string>Hur ofta (min):</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -563,7 +563,7 @@
<item row="0" column="0">
<widget class="QLabel" name="startTimeLabel">
<property name="text">
<string>Start Time:</string>
<string>Starttid:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -585,7 +585,7 @@
<item>
<widget class="QPushButton" name="addDrainageButton">
<property name="text">
<string>Skapa Tömmningstillfälle</string>
<string>Skapa Tömningstillfälle</string>
</property>
</widget>
</item>
......@@ -601,7 +601,7 @@
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Pågaende tömmning:</string>
<string>Pågaende tömning:</string>
</property>
</widget>
</item>
......@@ -628,7 +628,7 @@
<item>
<widget class="QPushButton" name="updateCurrentDrainageButton">
<property name="text">
<string>Update</string>
<string>Uppdatera</string>
</property>
</widget>
</item>
......@@ -671,7 +671,7 @@
<item>
<widget class="QPushButton" name="removeDrainageButton">
<property name="text">
<string>Ta Bort Tömmningstillfälle</string>
<string>Ta Bort Tömningstillfälle</string>
</property>
</widget>
</item>
......@@ -679,7 +679,7 @@
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Other</string>
<string>Övrigt</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="4" column="1">
......@@ -729,7 +729,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_31">
<property name="text">
<string>Cash Drawer</string>
<string>Kassalåda</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -739,7 +739,7 @@
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Vault</string>
<string>Kassaskåp</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -756,7 +756,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Transfer (öre)</string>
<string>Överför (öre)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -826,14 +826,14 @@
<item row="1" column="2">
<widget class="QPushButton" name="removeMoneySubmitButton">
<property name="text">
<string>Remove</string>
<string>Ta bort</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="addMoneySubmitButton">
<property name="text">
<string>Add</string>
<string>Lägg till</string>
</property>
</widget>
</item>
......@@ -847,7 +847,7 @@
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Add/Remove Money (öre)</string>
<string>Lägg till/ta bort pengar (öre)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -938,7 +938,7 @@
<item row="6" column="0" colspan="2">
<widget class="QPushButton" name="stockValueRefresh">
<property name="text">
<string>Refresh</string>
<string>Uppdatera</string>
</property>
</widget>
</item>
......
......@@ -25,7 +25,7 @@
<item>
<widget class="QLineEdit" name="searchEdit">
<property name="placeholderText">
<string>Search...</string>
<string>Sök...</string>
</property>
</widget>
</item>
......@@ -60,7 +60,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>Kontant</string>
<string>Köp</string>
</property>
</widget>
</item>
......@@ -209,7 +209,7 @@
</property>
<widget class="QWidget" name="logTab">
<attribute name="title">
<string>Log</string>
<string>Logg</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="topMargin">
......@@ -286,7 +286,7 @@
</widget>
<widget class="QWidget" name="orderTab">
<attribute name="title">
<string>Order</string>
<string>Beställning</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment