diff --git a/cmainwindow.cpp b/cmainwindow.cpp index e3bb65d..4f49ce4 100644 --- a/cmainwindow.cpp +++ b/cmainwindow.cpp @@ -445,17 +445,17 @@ void cMainWindow::createWindowActions() void cMainWindow::createHelpActions() { - QAction* lpAction; + QAction* lpAction; - m_lpHelpMenu = menuBar()->addMenu(tr("&Help")); + m_lpHelpMenu = menuBar()->addMenu(tr("&Help")); - lpAction = m_lpHelpMenu->addAction(tr("&Contents"), this, &cMainWindow::onHelpContents); + lpAction = m_lpHelpMenu->addAction(tr("&Contents"), this, &cMainWindow::onHelpContents); lpAction->setPriority(QAction::LowPriority); lpAction->setShortcut(QKeySequence::HelpContents); - lpAction = m_lpHelpMenu->addAction(tr("&Index"), this, &cMainWindow::onHelpIndex); + lpAction = m_lpHelpMenu->addAction(tr("&Index"), this, &cMainWindow::onHelpIndex); - lpAction = m_lpHelpMenu->addAction(tr("&About"), this, &cMainWindow::onHelpAbout); + lpAction = m_lpHelpMenu->addAction(tr("&About"), this, &cMainWindow::onHelpAbout); lpAction->setPriority(QAction::LowPriority); lpAction->setShortcut(QKeySequence::HelpContents); } diff --git a/cmainwindow.h b/cmainwindow.h index 9fa9b67..7a24303 100644 --- a/cmainwindow.h +++ b/cmainwindow.h @@ -234,7 +234,6 @@ public slots: \param lpComboBox */ void onComboBoxLostFocus(cComboBox* lpComboBox); - private slots: /*! \brief @@ -812,6 +811,7 @@ private: \brief \fn getProjectSaveName + \param szFileName \return QString */ QString getProjectSaveName(const QString& szFileName = QString()); @@ -820,6 +820,7 @@ private: \brief \fn setCurrentFile + \param szFileName */ void setCurrentFile(const QString& szFileName); @@ -842,7 +843,7 @@ protected: \fn closeEvent \param event */ - void closeEvent(QCloseEvent *event); + void closeEvent(QCloseEvent* event); }; #endif // CMAINWINDOW_H diff --git a/main.cpp b/main.cpp index a2b2f72..d2b72cc 100644 --- a/main.cpp +++ b/main.cpp @@ -10,10 +10,18 @@ #include #include +#include +#include +#include + +#include + #include "csplashscreen.h" + #define SHOW_SPLASH + int main(int argc, char *argv[]) { QApplication a(argc, argv); @@ -24,6 +32,23 @@ int main(int argc, char *argv[]) a.setOrganizationDomain("windesign.at"); a.setApplicationName("storyWriter"); + QSettings settings; + QTranslator translator; + QString szLanguage = settings.value("main/language").toString(); + + if(!szLanguage.compare("%SYSTEM%")) + { + QStringList languageList = QLocale::system().uiLanguages(); + if(languageList.count()) + szLanguage = languageList[0]; + } + + if(!szLanguage.isEmpty()) + { + if(translator.load(QString("storyWriter_%1").arg(szLanguage), ":/locale")) + a.installTranslator(&translator); + } + #ifdef SHOW_SPLASH QPixmap pixmap(":/images/splash.png"); #else @@ -51,8 +76,6 @@ int main(int argc, char *argv[]) lpSplash->showStatusMessage(QObject::tr("
initializing...")); - QSettings settings; - cMainWindow w(lpSplash); if(settings.value("main/maximized").toBool()) diff --git a/storyWriter.pro b/storyWriter.pro index 0d98692..d608477 100644 --- a/storyWriter.pro +++ b/storyWriter.pro @@ -12,6 +12,8 @@ QMAKE_TARGET_COPYRIGHT = (c) 2018 WIN-DESIGN QT += core gui xml sql +TRANSLATIONS = storyWriter_de.ts + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = storyWriter @@ -149,7 +151,8 @@ DISTFILES += \ resources/splash.psd \ images/icon.ico \ resources/icon.png \ - images/tango/32x32/actions/document-pdf.png + images/tango/32x32/actions/document-pdf.png \ + storyWriter_de.ts RESOURCES += \ storywriter.qrc diff --git a/storyWriter_de.qm b/storyWriter_de.qm new file mode 100644 index 0000000..62cd11d Binary files /dev/null and b/storyWriter_de.qm differ diff --git a/storyWriter_de.ts b/storyWriter_de.ts new file mode 100644 index 0000000..109370b --- /dev/null +++ b/storyWriter_de.ts @@ -0,0 +1,1399 @@ + + + + + QObject + + + <center>initializing...</denter> + <center>initialisieren...</denter> + + + + cChapterWindow + + + Form + Form + + + + Description: + Beschreibung: + + + + Scenes: + Szenen: + + + + Name: + Name: + + + + Part: + Teil: + + + + name + name + + + + [chapter] - + [kapitel] - + + + + cCharacter + + + female + weiblich + + + + male + männlich + + + + + undefined + undefiniert + + + + cCharacterSelectDialog + + + Select Character + Wähle Figur + + + + name + Name + + + + creature + Kreatur + + + + gender + Geschlecht + + + + cCharacterWindow + + + Form + Form + + + + Basic + Basis + + + + Date of Death: + Sterbedatum: + + + + Place of Death: + Sterbeort: + + + + Height: + Größe: + + + + Creature: + Kreatur: + + + + Place of Birth: + Geburtsort: + + + + Date of Birth: + Geburtsdatum: + + + + Main Character + Hauptfigur + + + + Weight: + Gewicht: + + + + Middle Name: + Mittlerer Name: + + + + First Name: + Vorname: + + + + Description: + Beschreibung: + + + + Last Name: + Nachname: + + + + Hair Color: + Haarfarbe: + + + + Hair Cut: + Haarschnitt: + + + + Hair Length: + Haarlänge: + + + + Figure: + Figur: + + + + Job: + Job: + + + + Skin: + Haut: + + + + School: + Schule: + + + + Spoken Languages: + gesprochene Sprachen: + + + + Nature: + Natur: + + + + Gender + Geschlecht + + + + Male + männlich + + + + Female + weiblich + + + + Other + andere + + + + Title: + Titel: + + + + Nick Name: + Spitzname: + + + + Images + Bilder + + + + [character] - + [figur] - + + + + cImageWidget + + + Form + + + + + GroupBox + + + + + TextLabel + + + + + cMainWindow + + + qtStoryBook + storyBook + + + + Outline + Überblick + + + + Character + Figur + + + + Place + Ort + + + + Object + Objekt + + + + Recherche + Recherche + + + + Test1 + + + + + + + + + Save + Speichern + + + + &Close + &Beenden + + + + + + + has been changed. +Do you want to save? + wurde geändert.\nMöchtest du speichern? + + + + &File + &Datei + + + + File Actions + Datei + + + + &New + &Neu + + + + &Open... + &Öffnen... + + + + &Save + &Speichern + + + + Save &As... + Speichern &als... + + + + &Print... + &Drucken... + + + + Print Preview... + Druckvorschau... + + + + &Export PDF... + &Export PDF... + + + + P&roperties... + &Einstellungen... + + + + &Quit + &Beenden + + + + &Edit + &Bearbeiten + + + + Edit Actions + Bearbeiten + + + + &Undo + &Rückgängig + + + + &Redo + &Wiederholen + + + + Cu&t + &Ausschneiden + + + + &Copy + &Kopieren + + + + &Paste + &Einfügen + + + + F&ormat + F&ormat + + + + + Format Actions + Format + + + + &Bold + &Fett + + + + &Italic + &Kursiv + + + + &Underline + &Unterstrichen + + + + &Left + &Links + + + + C&enter + &Zentriert + + + + &Right + &Links + + + + &Justify + &Blocksatz + + + + &Color... + &Farbe... + + + + &Help + &Hilfe + + + + &Contents + &Inhalt + + + + &Index + &Index + + + + &About + &Über + + + + add part + Teil hinzufügen + + + + add a new part + neuen Teil hinzufügen + + + + edit part + Teil bearbeiten + + + + edit the part + Teil bearbeiten + + + + delete part + Teil löschen + + + + delete the part + Teil löschen + + + + add chapter + Kapitel hinzufügen + + + + add a new chapter + neues Kapitel hinzufügen + + + + edit chapter + Kapitel bearbeiten + + + + edit the chapter + Kapitel bearbeiten + + + + delete chapter + Kapitel löschen + + + + delete the chapter + Kapitel löschen + + + + add scene + Szene hinzufügen + + + + add a new scene + neue Szene hinzufügen + + + + edit scene + Szene bearbeiten + + + + edit the scene + Szene bearbeiten + + + + delete scene + Szene löschen + + + + delete the scene + Szene löschen + + + + add character + Figur hinzufügen + + + + add a new character + neue Figur hinzufügen + + + + edit character + Figur bearbeiten + + + + edit the character + Figur bearbeiten + + + + delete character + Figur löschen + + + + delete the character + Figur löschen + + + + add place + Ort hinzufügen + + + + add a new place + neuen Ort hinzufügen + + + + edit place + Ort bearbeiten + + + + edit the place + Ort bearbeiten + + + + delete place + Ort löschen + + + + delete the place + Ort löschen + + + + add object + Objekt hinzufügen + + + + add a new object + neues Objekt hinzufügen + + + + edit object + Objekt bearbeiten + + + + edit the object + Objekt bearbeiten + + + + delete object + Objekt löschen + + + + delete the object + Objekt löschen + + + + add recherche + Recherche hinzufügen + + + + add a new recherche + neue Recherche hinzufügen + + + + edit recherche + Recherche bearbeiten + + + + edit the recherche + Recherche bearbeiten + + + + delete recherche + Recherche löschen + + + + delete the recherche + Recherche löschen + + + + open link + Link öffnen + + + + open the link + Link öffnen + + + + + + New Part + Neuer Teil + + + + + + + + + + Name: + Name: + + + + Part Name is empty. + Name des Teils ist leer. + + + + Part could not be created. + Teil konnte nicht erzeugt werden. + + + + There are still some chapter in this part. +Please delete them before deleting the part. + Es befinden sich noch Kapitel in diesem Teil.\nBitte lösche diese zuerst und dann den Teil. + + + + Are you sure you want to delete this part:<br> + Bist du sicher, dass du den Teil löschen möchtest:<br> + + + + + + New Chapter + Neues Kapitel + + + + Chapter Name is empty. + Name des Kapitel ist leer. + + + + Chapter could not be created. + Kapitel konnte nicht erstellt werden. + + + + There are still some scenes in this chapter. +Please delete them before deleting the chapter. + Es befinden sich noch Scenen in diesem Kapitel.\nBitte lösche diese zuerst und dann das Kapitel. + + + + Are you sure you want to delete this chapter:<br> + Bist du sicher, dass du das Kapitel löschen möchtest:<br> + + + + <br>from part <br> + <br>von Teil<br> + + + + + + New Scene + Neue Szene + + + + Scene Name is empty. + Der Name der Szene ist leer. + + + + Scene could not be created. + Die Szene konnte nicht erstellt werden. + + + + Are you sure you want to delete this scene:<br> + Bist du sicher, dass du die Szene löschen möchtest:<br> + + + + <br>from chapter <br> + <br>von Kapitel<br> + + + + + + New Character + Neue Figur + + + + Character Name is empty. + Name der Figur ist leer. + + + + Character could not be created. + Figur konnte nicht erstellt werden. + + + + This character is still in use. +Please delete the usage before deleting the character. + Diese Figur ist in Verwendung.\nBitte lösche zuerst die Verwendung und danach die Figur. + + + + Are you sure you want to delete this character:<br> + Bist du sicher, dass du die Figur löschen möchtest:<br> + + + + + + New Place + Neuer Ort + + + + Place Name is empty. + Name des Ortes ist leer. + + + + Place could not be created. + Ort konnte nicht erzeugt werden. + + + + This place is still in use. +Please delete the usage before deleting the place. + Dieser Ort ist in Verwendung.\nBitte lösche zuerst die Verwendung und danach den Ort. + + + + Are you sure you want to delete this place:<br> + Bist du sicher, dass du den Ort löschen möchtest:<br> + + + + + + New Object + Neues Objekt + + + + Object Name is empty. + Name des Objekts ist leer. + + + + Object could not be created. + Objekt konnte nicht erzeugt werden. + + + + This object is still in use. +Please delete the usage before deleting the object. + Dieses Objekt ist in Verwendung.\nBitte lösche zuerst die Verwendung und danach das Objekt. + + + + Are you sure you want to delete this object:<br> + Bist du sicher, dass du das Objekt löschen möchtest:<br> + + + + + + New Recherche + Neue Recherche + + + + Recherche Name is empty. + Name der Recherche ist leer. + + + + Recherche could not be created. + Recherche konnte nicht angelegt werden. + + + + This recherche is still in use. +Please delete the usage before deleting the recherche. + Diese Recherche ist in Verwendung.\nBitte lösche zuerst die Verwendung und danach die Recherche. + + + + Are you sure you want to delete this recherche:<br> + Bist du sicher, dass du die Recherche löschen möchtest:<br> + + + + + Save Project + Sichere Projekt + + + + + StoryWriter Files (*.storyWriter) + storyWriter Dateien (*.storyWriter) + + + + &%1 %2 + &%1 %2 + + + + cObjectSelectDialog + + + Dialog + Dialog + + + + name + Name + + + + type + Type + + + + cObjectWindow + + + Form + Form + + + + Basic + Basis + + + + Description: + Beschreibung: + + + + Type: + Type: + + + + Name: + Name: + + + + Images + Bilder + + + + [object] - + [objekt] - + + + + cPartWindow + + + Form + Form + + + + Description: + Beschreibung: + + + + Name: + Name: + + + + Chapters: + Kapitel: + + + + name + name + + + + [part] - + [teil] - + + + + cPlaceSelectDialog + + + Dialog + Dialog + + + + name + Name + + + + location + Ort + + + + type + Type + + + + cPlaceWindow + + + Form + Form + + + + Basic + Basis + + + + Location: + Ort: + + + + Type: + Type: + + + + Description: + Beschreibung: + + + + Name: + Name: + + + + Images + Bilder + + + + [place] - + [ort] - + + + + cPropertiesWindow + + + Form + Form + + + + Started at: + Begonnen am: + + + + Short Description: + Kurzbeschreibung: + + + + Finished at: + Fertiggestellt am: + + + + Author: + Autor: + + + + Description: + Beschreibung: + + + + Title: + Titel: + + + + Subtitle: + Untertitel: + + + + Target Date: + Zieldatum: + + + + [book] - properties + [buch] - eigenschaften + + + + cRechercheWindow + + + Form + Form + + + + Basic + Basis + + + + Name: + Name: + + + + Link: + Link: + + + + Description: + Beschreibung: + + + + Images + Bilder + + + + Character + Figur + + + + + + details... + Details... + + + + + + add... + hinzufügen... + + + + + + remove + löschen + + + + Place + Ort + + + + Object + Objekt + + + + [recherche] - + [recherche] - + + + + + + Do you want to delete "%1" from list? + Möchtest du "%1" von der Liste löschen? + + + + cScene + + + unknown + unbekannt + + + + initialized + initialisiert + + + + progress + in Bearbeitung + + + + delayed + verzögert + + + + finished + fertig + + + + cSceneWindow + + + Form + Form + + + + Basic + Basis + + + + Chapter: + Kapitel: + + + + Name: + Name: + + + + Finished: + Fertiggestellt am: + + + + Started: + Begonnen am: + + + + State: + Status: + + + + Part: + Teil: + + + + Target Date: + Zieldatum: + + + + Description: + Beschreibung: + + + + Character + Figur + + + + + + details... + Details... + + + + + + add... + hinzufügen... + + + + + + remove + entfernen + + + + Place + Ort + + + + Object + Objekt + + + + [scene] - + [szene] - + + + + + + Do you want to delete "%1" from list? + Möchtest du "%1" von der Liste entfernen? + + + + cStoryBook + + + + + + + name + Name + + + + state + Status + + + + creature + Kreatur + + + + gender + Geschlecht + + + + location + Ort + + + + + type + Type + + + + link + Link + + + diff --git a/storywriter.qrc b/storywriter.qrc index 9531cb4..44031c6 100644 --- a/storywriter.qrc +++ b/storywriter.qrc @@ -662,4 +662,7 @@ images/tango/32x32/status/weather-storm.png images/tango/index.theme + + storyWriter_de.qm +