Added many german translations

This commit is contained in:
0xFEEDC0DE64
2017-12-05 21:16:46 +01:00
parent 65685dfd90
commit 8edb0851cf
24 changed files with 1388 additions and 210 deletions

View File

@@ -22,8 +22,13 @@
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1">
<item> <item>
<widget class="QLabel" name="labelTitle"> <widget class="QLabel" name="labelTitle">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>&lt;h1&gt;About me&lt;/h1&gt;</string> <string>About me</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -46,8 +46,13 @@
</item> </item>
<item> <item>
<widget class="QLabel" name="labelTitle"> <widget class="QLabel" name="labelTitle">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>&lt;h1&gt;Authentication&lt;/h1&gt;</string> <string>Authentication</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -22,8 +22,13 @@
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
<item> <item>
<widget class="QLabel" name="labelTitle"> <widget class="QLabel" name="labelTitle">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>&lt;h1&gt;Buchung&lt;/h1&gt;</string> <string>Buchung</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -72,14 +77,14 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QTimeEdit" name="timeEditTime"> <widget class="QTimeEdit" name="timeEditTime">
<property name="displayFormat"> <property name="displayFormat">
<string>HH:mm:ss</string> <string notr="true">HH:mm:ss</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QTimeEdit" name="timeEditTimespan"> <widget class="QTimeEdit" name="timeEditTimespan">
<property name="displayFormat"> <property name="displayFormat">
<string>HH:mm:ss</string> <string notr="true">HH:mm:ss</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -96,12 +101,12 @@
</property> </property>
<item> <item>
<property name="text"> <property name="text">
<string>K</string> <string notr="true">K</string>
</property> </property>
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>G</string> <string notr="true">G</string>
</property> </property>
</item> </item>
</widget> </widget>

View File

@@ -22,8 +22,13 @@
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1,0">
<item> <item>
<widget class="QLabel" name="labelTitle"> <widget class="QLabel" name="labelTitle">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>&lt;h1&gt;Language selection&lt;/h1&gt;</string> <string>Language selection</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -22,8 +22,13 @@
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
<item> <item>
<widget class="QLabel" name="labelTitle"> <widget class="QLabel" name="labelTitle">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>&lt;h1&gt;Settings&lt;/h1&gt;</string> <string>Settings</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@@ -7,7 +7,7 @@
#include "zeiterfassungsettings.h" #include "zeiterfassungsettings.h"
TimeAssignmentDialog::TimeAssignmentDialog(const QMap<QString, QString> &projekte, const ZeiterfassungSettings &settings, TimeAssignmentDialog::TimeAssignmentDialog(const QMap<QString, QString> &projects, const ZeiterfassungSettings &settings,
QWidget *parent) : QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::TimeAssignmentDialog) ui(new Ui::TimeAssignmentDialog)
@@ -15,30 +15,30 @@ TimeAssignmentDialog::TimeAssignmentDialog(const QMap<QString, QString> &projekt
ui->setupUi(this); ui->setupUi(this);
{ {
for(const auto &preferedProjekt : settings.projekte()) for(const auto &preferedProject : settings.projects())
{ {
if(!projekte.contains(preferedProjekt)) if(!projects.contains(preferedProject))
{ {
qWarning() << "cannot find projekt" << preferedProjekt; qWarning() << "cannot find project" << preferedProject;
continue; continue;
} }
ui->comboBoxProjekt->addItem(projekte.value(preferedProjekt) % " (" % preferedProjekt % ')', preferedProjekt); ui->comboBoxProject->addItem(projects.value(preferedProject) % " (" % preferedProject % ')', preferedProject);
} }
if(settings.projekte().count()) if(settings.projects().count())
ui->comboBoxProjekt->insertSeparator(ui->comboBoxProjekt->count()); ui->comboBoxProject->insertSeparator(ui->comboBoxProject->count());
for(auto iter = projekte.constBegin(); iter != projekte.constEnd(); iter++) for(auto iter = projects.constBegin(); iter != projects.constEnd(); iter++)
{ {
if(!settings.projekte().contains(iter.key())) if(!settings.projects().contains(iter.key()))
ui->comboBoxProjekt->addItem(iter.value() % " (" % iter.key() % ')', iter.key()); ui->comboBoxProject->addItem(iter.value() % " (" % iter.key() % ')', iter.key());
} }
} }
for(const auto &subprojekt : settings.subprojekte()) for(const auto &subproject : settings.subprojects())
ui->comboBoxSubprojekt->addItem(subprojekt); ui->comboBoxSubproject->addItem(subproject);
ui->comboBoxSubprojekt->clearEditText(); ui->comboBoxSubproject->clearEditText();
for(const auto &workpackage : settings.workpackages()) for(const auto &workpackage : settings.workpackages())
ui->comboBoxWorkpackage->addItem(workpackage); ui->comboBoxWorkpackage->addItem(workpackage);
@@ -74,28 +74,28 @@ void TimeAssignmentDialog::setTimespan(const QTime &timespan)
ui->timeEditTimespan->setTime(timespan); ui->timeEditTimespan->setTime(timespan);
} }
QString TimeAssignmentDialog::getProjekt() const QString TimeAssignmentDialog::getProject() const
{ {
return ui->comboBoxProjekt->currentData().toString(); return ui->comboBoxProject->currentData().toString();
} }
void TimeAssignmentDialog::setProjekt(const QString &projekt) void TimeAssignmentDialog::setProject(const QString &project)
{ {
auto index = ui->comboBoxProjekt->findData(projekt); auto index = ui->comboBoxProject->findData(project);
if(index >= 0) if(index >= 0)
ui->comboBoxProjekt->setCurrentIndex(index); ui->comboBoxProject->setCurrentIndex(index);
else else
qWarning() << "could not find projekt" << projekt; qWarning() << "could not find project" << project;
} }
QString TimeAssignmentDialog::getSubprojekt() const QString TimeAssignmentDialog::getSubproject() const
{ {
return ui->comboBoxSubprojekt->currentText(); return ui->comboBoxSubproject->currentText();
} }
void TimeAssignmentDialog::setSubprojekt(const QString &subprojekt) void TimeAssignmentDialog::setSubproject(const QString &subproject)
{ {
ui->comboBoxSubprojekt->setCurrentText(subprojekt); ui->comboBoxSubproject->setCurrentText(subproject);
} }
QString TimeAssignmentDialog::getWorkpackage() const QString TimeAssignmentDialog::getWorkpackage() const

View File

@@ -15,7 +15,7 @@ class TimeAssignmentDialog : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit TimeAssignmentDialog(const QMap<QString, QString> &projekte, const ZeiterfassungSettings &settings, explicit TimeAssignmentDialog(const QMap<QString, QString> &projects, const ZeiterfassungSettings &settings,
QWidget *parent = 0); QWidget *parent = 0);
~TimeAssignmentDialog(); ~TimeAssignmentDialog();
@@ -25,11 +25,11 @@ public:
QTime getTimespan() const; QTime getTimespan() const;
void setTimespan(const QTime &timespan); void setTimespan(const QTime &timespan);
QString getProjekt() const; QString getProject() const;
void setProjekt(const QString &projekt); void setProject(const QString &project);
QString getSubprojekt() const; QString getSubproject() const;
void setSubprojekt(const QString &subprojekt); void setSubproject(const QString &subproject);
QString getWorkpackage() const; QString getWorkpackage() const;
void setWorkpackage(const QString &workpackage); void setWorkpackage(const QString &workpackage);

View File

@@ -22,8 +22,13 @@
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0"> <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
<item> <item>
<widget class="QLabel" name="labelTitle"> <widget class="QLabel" name="labelTitle">
<property name="font">
<font>
<pointsize>20</pointsize>
</font>
</property>
<property name="text"> <property name="text">
<string>&lt;h1&gt;Time assignment&lt;/h1&gt;</string> <string>Time assignment</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -50,19 +55,19 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="labelProjekt"> <widget class="QLabel" name="labelProject">
<property name="text"> <property name="text">
<string>Projekt:</string> <string>Project:</string>
</property> </property>
<property name="buddy"> <property name="buddy">
<cstring>comboBoxProjekt</cstring> <cstring>comboBoxProject</cstring>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="labelSubprojekt"> <widget class="QLabel" name="labelSubproject">
<property name="text"> <property name="text">
<string>Subprojekt:</string> <string>Subproject:</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -83,22 +88,22 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QTimeEdit" name="timeEditTime"> <widget class="QTimeEdit" name="timeEditTime">
<property name="displayFormat"> <property name="displayFormat">
<string>HH:mm:ss</string> <string notr="true">HH:mm:ss</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QTimeEdit" name="timeEditTimespan"> <widget class="QTimeEdit" name="timeEditTimespan">
<property name="displayFormat"> <property name="displayFormat">
<string>HH:mm:ss</string> <string notr="true">HH:mm:ss</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QComboBox" name="comboBoxProjekt"/> <widget class="QComboBox" name="comboBoxProject"/>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QComboBox" name="comboBoxSubprojekt"> <widget class="QComboBox" name="comboBoxSubproject">
<property name="editable"> <property name="editable">
<bool>true</bool> <bool>true</bool>
</property> </property>

View File

@@ -5,7 +5,7 @@
#include <QPixmap> #include <QPixmap>
#include <QDir> #include <QDir>
#include <QInputDialog> #include <QInputDialog>
#include <QStringBuilder>
#include <QDebug> #include <QDebug>
#include "zeiterfassungsettings.h" #include "zeiterfassungsettings.h"
@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
QCoreApplication::setApplicationVersion(QStringLiteral("1.1")); QCoreApplication::setApplicationVersion(QStringLiteral("1.1"));
QSplashScreen splashScreen(QPixmap(":/zeiterfassung/images/splash.png")); QSplashScreen splashScreen(QPixmap(":/zeiterfassung/images/splash.png"));
splashScreen.showMessage(QObject::tr("Loading settings...")); splashScreen.showMessage(QCoreApplication::translate("main", "Loading settings..."));
splashScreen.show(); splashScreen.show();
ZeiterfassungSettings settings(&app); ZeiterfassungSettings settings(&app);
@@ -73,7 +73,9 @@ int main(int argc, char *argv[])
if(dialog.language() == QLocale::AnyLanguage) if(dialog.language() == QLocale::AnyLanguage)
{ {
QMessageBox::warning(&splashScreen, QObject::tr("Invalid language selection!"), QObject::tr("You did not select a valid language!")); QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Invalid language selection!"),
QCoreApplication::translate("main", "Invalid language selection!") % "\n\n" %
QCoreApplication::translate("main", "You did not select a valid language."));
goto again0; goto again0;
} }
@@ -91,7 +93,7 @@ int main(int argc, char *argv[])
loadAndInstallTranslator(zeiterfassungTranslator, locale, QStringLiteral("zeiterfassung"), loadAndInstallTranslator(zeiterfassungTranslator, locale, QStringLiteral("zeiterfassung"),
QStringLiteral("_"), QStringLiteral(":/zeiterfassung/translations")); QStringLiteral("_"), QStringLiteral(":/zeiterfassung/translations"));
splashScreen.showMessage(QObject::tr("Loading login page...")); splashScreen.showMessage(QCoreApplication::translate("main", "Loading login page..."));
Zeiterfassung erfassung(settings.url(), &app); Zeiterfassung erfassung(settings.url(), &app);
@@ -106,11 +108,11 @@ int main(int argc, char *argv[])
if(!eventLoop.success()) if(!eventLoop.success())
{ {
bool ok; bool ok;
QMessageBox::warning(&splashScreen, QObject::tr("Could not access Zeiterfassung"), QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not access Zeiterfassung!"),
QObject::tr("The Zeiterfassung could not be accessed:\n\n%0").arg(eventLoop.message())); QCoreApplication::translate("main", "Could not access Zeiterfassung!") % "\n\n" % eventLoop.message());
auto url = QInputDialog::getText(&splashScreen, QObject::tr("Base url"), auto url = QInputDialog::getText(&splashScreen, QCoreApplication::translate("main", "Base url"),
QObject::tr("Please enter the base url to the Zeiterfassung:"), QCoreApplication::translate("main", "Please enter the base url to the Zeiterfassung:"),
QLineEdit::Normal, settings.url(), &ok); QLineEdit::Normal, settings.url(), &ok);
if(!ok) if(!ok)
return -1; return -1;
@@ -120,7 +122,7 @@ int main(int argc, char *argv[])
} }
} }
splashScreen.showMessage(QObject::tr("Authenticating...")); splashScreen.showMessage(QCoreApplication::translate("main", "Authenticating..."));
if(settings.username().isNull() || settings.password().isNull()) if(settings.username().isNull() || settings.password().isNull())
{ {
@@ -141,8 +143,8 @@ int main(int argc, char *argv[])
if(!eventLoop.success()) if(!eventLoop.success())
{ {
QMessageBox::warning(&splashScreen, QObject::tr("Could not authenticate with Zeiterfassung"), QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not authenticate with Zeiterfassung!"),
QObject::tr("The Zeiterfassung authentication was not successful:\n\n%0").arg(eventLoop.message())); QCoreApplication::translate("main", "Could not authenticate with Zeiterfassung!") % "\n\n" % eventLoop.message());
AuthenticationDialog dialog(&splashScreen); AuthenticationDialog dialog(&splashScreen);
dialog.setUsername(settings.username()); dialog.setUsername(settings.username());
@@ -156,7 +158,7 @@ int main(int argc, char *argv[])
} }
} }
splashScreen.showMessage(QObject::tr("Getting user information...")); splashScreen.showMessage(QCoreApplication::translate("main", "Getting user information..."));
Zeiterfassung::UserInfo userInfo; Zeiterfassung::UserInfo userInfo;
@@ -175,8 +177,8 @@ int main(int argc, char *argv[])
if(!eventLoop.success()) if(!eventLoop.success())
{ {
QMessageBox::warning(&splashScreen, QObject::tr("Could not get user information!"), QMessageBox::warning(&splashScreen, QCoreApplication::translate("main", "Could not get user information!"),
QObject::tr("Could not get user information:\n\n%0").arg(eventLoop.message())); QCoreApplication::translate("main", "Could not get user information!") % "\n\n" % eventLoop.message());
return -1; return -1;
} }

View File

@@ -78,13 +78,13 @@ MainWindow::MainWindow(ZeiterfassungSettings &settings, Zeiterfassung &erfassung
ui->timeEditTime->setTime(timeNormalise(QTime::currentTime())); ui->timeEditTime->setTime(timeNormalise(QTime::currentTime()));
connect(&m_erfassung, &Zeiterfassung::getProjekteFinished, connect(&m_erfassung, &Zeiterfassung::getProjectsFinished,
this, &MainWindow::getProjekteFinished); this, &MainWindow::getProjekctsFinished);
erfassung.doGetProjekte(userInfo.userId, QDate::currentDate()); erfassung.doGetProjects(userInfo.userId, QDate::currentDate());
ui->comboBoxProjekt->setMaxVisibleItems(10); ui->comboBoxProject->setMaxVisibleItems(10);
ui->comboBoxSubprojekt->lineEdit()->setPlaceholderText(tr("Subprojekt")); ui->comboBoxSubproject->lineEdit()->setPlaceholderText(tr("Subproject"));
ui->comboBoxWorkpackage->lineEdit()->setPlaceholderText(tr("Workpackage")); ui->comboBoxWorkpackage->lineEdit()->setPlaceholderText(tr("Workpackage"));
ui->comboBoxText->lineEdit()->setPlaceholderText(tr("Text")); ui->comboBoxText->lineEdit()->setPlaceholderText(tr("Text"));
@@ -149,8 +149,8 @@ void MainWindow::refresh(bool forceAuswertung)
ui->pushButtonPrev->setEnabled(false); ui->pushButtonPrev->setEnabled(false);
ui->pushButtonNext->setEnabled(false); ui->pushButtonNext->setEnabled(false);
ui->timeEditTime->setEnabled(false); ui->timeEditTime->setEnabled(false);
ui->comboBoxProjekt->setEnabled(false); ui->comboBoxProject->setEnabled(false);
ui->comboBoxSubprojekt->setEnabled(false); ui->comboBoxSubproject->setEnabled(false);
ui->comboBoxWorkpackage->setEnabled(false); ui->comboBoxWorkpackage->setEnabled(false);
ui->comboBoxText->setEnabled(false); ui->comboBoxText->setEnabled(false);
ui->pushButtonStart->setEnabled(false); ui->pushButtonStart->setEnabled(false);
@@ -158,7 +158,7 @@ void MainWindow::refresh(bool forceAuswertung)
ui->treeViewBuchungen->setEnabled(false); ui->treeViewBuchungen->setEnabled(false);
ui->treeViewTimeAssignments->setEnabled(false); ui->treeViewTimeAssignments->setEnabled(false);
m_workingTimeLabel->setText(tr("%0: %1").arg(tr("Working time")).arg(tr("???"))); m_workingTimeLabel->setText(tr("%0: %1").arg(tr("Assigned time")).arg(tr("???")));
auto waitForBuchugen = m_buchungenModel->refresh(m_userInfo.userId, ui->dateEditDate->date(), ui->dateEditDate->date()); auto waitForBuchugen = m_buchungenModel->refresh(m_userInfo.userId, ui->dateEditDate->date(), ui->dateEditDate->date());
if(waitForBuchugen) if(waitForBuchugen)
@@ -214,10 +214,10 @@ void MainWindow::refresh(bool forceAuswertung)
} }
} }
void MainWindow::getProjekteFinished(bool success, const QString &message, const QVector<Zeiterfassung::Projekt> &projekte) void MainWindow::getProjekctsFinished(bool success, const QString &message, const QVector<Zeiterfassung::Project> &projects)
{ {
disconnect(&m_erfassung, &Zeiterfassung::getProjekteFinished, disconnect(&m_erfassung, &Zeiterfassung::getProjectsFinished,
this, &MainWindow::getProjekteFinished); this, &MainWindow::getProjekctsFinished);
if(!success) if(!success)
{ {
@@ -225,10 +225,10 @@ void MainWindow::getProjekteFinished(bool success, const QString &message, const
return; return;
} }
m_projekte.clear(); m_projects.clear();
for(const auto &projekt : projekte) for(const auto &project : projects)
m_projekte.insert(projekt.value, projekt.label); m_projects.insert(project.value, project.label);
updateComboboxes(); updateComboboxes();
} }
@@ -352,8 +352,8 @@ void MainWindow::contextMenuBuchung(const QPoint &pos)
ui->pushButtonPrev->setEnabled(false); ui->pushButtonPrev->setEnabled(false);
ui->pushButtonNext->setEnabled(false); ui->pushButtonNext->setEnabled(false);
ui->timeEditTime->setEnabled(false); ui->timeEditTime->setEnabled(false);
ui->comboBoxProjekt->setEnabled(false); ui->comboBoxProject->setEnabled(false);
ui->comboBoxSubprojekt->setEnabled(false); ui->comboBoxSubproject->setEnabled(false);
ui->comboBoxWorkpackage->setEnabled(false); ui->comboBoxWorkpackage->setEnabled(false);
ui->comboBoxText->setEnabled(false); ui->comboBoxText->setEnabled(false);
ui->pushButtonStart->setEnabled(false); ui->pushButtonStart->setEnabled(false);
@@ -406,8 +406,8 @@ void MainWindow::contextMenuBuchung(const QPoint &pos)
ui->pushButtonPrev->setEnabled(false); ui->pushButtonPrev->setEnabled(false);
ui->pushButtonNext->setEnabled(false); ui->pushButtonNext->setEnabled(false);
ui->timeEditTime->setEnabled(false); ui->timeEditTime->setEnabled(false);
ui->comboBoxProjekt->setEnabled(false); ui->comboBoxProject->setEnabled(false);
ui->comboBoxSubprojekt->setEnabled(false); ui->comboBoxSubproject->setEnabled(false);
ui->comboBoxWorkpackage->setEnabled(false); ui->comboBoxWorkpackage->setEnabled(false);
ui->comboBoxText->setEnabled(false); ui->comboBoxText->setEnabled(false);
ui->pushButtonStart->setEnabled(false); ui->pushButtonStart->setEnabled(false);
@@ -464,8 +464,8 @@ void MainWindow::contextMenuBuchung(const QPoint &pos)
ui->pushButtonPrev->setEnabled(false); ui->pushButtonPrev->setEnabled(false);
ui->pushButtonNext->setEnabled(false); ui->pushButtonNext->setEnabled(false);
ui->timeEditTime->setEnabled(false); ui->timeEditTime->setEnabled(false);
ui->comboBoxProjekt->setEnabled(false); ui->comboBoxProject->setEnabled(false);
ui->comboBoxSubprojekt->setEnabled(false); ui->comboBoxSubproject->setEnabled(false);
ui->comboBoxWorkpackage->setEnabled(false); ui->comboBoxWorkpackage->setEnabled(false);
ui->comboBoxText->setEnabled(false); ui->comboBoxText->setEnabled(false);
ui->pushButtonStart->setEnabled(false); ui->pushButtonStart->setEnabled(false);
@@ -513,11 +513,11 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos)
auto selectedAction = menu.exec(ui->treeViewTimeAssignments->viewport()->mapToGlobal(pos)); auto selectedAction = menu.exec(ui->treeViewTimeAssignments->viewport()->mapToGlobal(pos));
if(selectedAction == editAction) if(selectedAction == editAction)
{ {
TimeAssignmentDialog dialog(m_projekte, m_settings, this); TimeAssignmentDialog dialog(m_projects, m_settings, this);
dialog.setTime(timeAssignment.time); dialog.setTime(timeAssignment.time);
dialog.setTimespan(timeAssignment.timespan); dialog.setTimespan(timeAssignment.timespan);
dialog.setProjekt(timeAssignment.projekt); dialog.setProject(timeAssignment.project);
dialog.setSubprojekt(timeAssignment.subprojekt); dialog.setSubproject(timeAssignment.subproject);
dialog.setWorkpackage(timeAssignment.workpackage); dialog.setWorkpackage(timeAssignment.workpackage);
dialog.setText(timeAssignment.text); dialog.setText(timeAssignment.text);
again1: again1:
@@ -528,7 +528,7 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos)
m_erfassung.doUpdateTimeAssignment(timeAssignment.id, m_userInfo.userId, ui->dateEditDate->date(), m_erfassung.doUpdateTimeAssignment(timeAssignment.id, m_userInfo.userId, ui->dateEditDate->date(),
dialog.getTime(), dialog.getTimespan(), dialog.getTime(), dialog.getTimespan(),
dialog.getProjekt(), dialog.getSubprojekt(), dialog.getProject(), dialog.getSubproject(),
dialog.getWorkpackage(), dialog.getText()); dialog.getWorkpackage(), dialog.getText());
eventLoop.exec(); eventLoop.exec();
@@ -540,16 +540,16 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos)
ui->pushButtonPrev->setEnabled(false); ui->pushButtonPrev->setEnabled(false);
ui->pushButtonNext->setEnabled(false); ui->pushButtonNext->setEnabled(false);
ui->timeEditTime->setEnabled(false); ui->timeEditTime->setEnabled(false);
ui->comboBoxProjekt->setEnabled(false); ui->comboBoxProject->setEnabled(false);
ui->comboBoxSubprojekt->setEnabled(false); ui->comboBoxSubproject->setEnabled(false);
ui->comboBoxWorkpackage->setEnabled(false); ui->comboBoxWorkpackage->setEnabled(false);
ui->comboBoxText->setEnabled(false); ui->comboBoxText->setEnabled(false);
ui->pushButtonStart->setEnabled(false); ui->pushButtonStart->setEnabled(false);
ui->pushButtonEnd->setEnabled(false); ui->pushButtonEnd->setEnabled(false);
ui->treeViewTimeAssignments->setEnabled(false); ui->treeViewTimeAssignments->setEnabled(false);
m_settings.prependProjekt(dialog.getProjekt()); m_settings.prependProject(dialog.getProject());
m_settings.prependSubprojekt(dialog.getSubprojekt()); m_settings.prependSubproject(dialog.getSubproject());
m_settings.prependWorkpackage(dialog.getWorkpackage()); m_settings.prependWorkpackage(dialog.getWorkpackage());
m_settings.prependText(dialog.getText()); m_settings.prependText(dialog.getText());
@@ -599,8 +599,8 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos)
ui->pushButtonPrev->setEnabled(false); ui->pushButtonPrev->setEnabled(false);
ui->pushButtonNext->setEnabled(false); ui->pushButtonNext->setEnabled(false);
ui->timeEditTime->setEnabled(false); ui->timeEditTime->setEnabled(false);
ui->comboBoxProjekt->setEnabled(false); ui->comboBoxProject->setEnabled(false);
ui->comboBoxSubprojekt->setEnabled(false); ui->comboBoxSubproject->setEnabled(false);
ui->comboBoxWorkpackage->setEnabled(false); ui->comboBoxWorkpackage->setEnabled(false);
ui->comboBoxText->setEnabled(false); ui->comboBoxText->setEnabled(false);
ui->pushButtonStart->setEnabled(false); ui->pushButtonStart->setEnabled(false);
@@ -636,7 +636,7 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos)
auto selectedAction = menu.exec(ui->treeViewTimeAssignments->viewport()->mapToGlobal(pos)); auto selectedAction = menu.exec(ui->treeViewTimeAssignments->viewport()->mapToGlobal(pos));
if(selectedAction == createAction) if(selectedAction == createAction)
{ {
TimeAssignmentDialog dialog(m_projekte, m_settings, this); TimeAssignmentDialog dialog(m_projects, m_settings, this);
again2: again2:
if(dialog.exec() == QDialog::Accepted) if(dialog.exec() == QDialog::Accepted)
{ {
@@ -645,7 +645,7 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos)
m_erfassung.doCreateTimeAssignment(m_userInfo.userId, ui->dateEditDate->date(), m_erfassung.doCreateTimeAssignment(m_userInfo.userId, ui->dateEditDate->date(),
dialog.getTime(), dialog.getTimespan(), dialog.getTime(), dialog.getTimespan(),
dialog.getProjekt(), dialog.getSubprojekt(), dialog.getProject(), dialog.getSubproject(),
dialog.getWorkpackage(), dialog.getText()); dialog.getWorkpackage(), dialog.getText());
eventLoop.exec(); eventLoop.exec();
@@ -657,16 +657,16 @@ void MainWindow::contextMenuTimeAssignment(const QPoint &pos)
ui->pushButtonPrev->setEnabled(false); ui->pushButtonPrev->setEnabled(false);
ui->pushButtonNext->setEnabled(false); ui->pushButtonNext->setEnabled(false);
ui->timeEditTime->setEnabled(false); ui->timeEditTime->setEnabled(false);
ui->comboBoxProjekt->setEnabled(false); ui->comboBoxProject->setEnabled(false);
ui->comboBoxSubprojekt->setEnabled(false); ui->comboBoxSubproject->setEnabled(false);
ui->comboBoxWorkpackage->setEnabled(false); ui->comboBoxWorkpackage->setEnabled(false);
ui->comboBoxText->setEnabled(false); ui->comboBoxText->setEnabled(false);
ui->pushButtonStart->setEnabled(false); ui->pushButtonStart->setEnabled(false);
ui->pushButtonEnd->setEnabled(false); ui->pushButtonEnd->setEnabled(false);
ui->treeViewTimeAssignments->setEnabled(false); ui->treeViewTimeAssignments->setEnabled(false);
m_settings.prependProjekt(dialog.getProjekt()); m_settings.prependProject(dialog.getProject());
m_settings.prependSubprojekt(dialog.getSubprojekt()); m_settings.prependSubproject(dialog.getSubproject());
m_settings.prependWorkpackage(dialog.getWorkpackage()); m_settings.prependWorkpackage(dialog.getWorkpackage());
m_settings.prependText(dialog.getText()); m_settings.prependText(dialog.getText());
@@ -730,7 +730,7 @@ void MainWindow::pushButtonStartPressed()
m_erfassung.doUpdateTimeAssignment(timeAssignment.id, m_userInfo.userId, timeAssignment.date, m_erfassung.doUpdateTimeAssignment(timeAssignment.id, m_userInfo.userId, timeAssignment.date,
timeAssignment.time, timespan, timeAssignment.time, timespan,
timeAssignment.projekt, timeAssignment.subprojekt, timeAssignment.project, timeAssignment.subproject,
timeAssignment.workpackage, timeAssignment.text); timeAssignment.workpackage, timeAssignment.text);
eventLoop.exec(); eventLoop.exec();
@@ -750,7 +750,7 @@ void MainWindow::pushButtonStartPressed()
m_erfassung.doCreateTimeAssignment(m_userInfo.userId, ui->dateEditDate->date(), m_erfassung.doCreateTimeAssignment(m_userInfo.userId, ui->dateEditDate->date(),
m_timeAssignmentTime, QTime(0, 0), m_timeAssignmentTime, QTime(0, 0),
ui->comboBoxProjekt->currentData().toString(), ui->comboBoxSubprojekt->currentText(), ui->comboBoxProject->currentData().toString(), ui->comboBoxSubproject->currentText(),
ui->comboBoxWorkpackage->currentText(), ui->comboBoxText->currentText()); ui->comboBoxWorkpackage->currentText(), ui->comboBoxText->currentText());
eventLoop.exec(); eventLoop.exec();
@@ -761,8 +761,8 @@ void MainWindow::pushButtonStartPressed()
return; return;
} }
m_settings.prependProjekt(ui->comboBoxProjekt->currentData().toString()); m_settings.prependProject(ui->comboBoxProject->currentData().toString());
m_settings.prependSubprojekt(ui->comboBoxSubprojekt->currentText()); m_settings.prependSubproject(ui->comboBoxSubproject->currentText());
m_settings.prependWorkpackage(ui->comboBoxWorkpackage->currentText()); m_settings.prependWorkpackage(ui->comboBoxWorkpackage->currentText());
m_settings.prependText(ui->comboBoxText->currentText()); m_settings.prependText(ui->comboBoxText->currentText());
@@ -801,7 +801,7 @@ void MainWindow::pushButtonEndPressed()
m_erfassung.doUpdateTimeAssignment(timeAssignment.id, m_userInfo.userId, timeAssignment.date, m_erfassung.doUpdateTimeAssignment(timeAssignment.id, m_userInfo.userId, timeAssignment.date,
timeAssignment.time, timespan, timeAssignment.time, timespan,
timeAssignment.projekt, timeAssignment.subprojekt, timeAssignment.project, timeAssignment.subproject,
timeAssignment.workpackage, timeAssignment.text); timeAssignment.workpackage, timeAssignment.text);
eventLoop.exec(); eventLoop.exec();
@@ -902,8 +902,8 @@ void MainWindow::validateEntries()
lastTimeAssignment = &timeAssignment; lastTimeAssignment = &timeAssignment;
ui->verticalLayout2->addWidget(new TimeAssignmentStrip(timeAssignment.id, timeAssignment.timespan, buildProjektString(timeAssignment.projekt), ui->verticalLayout2->addWidget(new TimeAssignmentStrip(timeAssignment.id, timeAssignment.timespan, buildProjectString(timeAssignment.project),
timeAssignment.subprojekt, timeAssignment.workpackage, timeAssignment.text, timeAssignment.subproject, timeAssignment.workpackage, timeAssignment.text,
m_settings, ui->scrollAreaWidgetContents)); m_settings, ui->scrollAreaWidgetContents));
if(timeAssignment.timespan == QTime(0, 0)) if(timeAssignment.timespan == QTime(0, 0))
@@ -957,8 +957,8 @@ void MainWindow::validateEntries()
lastTimeAssignment = &timeAssignment; lastTimeAssignment = &timeAssignment;
ui->verticalLayout2->addWidget(new TimeAssignmentStrip(timeAssignment.id, timeAssignment.timespan, buildProjektString(timeAssignment.projekt), ui->verticalLayout2->addWidget(new TimeAssignmentStrip(timeAssignment.id, timeAssignment.timespan, buildProjectString(timeAssignment.project),
timeAssignment.subprojekt, timeAssignment.workpackage, timeAssignment.text, timeAssignment.subproject, timeAssignment.workpackage, timeAssignment.text,
m_settings, ui->scrollAreaWidgetContents)); m_settings, ui->scrollAreaWidgetContents));
if(timeAssignment.timespan == QTime(0, 0)) if(timeAssignment.timespan == QTime(0, 0))
@@ -1031,8 +1031,8 @@ void MainWindow::validateEntries()
lastTimeAssignment = &timeAssignment; lastTimeAssignment = &timeAssignment;
ui->verticalLayout2->addWidget(new TimeAssignmentStrip(timeAssignment.id, timeAssignment.timespan, buildProjektString(timeAssignment.projekt), ui->verticalLayout2->addWidget(new TimeAssignmentStrip(timeAssignment.id, timeAssignment.timespan, buildProjectString(timeAssignment.project),
timeAssignment.subprojekt, timeAssignment.workpackage, timeAssignment.text, timeAssignment.subproject, timeAssignment.workpackage, timeAssignment.text,
m_settings, ui->scrollAreaWidgetContents)); m_settings, ui->scrollAreaWidgetContents));
if(timeAssignment.timespan == QTime(0, 0)) if(timeAssignment.timespan == QTime(0, 0))
@@ -1087,7 +1087,7 @@ void MainWindow::validateEntries()
after: after:
if(errorMessage.isEmpty()) if(errorMessage.isEmpty())
m_workingTimeLabel->setText(tr("%0: %1").arg(tr("Working time")).arg(tr("%0h").arg(m_timeAssignmentTime.toString(QStringLiteral("HH:mm"))))); m_workingTimeLabel->setText(tr("%0: %1").arg(tr("Assigned time")).arg(tr("%0h").arg(m_timeAssignmentTime.toString(QStringLiteral("HH:mm")))));
else else
{ {
auto label = new QLabel(tr("Strip rendering aborted due error."), ui->scrollAreaWidgetContents); auto label = new QLabel(tr("Strip rendering aborted due error."), ui->scrollAreaWidgetContents);
@@ -1106,8 +1106,8 @@ void MainWindow::validateEntries()
} }
ui->timeEditTime->setEnabled(true); ui->timeEditTime->setEnabled(true);
ui->comboBoxProjekt->setEnabled(true); ui->comboBoxProject->setEnabled(true);
ui->comboBoxSubprojekt->setEnabled(true); ui->comboBoxSubproject->setEnabled(true);
ui->comboBoxWorkpackage->setEnabled(true); ui->comboBoxWorkpackage->setEnabled(true);
ui->comboBoxText->setEnabled(true); ui->comboBoxText->setEnabled(true);
ui->pushButtonStart->setEnabled(true); ui->pushButtonStart->setEnabled(true);
@@ -1115,40 +1115,40 @@ void MainWindow::validateEntries()
void MainWindow::updateComboboxes() void MainWindow::updateComboboxes()
{ {
ui->comboBoxProjekt->clear(); ui->comboBoxProject->clear();
{ {
auto preferedProjekte = m_settings.projekte(); auto preferedProjects = m_settings.projects();
for(const auto &preferedProjekt : preferedProjekte) for(const auto &preferedProject : preferedProjects)
{ {
if(!m_projekte.contains(preferedProjekt)) if(!m_projects.contains(preferedProject))
{ {
qWarning() << "cannot find projekt" << preferedProjekt; qWarning() << "cannot find project" << preferedProject;
continue; continue;
} }
ui->comboBoxProjekt->addItem(m_projekte.value(preferedProjekt) % " (" % preferedProjekt % ')', preferedProjekt); ui->comboBoxProject->addItem(m_projects.value(preferedProject) % " (" % preferedProject % ')', preferedProject);
} }
if(preferedProjekte.count()) if(preferedProjects.count())
ui->comboBoxProjekt->insertSeparator(ui->comboBoxProjekt->count()); ui->comboBoxProject->insertSeparator(ui->comboBoxProject->count());
for(auto iter = m_projekte.constBegin(); iter != m_projekte.constEnd(); iter++) for(auto iter = m_projects.constBegin(); iter != m_projects.constEnd(); iter++)
{ {
if(!preferedProjekte.contains(iter.key())) if(!preferedProjects.contains(iter.key()))
ui->comboBoxProjekt->addItem(iter.value() % " (" % iter.key() % ')', iter.key()); ui->comboBoxProject->addItem(iter.value() % " (" % iter.key() % ')', iter.key());
} }
} }
ui->comboBoxSubprojekt->clear(); ui->comboBoxSubproject->clear();
{ {
auto subprojekte = m_settings.subprojekte(); auto subprojects = m_settings.subprojects();
for(const auto &subprojekt : subprojekte) for(const auto &subproject : subprojects)
ui->comboBoxSubprojekt->addItem(subprojekt); ui->comboBoxSubproject->addItem(subproject);
if(subprojekte.count()) if(subprojects.count())
ui->comboBoxSubprojekt->setCurrentText(QString()); ui->comboBoxSubproject->setCurrentText(QString());
} }
ui->comboBoxWorkpackage->clear(); ui->comboBoxWorkpackage->clear();
@@ -1182,13 +1182,13 @@ void MainWindow::clearStrips()
} }
} }
QString MainWindow::buildProjektString(const QString &projekt) QString MainWindow::buildProjectString(const QString &project)
{ {
if(m_projekte.contains(projekt)) if(m_projects.contains(project))
return m_projekte.value(projekt) % " (" % projekt % ")"; return m_projects.value(project) % " (" % project % ")";
else else
{ {
qWarning() << "could not find projekt" << projekt; qWarning() << "could not find project" << project;
return projekt; return project;
} }
} }

View File

@@ -28,7 +28,7 @@ public:
private Q_SLOTS: private Q_SLOTS:
void refresh(bool forceAuswertung = false); void refresh(bool forceAuswertung = false);
void getProjekteFinished(bool success, const QString &message, const QVector<Zeiterfassung::Projekt> &projekte); void getProjekctsFinished(bool success, const QString &message, const QVector<Zeiterfassung::Project> &projects);
void getAuswertungFinished(bool success, const QString &message, const QByteArray &content); void getAuswertungFinished(bool success, const QString &message, const QByteArray &content);
void refreshBuchungenFinished(bool success, const QString &message); void refreshBuchungenFinished(bool success, const QString &message);
void refreshTimeAssignmentsFinished(bool success, const QString &message); void refreshTimeAssignmentsFinished(bool success, const QString &message);
@@ -42,13 +42,13 @@ private:
void updateComboboxes(); void updateComboboxes();
void clearStrips(); void clearStrips();
QString buildProjektString(const QString &projekt); QString buildProjectString(const QString &project);
Ui::MainWindow *ui; Ui::MainWindow *ui;
ZeiterfassungSettings &m_settings; ZeiterfassungSettings &m_settings;
Zeiterfassung &m_erfassung; Zeiterfassung &m_erfassung;
const Zeiterfassung::UserInfo &m_userInfo; const Zeiterfassung::UserInfo &m_userInfo;
QMap<QString, QString> m_projekte; QMap<QString, QString> m_projects;
QDate m_auswertungDate; QDate m_auswertungDate;
QByteArray m_auswertung; QByteArray m_auswertung;
QLabel *m_workingTimeLabel; QLabel *m_workingTimeLabel;

View File

@@ -68,7 +68,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBoxProjekt"> <widget class="QComboBox" name="comboBoxProject">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
@@ -81,7 +81,7 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QComboBox" name="comboBoxSubprojekt"> <widget class="QComboBox" name="comboBoxSubproject">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>

View File

@@ -35,8 +35,8 @@ QVariant TimeAssignmentsModel::data(const QModelIndex &index, int role) const
case 0: return timeAssignment.id; case 0: return timeAssignment.id;
case 1: return timeAssignment.time; case 1: return timeAssignment.time;
case 2: return timeAssignment.timespan; case 2: return timeAssignment.timespan;
case 3: return timeAssignment.projekt; case 3: return timeAssignment.project;
case 4: return timeAssignment.subprojekt; case 4: return timeAssignment.subproject;
case 5: return timeAssignment.workpackage; case 5: return timeAssignment.workpackage;
case 6: return timeAssignment.text; case 6: return timeAssignment.text;
} }
@@ -59,8 +59,8 @@ QVariant TimeAssignmentsModel::headerData(int section, Qt::Orientation orientati
case 0: return tr("ID"); case 0: return tr("ID");
case 1: return tr("Time"); case 1: return tr("Time");
case 2: return tr("Timespan"); case 2: return tr("Timespan");
case 3: return tr("Projekt"); case 3: return tr("Project");
case 4: return tr("Subprojekt"); case 4: return tr("Subproject");
case 5: return tr("Workpackage"); case 5: return tr("Workpackage");
case 6: return tr("Text"); case 6: return tr("Text");
} }

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>500</width> <width>500</width>
<height>52</height> <height>54</height>
</rect> </rect>
</property> </property>
<property name="frameShape"> <property name="frameShape">
@@ -37,7 +37,7 @@
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">9:99</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -49,14 +49,14 @@
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">TYPE</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="labelId"> <widget class="QLabel" name="labelId">
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">0123456</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>

View File

@@ -6,7 +6,7 @@
#include "zeiterfassungsettings.h" #include "zeiterfassungsettings.h"
TimeAssignmentStrip::TimeAssignmentStrip(int id, const QTime &duration, const QString &projekt, const QString &subprojekt, TimeAssignmentStrip::TimeAssignmentStrip(int id, const QTime &duration, const QString &project, const QString &subproject,
const QString &workpackage, const QString &text, const ZeiterfassungSettings &settings, const QString &workpackage, const QString &text, const ZeiterfassungSettings &settings,
QWidget *parent) : QWidget *parent) :
QFrame(parent), QFrame(parent),
@@ -20,10 +20,10 @@ TimeAssignmentStrip::TimeAssignmentStrip(int id, const QTime &duration, const QS
setStyleSheet(QStringLiteral("%0 { background-color: %1; }").arg(staticMetaObject.className()).arg(settings.timeAssignmentBackgroundColor())); setStyleSheet(QStringLiteral("%0 { background-color: %1; }").arg(staticMetaObject.className()).arg(settings.timeAssignmentBackgroundColor()));
ui->labelTime->setText(duration == QTime(0, 0) ? tr("Open") : duration.toString(QStringLiteral("HH:mm"))); ui->labelTime->setText(duration == QTime(0, 0) ? tr("Open") : duration.toString(QStringLiteral("HH:mm")));
ui->labelProjekt->setText(projekt); ui->labelProject->setText(project);
ui->labelId->setText(QString::number(id)); ui->labelId->setText(QString::number(id));
ui->labelSubprojekt->setText(subprojekt); ui->labelSubproject->setText(subproject);
ui->labelWorkpackage->setText(workpackage); ui->labelWorkpackage->setText(workpackage);
ui->labelText->setText(text); ui->labelText->setText(text);
} }

View File

@@ -13,7 +13,7 @@ class TimeAssignmentStrip : public QFrame
Q_OBJECT Q_OBJECT
public: public:
explicit TimeAssignmentStrip(int id, const QTime &duration, const QString &projekt, const QString &subprojekt, explicit TimeAssignmentStrip(int id, const QTime &duration, const QString &project, const QString &subproject,
const QString &workpackage, const QString &text, const ZeiterfassungSettings &settings, const QString &workpackage, const QString &text, const ZeiterfassungSettings &settings,
QWidget *parent = 0); QWidget *parent = 0);
~TimeAssignmentStrip(); ~TimeAssignmentStrip();

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>500</width> <width>500</width>
<height>80</height> <height>82</height>
</rect> </rect>
</property> </property>
<property name="frameShape"> <property name="frameShape">
@@ -42,26 +42,26 @@
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">9:99</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="labelProjekt"> <widget class="QLabel" name="labelProject">
<property name="font"> <property name="font">
<font> <font>
<pointsize>15</pointsize> <pointsize>15</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">PROJECT 1 (12345)</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="labelId"> <widget class="QLabel" name="labelId">
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">0123456</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set> <set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
@@ -73,7 +73,7 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,1"> <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,0,1">
<item> <item>
<widget class="QLabel" name="labelSubprojekt"> <widget class="QLabel" name="labelSubproject">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>120</width> <width>120</width>
@@ -81,7 +81,7 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">Subproject</string>
</property> </property>
</widget> </widget>
</item> </item>
@@ -94,14 +94,14 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">Workpackage</string>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="labelText"> <widget class="QLabel" name="labelText">
<property name="text"> <property name="text">
<string>TextLabel</string> <string notr="true">Text</string>
</property> </property>
</widget> </widget>
</item> </item>

Binary file not shown.

View File

@@ -1,4 +1,577 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="de_DE"> <TS version="2.1" language="de_DE">
<context>
<name>AboutMeDialog</name>
<message>
<source>About me</source>
<translation>Über mich</translation>
</message>
<message>
<source>User-ID:</source>
<translation>Benutzer-ID:</translation>
</message>
<message>
<source>E-Mail:</source>
<translation>E-Mail:</translation>
</message>
<message>
<source>Long username:</source>
<translation>Langer Benutzername:</translation>
</message>
<message>
<source>Text:</source>
<translation>Text:</translation>
</message>
<message>
<source>Username:</source>
<translation>Benutzername:</translation>
</message>
</context>
<context>
<name>AuthenticationDialog</name>
<message>
<source>Authentication</source>
<translation>Authentifizierung</translation>
</message>
<message>
<source>Username:</source>
<translation>Benutzername:</translation>
</message>
<message>
<source>Password:</source>
<translation>Passwort:</translation>
</message>
</context>
<context>
<name>BuchungDialog</name>
<message>
<source>Buchung</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time:</source>
<translation>Zeit:</translation>
</message>
<message>
<source>Timespan:</source>
<translation>Zeitspanne:</translation>
</message>
<message>
<source>Type:</source>
<translation>Typ:</translation>
</message>
<message>
<source>Text:</source>
<translation>Text:</translation>
</message>
</context>
<context>
<name>BuchungStrip</name>
<message>
<source>START</source>
<translation>KOMMEN</translation>
</message>
<message>
<source>END</source>
<translation>GEHEN</translation>
</message>
<message>
<source>UNKNOWN</source>
<translation>UNBEKANNT</translation>
</message>
</context>
<context>
<name>BuchungenModel</name>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Time</source>
<translation>Zeit</translation>
</message>
<message>
<source>Timespan</source>
<translation>Zeitspanne</translation>
</message>
<message>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<source>Text</source>
<translation>Text</translation>
</message>
</context>
<context>
<name>LanguageSelectionDialog</name>
<message>
<source>Language selection</source>
<translation>Sprachauswahl</translation>
</message>
<message>
<source>Please select a language:</source>
<translation>Bitte wählen sie eine Sprache:</translation>
</message>
<message>
<source>Language:</source>
<translation>Sprache:</translation>
</message>
<message>
<source>English</source>
<translation>Englisch</translation>
</message>
<message>
<source>German</source>
<translation>Deutsch</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<source>Start</source>
<translation>Kommen</translation>
</message>
<message>
<source>End</source>
<translation>Gehen</translation>
</message>
<message>
<source>Optimized view</source>
<translation>Optimierte Anzeige</translation>
</message>
<message>
<source>Advanced view</source>
<translation>Erweiterte Anzeige</translation>
</message>
<message>
<source>Buchungen</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time assignments</source>
<translation>Kontierungen</translation>
</message>
<message>
<source>&amp;File</source>
<translation>&amp;Datei</translation>
</message>
<message>
<source>&amp;About</source>
<translation>&amp;Über</translation>
</message>
<message>
<source>&amp;View</source>
<translation>&amp;Ansicht</translation>
</message>
<message>
<source>&amp;Tools</source>
<translation>&amp;Werkzeuge</translation>
</message>
<message>
<source>&amp;Quit</source>
<translation>&amp;Beenden</translation>
</message>
<message>
<source>About &amp;Me</source>
<translation>Über &amp;mich</translation>
</message>
<message>
<source>About &amp;zeiterfassung</source>
<translation>Über &amp;zeiterfassung</translation>
</message>
<message>
<source>About &amp;Qt</source>
<translation>Über &amp;Qt</translation>
</message>
<message>
<source>&amp;Today</source>
<translation>&amp;Heute</translation>
</message>
<message>
<source>&amp;Refresh</source>
<translation>&amp;Aktualisieren</translation>
</message>
<message>
<source>&amp;Auswertung</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Settings</source>
<translation>&amp;Einstellungen</translation>
</message>
<message>
<source>Zeiterfassung - %0 (%1)</source>
<translation>Zeiterfassung - %0 (%1)</translation>
</message>
<message>
<source>Could not open auswertung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not open default PDF viewer!</source>
<translation>Konnte das PDF-Anzeigeprogramm nicht öffnen!</translation>
</message>
<message>
<source>Workpackage</source>
<translation>Arbeitspaket</translation>
</message>
<message>
<source>Text</source>
<translation>Text</translation>
</message>
<message>
<source>%0: %1</source>
<translation>%0: %1</translation>
</message>
<message>
<source>???</source>
<translation>???</translation>
</message>
<message>
<source>Unknown error occured.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error occured.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Balance</source>
<translation>Saldo</translation>
</message>
<message>
<source>Holidays</source>
<translation>Urlaubsanspruch</translation>
</message>
<message>
<source>Could not load Buchungen!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not load Auswertung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%0h</source>
<translation>%0h</translation>
</message>
<message>
<source>Could not refresh Buchungen!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not refresh time assignments!</source>
<translation>Konnte Kontierungen nicht aktualisieren!</translation>
</message>
<message>
<source>Edit</source>
<translation>Bearbeiten</translation>
</message>
<message>
<source>Delete</source>
<translation>Löschen</translation>
</message>
<message>
<source>Could not update Buchung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not delete Buchung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation>Erstellen</translation>
</message>
<message>
<source>Could not create Buchung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not update time assignment!</source>
<translation>Konnte Kontierung nicht bearbeiten!</translation>
</message>
<message>
<source>Could not delete time assignment!</source>
<translation>Konnte Kontierung nicht löschen!</translation>
</message>
<message>
<source>Could not create time assignment!</source>
<translation>Konnte Kontierung nicht erstellen!</translation>
</message>
<message>
<source>Missing Buchung.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Expected start Buchung, instead got type %0
Buchung ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Break</source>
<translation>Pause</translation>
</message>
<message>
<source>Missing time assignment.</source>
<translation>Kontierung fehlend.</translation>
</message>
<message>
<source>Expected %0 but received %1 in time assignment.
Time assignment ID: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is another Buchung after an unfinished time assignment.
Buchung ID: %0
Time assignment ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is another time assignment after an unfinished time assignment.
Time assignment ID: %0
Time assignment ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Switch</source>
<translation>Wechseln</translation>
</message>
<message>
<source>The last time assignment is finished without end Buchung
Time assignment ID: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Expected end Buchung, instead got type %0
Buchung ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing time assignment(s)! Missing: %0h</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time assignment time longer than Buchung time! Time assignment: %0 Buchung: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Strip rendering aborted due error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Illegal state!</source>
<translation>Ungültiger Zustand!</translation>
</message>
<message>
<source>Your Buchungen and time assignments for this day are in an invalid state:
%0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Assigned time</source>
<translation>Kontierte Zeit</translation>
</message>
<message>
<source>Subproject</source>
<translation>Subprojekt</translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<source>Settings</source>
<translation>Einstellungen</translation>
</message>
<message>
<source>buchungStartBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>buchungEndBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>buchungOtherBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>timeAssignmentBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TimeAssignmentDialog</name>
<message>
<source>Time assignment</source>
<translation>Kontierung</translation>
</message>
<message>
<source>Time:</source>
<translation>Zeit:</translation>
</message>
<message>
<source>Timespan:</source>
<translation>Zeitspanne:</translation>
</message>
<message>
<source>Workpackage:</source>
<translation>Arbeitspaket:</translation>
</message>
<message>
<source>Text:</source>
<translation>Text:</translation>
</message>
<message>
<source>Project:</source>
<translation>Projekt:</translation>
</message>
<message>
<source>Subproject:</source>
<translation>Subprojekt:</translation>
</message>
</context>
<context>
<name>TimeAssignmentStrip</name>
<message>
<source>Open</source>
<translation>Offen</translation>
</message>
</context>
<context>
<name>TimeAssignmentsModel</name>
<message>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<source>Time</source>
<translation>Zeit</translation>
</message>
<message>
<source>Timespan</source>
<translation>Zeitspanne</translation>
</message>
<message>
<source>Workpackage</source>
<translation>Arbeitspaket</translation>
</message>
<message>
<source>Text</source>
<translation>Text</translation>
</message>
<message>
<source>Project</source>
<translation>Projekt</translation>
</message>
<message>
<source>Subproject</source>
<translation>Subprojekt</translation>
</message>
</context>
<context>
<name>Zeiterfassung</name>
<message>
<source>Request error occured: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not find necessary keywords in login page!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Request did not contain a Location header.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Authentication failure. Please check username and password.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown authentication failure occured. Redirected to: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Parsing JSON failed: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON document is not an object!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON does not contain evoAppsUser!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>evoAppsUser is not an object!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON document is not an array!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON does not contain bookingNr!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON does not contain elements!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>elements is not an array!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>main</name>
<message>
<source>Loading settings...</source>
<translation>Lade Einstellungen...</translation>
</message>
<message>
<source>Invalid language selection!</source>
<translation>Ungültige Sprachauswahl!</translation>
</message>
<message>
<source>Loading login page...</source>
<translation>Lade Login-Seite...</translation>
</message>
<message>
<source>Base url</source>
<translation>Basis URL</translation>
</message>
<message>
<source>Please enter the base url to the Zeiterfassung:</source>
<translation>Bitte geben Sie die Basis URL zur Zeiterfassung ein:</translation>
</message>
<message>
<source>Authenticating...</source>
<translation>Authentifizieren...</translation>
</message>
<message>
<source>Getting user information...</source>
<translation>Hole Benutzer Information...</translation>
</message>
<message>
<source>Could not get user information!</source>
<translation>Konnte Benutzer Information nicht holen!</translation>
</message>
<message>
<source>You did not select a valid language.</source>
<translation>Sie haben keine gültige Sprache ausgewählt.</translation>
</message>
<message>
<source>Could not access Zeiterfassung!</source>
<translation>Konnte Zeiterfassung nicht erreichen!</translation>
</message>
<message>
<source>Could not authenticate with Zeiterfassung!</source>
<translation>Konnte nicht bei Zeiterfassung authentifizieren!</translation>
</message>
</context>
</TS> </TS>

View File

@@ -1,4 +1,577 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.1" language="en_US"> <TS version="2.1" language="en_US">
<context>
<name>AboutMeDialog</name>
<message>
<source>About me</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>User-ID:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>E-Mail:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Long username:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Username:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AuthenticationDialog</name>
<message>
<source>Authentication</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Username:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Password:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>BuchungDialog</name>
<message>
<source>Buchung</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Timespan:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>BuchungStrip</name>
<message>
<source>START</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>END</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>UNKNOWN</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>BuchungenModel</name>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Timespan</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Type</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>LanguageSelectionDialog</name>
<message>
<source>Language selection</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please select a language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>English</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>German</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<source>Start</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>End</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimized view</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Advanced view</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Buchungen</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time assignments</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;File</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;About</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;View</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About &amp;Me</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About &amp;zeiterfassung</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>About &amp;Qt</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Today</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Refresh</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Auswertung</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&amp;Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Zeiterfassung - %0 (%1)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not open auswertung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not open default PDF viewer!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Workpackage</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%0: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>???</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Unknown error occured.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown error occured.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Balance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Holidays</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not load Buchungen!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not load Auswertung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>%0h</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not refresh Buchungen!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not refresh time assignments!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not update Buchung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not delete Buchung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Create</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not create Buchung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not update time assignment!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not delete time assignment!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not create time assignment!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing Buchung.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Expected start Buchung, instead got type %0
Buchung ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Break</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing time assignment.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Expected %0 but received %1 in time assignment.
Time assignment ID: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is another Buchung after an unfinished time assignment.
Buchung ID: %0
Time assignment ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>There is another time assignment after an unfinished time assignment.
Time assignment ID: %0
Time assignment ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Switch</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The last time assignment is finished without end Buchung
Time assignment ID: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Expected end Buchung, instead got type %0
Buchung ID: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Missing time assignment(s)! Missing: %0h</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time assignment time longer than Buchung time! Time assignment: %0 Buchung: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Strip rendering aborted due error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Illegal state!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Your Buchungen and time assignments for this day are in an invalid state:
%0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Assigned time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subproject</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsDialog</name>
<message>
<source>Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>buchungStartBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>buchungEndBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>buchungOtherBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>timeAssignmentBackgroundColor</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TimeAssignmentDialog</name>
<message>
<source>Time assignment</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Timespan:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Workpackage:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Project:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subproject:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TimeAssignmentStrip</name>
<message>
<source>Open</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TimeAssignmentsModel</name>
<message>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Timespan</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Workpackage</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Text</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Project</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Subproject</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>Zeiterfassung</name>
<message>
<source>Request error occured: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not find necessary keywords in login page!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Request did not contain a Location header.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Authentication failure. Please check username and password.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>An unknown authentication failure occured. Redirected to: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Parsing JSON failed: %0</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON document is not an object!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON does not contain evoAppsUser!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>evoAppsUser is not an object!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON document is not an array!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON does not contain bookingNr!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>JSON does not contain elements!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>elements is not an array!</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>main</name>
<message>
<source>Loading settings...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Invalid language selection!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Loading login page...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Base url</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please enter the base url to the Zeiterfassung:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Authenticating...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Getting user information...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not get user information!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You did not select a valid language.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not access Zeiterfassung!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Could not authenticate with Zeiterfassung!</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS> </TS>

View File

@@ -210,7 +210,7 @@ bool Zeiterfassung::doGetTimeAssignments(int userId, const QDate &start, const Q
} }
bool Zeiterfassung::doCreateTimeAssignment(int userId, const QDate &date, const QTime &time, const QTime &timespan, bool Zeiterfassung::doCreateTimeAssignment(int userId, const QDate &date, const QTime &time, const QTime &timespan,
const QString &projekt, const QString &subprojekt, const QString &workpackage, const QString &project, const QString &subproject, const QString &workpackage,
const QString &text) const QString &text)
{ {
if(m_replies.createTimeAssignment) if(m_replies.createTimeAssignment)
@@ -234,12 +234,12 @@ bool Zeiterfassung::doCreateTimeAssignment(int userId, const QDate &date, const
QJsonArray koWertList; QJsonArray koWertList;
{ {
QJsonObject obj; QJsonObject obj;
obj[QStringLiteral("value")] = projekt; obj[QStringLiteral("value")] = project;
koWertList << obj; koWertList << obj;
} }
{ {
QJsonObject obj; QJsonObject obj;
obj[QStringLiteral("value")] = subprojekt; obj[QStringLiteral("value")] = subproject;
koWertList << obj; koWertList << obj;
} }
{ {
@@ -258,7 +258,7 @@ bool Zeiterfassung::doCreateTimeAssignment(int userId, const QDate &date, const
} }
bool Zeiterfassung::doUpdateTimeAssignment(int timeAssignmentId, int userId, const QDate &date, const QTime &time, bool Zeiterfassung::doUpdateTimeAssignment(int timeAssignmentId, int userId, const QDate &date, const QTime &time,
const QTime &timespan, const QString &projekt, const QString &subprojekt, const QTime &timespan, const QString &project, const QString &subproject,
const QString &workpackage, const QString &text) const QString &workpackage, const QString &text)
{ {
if(m_replies.updateTimeAssignment) if(m_replies.updateTimeAssignment)
@@ -287,12 +287,12 @@ bool Zeiterfassung::doUpdateTimeAssignment(int timeAssignmentId, int userId, con
QJsonArray koWertList; QJsonArray koWertList;
{ {
QJsonObject obj; QJsonObject obj;
obj[QStringLiteral("value")] = projekt; obj[QStringLiteral("value")] = project;
koWertList << obj; koWertList << obj;
} }
{ {
QJsonObject obj; QJsonObject obj;
obj[QStringLiteral("value")] = subprojekt; obj[QStringLiteral("value")] = subproject;
koWertList << obj; koWertList << obj;
} }
{ {
@@ -330,11 +330,11 @@ bool Zeiterfassung::doDeleteTimeAssignment(int timeAssignmentId)
return true; return true;
} }
bool Zeiterfassung::doGetProjekte(int userId, const QDate &date) bool Zeiterfassung::doGetProjects(int userId, const QDate &date)
{ {
if(m_replies.getProjekte) if(m_replies.getProjects)
{ {
qWarning() << "another getProjekte already processing!"; qWarning() << "another getProjects already processing!";
return false; return false;
} }
@@ -344,8 +344,8 @@ bool Zeiterfassung::doGetProjekte(int userId, const QDate &date)
.arg(date.toString(QStringLiteral("yyyyMMdd"))))); .arg(date.toString(QStringLiteral("yyyyMMdd")))));
request.setRawHeader(QByteArrayLiteral("sisAppName"), QByteArrayLiteral("bookingCalendar")); request.setRawHeader(QByteArrayLiteral("sisAppName"), QByteArrayLiteral("bookingCalendar"));
m_replies.getProjekte = m_manager->get(request); m_replies.getProjects = m_manager->get(request);
connect(m_replies.getProjekte, &QNetworkReply::finished, this, &Zeiterfassung::getProjekteRequestFinished); connect(m_replies.getProjects, &QNetworkReply::finished, this, &Zeiterfassung::getProjectsRequestFinished);
return true; return true;
} }
@@ -781,26 +781,26 @@ void Zeiterfassung::deleteTimeAssignmentRequestFinished()
m_replies.deleteTimeAssignment = Q_NULLPTR; m_replies.deleteTimeAssignment = Q_NULLPTR;
} }
void Zeiterfassung::getProjekteRequestFinished() void Zeiterfassung::getProjectsRequestFinished()
{ {
if(m_replies.getProjekte->error() != QNetworkReply::NoError) if(m_replies.getProjects->error() != QNetworkReply::NoError)
{ {
Q_EMIT getProjekteFinished(false, tr("Request error occured: %0").arg(m_replies.getProjekte->error()), {}); Q_EMIT getProjectsFinished(false, tr("Request error occured: %0").arg(m_replies.getProjects->error()), {});
goto end; goto end;
} }
{ {
QJsonParseError error; QJsonParseError error;
QJsonDocument document = QJsonDocument::fromJson(m_replies.getProjekte->readAll(), &error); QJsonDocument document = QJsonDocument::fromJson(m_replies.getProjects->readAll(), &error);
if(error.error != QJsonParseError::NoError) if(error.error != QJsonParseError::NoError)
{ {
Q_EMIT getProjekteFinished(false, tr("Parsing JSON failed: %0").arg(error.errorString()), {}); Q_EMIT getProjectsFinished(false, tr("Parsing JSON failed: %0").arg(error.errorString()), {});
goto end; goto end;
} }
if(!document.isObject()) if(!document.isObject())
{ {
Q_EMIT getProjekteFinished(false, tr("JSON document is not an object!"), {}); Q_EMIT getProjectsFinished(false, tr("JSON document is not an object!"), {});
goto end; goto end;
} }
@@ -808,7 +808,7 @@ void Zeiterfassung::getProjekteRequestFinished()
if(!rootObj.contains(QStringLiteral("elements"))) if(!rootObj.contains(QStringLiteral("elements")))
{ {
Q_EMIT getProjekteFinished(false, tr("JSON does not contain elements!"), {}); Q_EMIT getProjectsFinished(false, tr("JSON does not contain elements!"), {});
goto end; goto end;
} }
@@ -816,29 +816,29 @@ void Zeiterfassung::getProjekteRequestFinished()
if(!elements.isArray()) if(!elements.isArray())
{ {
Q_EMIT getProjekteFinished(false, tr("elements is not an array!"), {}); Q_EMIT getProjectsFinished(false, tr("elements is not an array!"), {});
goto end; goto end;
} }
auto elementsArr = elements.toArray(); auto elementsArr = elements.toArray();
QVector<Projekt> projekte; QVector<Project> projects;
for(const auto &val : elementsArr) for(const auto &val : elementsArr)
{ {
auto obj = val.toObject(); auto obj = val.toObject();
projekte.append({ projects.append({
obj.value(QStringLiteral("label")).toString(), obj.value(QStringLiteral("label")).toString(),
obj.value(QStringLiteral("value")).toString() obj.value(QStringLiteral("value")).toString()
}); });
} }
Q_EMIT getProjekteFinished(true, QString(), projekte); Q_EMIT getProjectsFinished(true, QString(), projects);
} }
end: end:
m_replies.getProjekte->deleteLater(); m_replies.getProjects->deleteLater();
m_replies.getProjekte = Q_NULLPTR; m_replies.getProjects = Q_NULLPTR;
} }
void Zeiterfassung::getAuswertungRequest0Finished() void Zeiterfassung::getAuswertungRequest0Finished()

View File

@@ -47,12 +47,12 @@ public:
QTime time; QTime time;
QTime timespan; QTime timespan;
QString text; QString text;
QString projekt; QString project;
QString subprojekt; QString subproject;
QString workpackage; QString workpackage;
}; };
struct Projekt struct Project
{ {
QString label; QString label;
QString value; QString value;
@@ -72,14 +72,14 @@ public Q_SLOTS:
bool doGetTimeAssignments(int userId, const QDate &start, const QDate &end); bool doGetTimeAssignments(int userId, const QDate &start, const QDate &end);
bool doCreateTimeAssignment(int userId, const QDate &date, const QTime &time, const QTime &timespan, bool doCreateTimeAssignment(int userId, const QDate &date, const QTime &time, const QTime &timespan,
const QString &projekt, const QString &subprojekt, const QString &workpackage, const QString &project, const QString &subproject, const QString &workpackage,
const QString &text); const QString &text);
bool doUpdateTimeAssignment(int timeAssignmentId, int userId, const QDate &date, const QTime &time, bool doUpdateTimeAssignment(int timeAssignmentId, int userId, const QDate &date, const QTime &time,
const QTime &timespan, const QString &projekt, const QString &subprojekt, const QTime &timespan, const QString &project, const QString &subproject,
const QString &workpackage, const QString &text); const QString &workpackage, const QString &text);
bool doDeleteTimeAssignment(int timeAssignmentId); bool doDeleteTimeAssignment(int timeAssignmentId);
bool doGetProjekte(int userId, const QDate &date); bool doGetProjects(int userId, const QDate &date);
bool doGetAuswertung(int userId, const QDate &date); bool doGetAuswertung(int userId, const QDate &date);
Q_SIGNALS: Q_SIGNALS:
@@ -99,7 +99,7 @@ Q_SIGNALS:
void updateTimeAssignmentFinished(bool success, const QString &message, int timeAssignmentId); void updateTimeAssignmentFinished(bool success, const QString &message, int timeAssignmentId);
void deleteTimeAssignmentFinished(bool success, const QString &message); void deleteTimeAssignmentFinished(bool success, const QString &message);
void getProjekteFinished(bool success, const QString &message, const QVector<Projekt> &projekte); void getProjectsFinished(bool success, const QString &message, const QVector<Project> &projects);
void getAuswertungFinished(bool success, const QString &message, const QByteArray &content); void getAuswertungFinished(bool success, const QString &message, const QByteArray &content);
private Q_SLOTS: private Q_SLOTS:
@@ -117,7 +117,7 @@ private Q_SLOTS:
void updateTimeAssignmentRequestFinished(); void updateTimeAssignmentRequestFinished();
void deleteTimeAssignmentRequestFinished(); void deleteTimeAssignmentRequestFinished();
void getProjekteRequestFinished(); void getProjectsRequestFinished();
void getAuswertungRequest0Finished(); void getAuswertungRequest0Finished();
void getAuswertungRequest1Finished(); void getAuswertungRequest1Finished();
@@ -140,7 +140,7 @@ private:
QNetworkReply *updateTimeAssignment; QNetworkReply *updateTimeAssignment;
QNetworkReply *deleteTimeAssignment; QNetworkReply *deleteTimeAssignment;
QNetworkReply *getProjekte; QNetworkReply *getProjects;
QNetworkReply *getAuswertung; QNetworkReply *getAuswertung;
} m_replies; } m_replies;
}; };

View File

@@ -72,34 +72,34 @@ void ZeiterfassungSettings::setPassword(const QString &password)
setValue("password", password); setValue("password", password);
} }
QStringList ZeiterfassungSettings::projekte() const QStringList ZeiterfassungSettings::projects() const
{ {
return value("projekte").toStringList(); return value("projects").toStringList();
} }
void ZeiterfassungSettings::setProjekte(const QStringList &projekte) void ZeiterfassungSettings::setProjects(const QStringList &projects)
{ {
setValue("projekte", projekte); setValue("projects", projects);
} }
void ZeiterfassungSettings::prependProjekt(const QString &projekt) void ZeiterfassungSettings::prependProject(const QString &project)
{ {
prepentItem("projekte", projekt); prepentItem("projects", project);
} }
QStringList ZeiterfassungSettings::subprojekte() const QStringList ZeiterfassungSettings::subprojects() const
{ {
return value("subprojekte").toStringList(); return value("subprojects").toStringList();
} }
void ZeiterfassungSettings::setSubprojekte(const QStringList &subprojekte) void ZeiterfassungSettings::setSubprojects(const QStringList &subprojects)
{ {
setValue("subprojekte", subprojekte); setValue("subprojects", subprojects);
} }
void ZeiterfassungSettings::prependSubprojekt(const QString &subprojekt) void ZeiterfassungSettings::prependSubproject(const QString &subproject)
{ {
prepentItem("subprojekte", subprojekt); prepentItem("subprojects", subproject);
} }
QStringList ZeiterfassungSettings::workpackages() const QStringList ZeiterfassungSettings::workpackages() const

View File

@@ -30,13 +30,13 @@ public:
QString password() const; QString password() const;
void setPassword(const QString &password); void setPassword(const QString &password);
QStringList projekte() const; QStringList projects() const;
void setProjekte(const QStringList &projekte); void setProjects(const QStringList &projects);
void prependProjekt(const QString &projekt); void prependProject(const QString &project);
QStringList subprojekte() const; QStringList subprojects() const;
void setSubprojekte(const QStringList &subprojekte); void setSubprojects(const QStringList &subprojects);
void prependSubprojekt(const QString &subprojekt); void prependSubproject(const QString &subproject);
QStringList workpackages() const; QStringList workpackages() const;
void setWorkpackages(const QStringList &workpackages); void setWorkpackages(const QStringList &workpackages);