[svn-upgrade] Integrating new upstream version, teleschorsch (0.1.0) upstream/0.1.0
authorgregor herrmann <gregoa@debian.org>
Wed, 7 Mar 2007 22:57:02 +0000 (22:57 -0000)
committergregor herrmann <gregoa@debian.org>
Wed, 7 Mar 2007 22:57:02 +0000 (22:57 -0000)
ChangeLog
main.cpp
maindialog.ui
options.cpp
options.ui
qteleschorsch.pro
qteleschorsch.qrc [new file with mode: 0644]
qteleschorsch_de.ts [new file with mode: 0644]
qteleschorsch_fr.ts [new file with mode: 0644]
teleschorsch.png [new file with mode: 0644]

index 657d49d..8bf7cb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,59 @@
+------------------------------------------------------------------------
+r438 | philipp | 2007-03-07 23:52:18 +0100 (Wed, 07 Mar 2007) | 2 lines
+Changed paths:
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+Black magic... Now the automatic creation of the .qm files should work.
+
+------------------------------------------------------------------------
+r437 | philipp | 2007-03-07 22:45:03 +0100 (Wed, 07 Mar 2007) | 2 lines
+Changed paths:
+   M /teleschorsch/trunk/qteleschorsch.pro
+
+The .qm language files are handled by qmake now.
+
+------------------------------------------------------------------------
+r436 | philipp | 2007-03-07 21:14:20 +0100 (Wed, 07 Mar 2007) | 2 lines
+Changed paths:
+   M /teleschorsch/trunk/main.cpp
+
+Now the language files are used in the resource.
+
+------------------------------------------------------------------------
+r435 | gregoa | 2007-03-07 21:05:13 +0100 (Wed, 07 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/maindialog.ui
+   M /teleschorsch/trunk/makedist
+   M /teleschorsch/trunk/options.ui
+
+icon for dialogs
+------------------------------------------------------------------------
+r434 | philipp | 2007-03-07 21:05:03 +0100 (Wed, 07 Mar 2007) | 2 lines
+Changed paths:
+   A /teleschorsch/trunk/teleschorsch.png
+   A /teleschorsch/trunk/teleschorsch.xcf
+
+Created ugly icon.
+
+------------------------------------------------------------------------
+r433 | gregoa | 2007-03-07 20:48:09 +0100 (Wed, 07 Mar 2007) | 1 line
+Changed paths:
+   M /teleschorsch/trunk/qteleschorsch.pro
+   A /teleschorsch/trunk/qteleschorsch.qrc
+
+add resource file
+------------------------------------------------------------------------
+r432 | philipp | 2007-03-07 20:26:59 +0100 (Wed, 07 Mar 2007) | 2 lines
+Changed paths:
+   M /teleschorsch/trunk/main.cpp
+   M /teleschorsch/trunk/options.cpp
+   M /teleschorsch/trunk/options.ui
+   M /teleschorsch/trunk/qteleschorsch.pro
+   A /teleschorsch/trunk/qteleschorsch_de.ts
+   A /teleschorsch/trunk/qteleschorsch_fr.ts
+
+Translation enabled. Translation for German finished, for French started.
+
 ------------------------------------------------------------------------
 r431 | philipp | 2007-03-06 23:09:55 +0100 (Tue, 06 Mar 2007) | 2 lines
 Changed paths:
index b2c807f..d0f6e91 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -26,6 +26,8 @@
 #include <QProcess>
 #include <QMessageBox>
 #include <QDateTime>
+#include <QLocale>
+#include <QTranslator>
 #include "main.h"
 #include "options.h"
 
@@ -300,6 +302,10 @@ bool MainDialog::startAction() {
 
 int main(int argc, char *argv[]) {
        QApplication app(argc, argv);
+       QString locale = QLocale::system().name();
+       QTranslator translator;
+       translator.load(QString(":/qteleschorsch_") + locale);
+       app.installTranslator(&translator);
        MainDialog *mainDialog = new MainDialog();
        mainDialog->show();
        return app.exec();
index 847e519..d4792aa 100644 (file)
@@ -5,13 +5,16 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>672</width>
-    <height>508</height>
+    <width>554</width>
+    <height>732</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <string>TeleSchorsch</string>
   </property>
+  <property name="windowIcon" >
+   <iconset resource="qteleschorsch.qrc" >:/teleschorsch.png</iconset>
+  </property>
   <layout class="QVBoxLayout" >
    <property name="margin" >
     <number>9</number>
   <tabstop>btnQuit</tabstop>
   <tabstop>btnOptions</tabstop>
  </tabstops>
- <resources/>
+ <resources>
+  <include location="qteleschorsch.qrc" />
+ </resources>
  <connections>
   <connection>
    <sender>btnQuit</sender>
index 4606913..eb3f4e6 100644 (file)
@@ -7,13 +7,13 @@ OptionsDialog::OptionsDialog(QWidget *parent): QDialog(parent) {
        setupUi(this);
 
        QString helpText = labHelp->text();
-       helpText.append(tr("<ul>"));
+       helpText.append("<ul>");
        helpText.append(tr("<li>${d}: day of month (01-31)</li>"));
        helpText.append(tr("<li>${m}: month (01-12)</li>"));
        helpText.append(tr("<li>${y}: year (last two digits)</li>"));
        helpText.append(tr("<li>${Y}: year (4 digits)</li>"));
        helpText.append(tr("<li>${dow_DE}: day of week in German (Montag, ...)</li>"));
-       helpText.append(tr("</ul>"));
+       helpText.append("</ul>");
        labHelp->setText(helpText);
 }
 
index 97f19f8..f9b40f3 100644 (file)
@@ -12,6 +12,9 @@
   <property name="windowTitle" >
    <string>TeleSchorsch channel configuration</string>
   </property>
+  <property name="windowIcon" >
+   <iconset resource="qteleschorsch.qrc" >:/teleschorsch.png</iconset>
+  </property>
   <layout class="QVBoxLayout" >
    <property name="margin" >
     <number>9</number>
    <item>
     <widget class="QLabel" name="labHelp" >
      <property name="text" >
-      <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
-p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Bitstream Vera Sans Mono'; font-size:12.4444pt; font-weight:400; font-style:normal; text-decoration:none;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;">You may use the following special characters:&lt;/p>&lt;/body>&lt;/html></string>
+      <string>You may use the following special characters:</string>
      </property>
      <property name="textFormat" >
       <enum>Qt::RichText</enum>
@@ -90,7 +90,9 @@ p, li { white-space: pre-wrap; }
    </item>
   </layout>
  </widget>
- <resources/>
+ <resources>
+  <include location="qteleschorsch.qrc" />
+ </resources>
  <connections>
   <connection>
    <sender>btnCancel</sender>
index 6d9c0ec..068f05e 100644 (file)
@@ -7,4 +7,12 @@ TEMPLATE = app
 FORMS += maindialog.ui options.ui
 HEADERS += main.h options.h
 SOURCES += main.cpp options.cpp
+TRANSLATIONS = qteleschorsch_de.ts qteleschorsch_fr.ts
+RESOURCES = qteleschorsch.qrc
+PRE_TARGETDEPS = compiler_translation_make_all
 
+translation.output  = ${QMAKE_FILE_BASE}.qm
+translation.commands = lrelease ${QMAKE_FILE_NAME}
+translation.input = TRANSLATIONS
+translation.CONFIG += no_link
+QMAKE_EXTRA_COMPILERS += translation
diff --git a/qteleschorsch.qrc b/qteleschorsch.qrc
new file mode 100644 (file)
index 0000000..d9c1271
--- /dev/null
@@ -0,0 +1,12 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+       <file>teleschorsch.png</file>
+</qresource>
+<qresource lang="fr">
+       <file>qteleschorsch_fr.qm</file>
+</qresource>
+<qresource lang="de">
+       <file>qteleschorsch_de.qm</file>
+</qresource>
+</RCC>
+                                  
diff --git a/qteleschorsch_de.ts b/qteleschorsch_de.ts
new file mode 100644 (file)
index 0000000..7d84170
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="de">
+<context>
+    <name>MainDialog</name>
+    <message>
+        <location filename="main.cpp" line="262"/>
+        <source>Problem when reading the configuration file</source>
+        <translation>Die Konfigurationsdatei konnte nicht gelesen werden</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="283"/>
+        <source>Problem when substituting URL</source>
+        <translation>Problem beim Ersetzen der Parameter in der URL</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="13"/>
+        <source>TeleSchorsch</source>
+        <translation>TeleSchorsch</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="41"/>
+        <source>Channel</source>
+        <translation>Programm/Kanal</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="74"/>
+        <source>Date</source>
+        <translation>Datum</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="96"/>
+        <source>Offset</source>
+        <translation>Offset</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="135"/>
+        <source>Options</source>
+        <translation>Optionen</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="155"/>
+        <source>Start</source>
+        <translation>Start</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="165"/>
+        <source>Quit</source>
+        <translation>Beenden</translation>
+    </message>
+</context>
+<context>
+    <name>OptionsDialog</name>
+    <message>
+        <location filename="options.cpp" line="11"/>
+        <source>&lt;li&gt;${d}: day of month (01-31)&lt;/li&gt;</source>
+        <translation>&lt;li&gt;${d}: Tag (01-31)&lt;/li&gt;</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="12"/>
+        <source>&lt;li&gt;${m}: month (01-12)&lt;/li&gt;</source>
+        <translation>&lt;li&gt;${m}: Monat (01-12)&lt;/li&gt;</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="13"/>
+        <source>&lt;li&gt;${y}: year (last two digits)&lt;/li&gt;</source>
+        <translation>&lt;li&gt;${y}: Jahr (die letzten 2 Stellen)&lt;/li&gt;</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="14"/>
+        <source>&lt;li&gt;${Y}: year (4 digits)&lt;/li&gt;</source>
+        <translation>&lt;li&gt;${Y}: Jahr (vierstellig)&lt;/li&gt;</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="15"/>
+        <source>&lt;li&gt;${dow_DE}: day of week in German (Montag, ...)&lt;/li&gt;</source>
+        <translation>&lt;li&gt;${dow_DE}: Wochentag deutsch (Montag, ...)&lt;/li&gt;</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="23"/>
+        <source>No user config file location</source>
+        <translation>Kein Pfad für die Benutzer-Konfigurationsdatei</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="23"/>
+        <source>The location of the user config file could not be determined.</source>
+        <translation>Der Pfad der Benutzer-Konfigurationsdatei konnte nicht bestimmt werden.</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="28"/>
+        <source>Create user config file?</source>
+        <translation>Soll eine Benutzer-Konfigurationsdatei erstellt werden?</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="28"/>
+        <source>The user config file %1 does not exist. Do you want to create it?</source>
+        <translation>Die benutzerdefinierte Konfigurationsdatei %1 existiert nicht. Soll sie erstellt werden?</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="33"/>
+        <source>File not readable</source>
+        <translation>Die Datei ist nicht lesbar</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="33"/>
+        <source>The user config file %1 is not readable.</source>
+        <translation>Die benutzerdefinierte Konfigurationdatei %1 ist nicht lesbar.</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="45"/>
+        <source>File not writeable</source>
+        <translation>Die Datei ist nicht schreibbar</translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="45"/>
+        <source>The config file %1 is not writeable.</source>
+        <translation>Die Konfigurationsdatei %1 ist nicht schreibbar.</translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="13"/>
+        <source>TeleSchorsch channel configuration</source>
+        <translation>TeleSchorsch Programm/Kanal-Konfiguration</translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="72"/>
+        <source>Save</source>
+        <translation>Speichern</translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="82"/>
+        <source>Cancel</source>
+        <translation>Abbrechen</translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="41"/>
+        <source>You may use the following special characters:</source>
+        <translation>Folgende Variablen sind erlaubt:</translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="main.cpp" line="62"/>
+        <source>Could not open file %1</source>
+        <translation>Konnte Datei %1 nicht öffnen</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="84"/>
+        <source>Property %1 is only allowed in a [section].</source>
+        <translation>Bezeichner %1 darf nur in einer [sektion] verwendet werden.</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="89"/>
+        <source>Unknown key in ini file: %1</source>
+        <translation>Unbekannter Bezeichner in ini-Datei: %1</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="92"/>
+        <source>Line %1 is not valid.</source>
+        <translation>Zeile %1 hat eine ungültige Syntax.</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="100"/>
+        <source>Neither %1 nor %2 found.</source>
+        <translation>Weder %1 noch %2 gefunden.</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="129"/>
+        <source>No match for variable %1</source>
+        <translation>Die Variable %1 existiert nicht</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="160"/>
+        <source>${ not closed with }.</source>
+        <translation>${ wurde nicht mit } abgeschlossen.</translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="187"/>
+        <source>Shell command executed when substituting URL (%1) timed out.</source>
+        <translation>Der Befehl zur Ersetzung der URL (%1) hat zu lange gebraucht (time out).</translation>
+    </message>
+</context>
+</TS>
diff --git a/qteleschorsch_fr.ts b/qteleschorsch_fr.ts
new file mode 100644 (file)
index 0000000..5a8440c
--- /dev/null
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS><TS version="1.1" language="fr">
+<context>
+    <name>MainDialog</name>
+    <message>
+        <location filename="main.cpp" line="262"/>
+        <source>Problem when reading the configuration file</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="283"/>
+        <source>Problem when substituting URL</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="13"/>
+        <source>TeleSchorsch</source>
+        <translation>TeleSchorsch</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="41"/>
+        <source>Channel</source>
+        <translation>Chaine</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="74"/>
+        <source>Date</source>
+        <translation>Date</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="96"/>
+        <source>Offset</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="135"/>
+        <source>Options</source>
+        <translation>Options</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="155"/>
+        <source>Start</source>
+        <translation>Démarrer</translation>
+    </message>
+    <message>
+        <location filename="maindialog.ui" line="165"/>
+        <source>Quit</source>
+        <translation>Terminer</translation>
+    </message>
+</context>
+<context>
+    <name>OptionsDialog</name>
+    <message>
+        <location filename="options.cpp" line="11"/>
+        <source>&lt;li&gt;${d}: day of month (01-31)&lt;/li&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="12"/>
+        <source>&lt;li&gt;${m}: month (01-12)&lt;/li&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="13"/>
+        <source>&lt;li&gt;${y}: year (last two digits)&lt;/li&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="14"/>
+        <source>&lt;li&gt;${Y}: year (4 digits)&lt;/li&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="15"/>
+        <source>&lt;li&gt;${dow_DE}: day of week in German (Montag, ...)&lt;/li&gt;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="23"/>
+        <source>No user config file location</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="23"/>
+        <source>The location of the user config file could not be determined.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="28"/>
+        <source>Create user config file?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="28"/>
+        <source>The user config file %1 does not exist. Do you want to create it?</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="33"/>
+        <source>File not readable</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="33"/>
+        <source>The user config file %1 is not readable.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="45"/>
+        <source>File not writeable</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.cpp" line="45"/>
+        <source>The config file %1 is not writeable.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="13"/>
+        <source>TeleSchorsch channel configuration</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="72"/>
+        <source>Save</source>
+        <translation>Sauvegarder</translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="82"/>
+        <source>Cancel</source>
+        <translation>Annuler</translation>
+    </message>
+    <message>
+        <location filename="options.ui" line="41"/>
+        <source>You may use the following special characters:</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <location filename="main.cpp" line="62"/>
+        <source>Could not open file %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="84"/>
+        <source>Property %1 is only allowed in a [section].</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="89"/>
+        <source>Unknown key in ini file: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="92"/>
+        <source>Line %1 is not valid.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="100"/>
+        <source>Neither %1 nor %2 found.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="129"/>
+        <source>No match for variable %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="160"/>
+        <source>${ not closed with }.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="main.cpp" line="187"/>
+        <source>Shell command executed when substituting URL (%1) timed out.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
+</TS>
diff --git a/teleschorsch.png b/teleschorsch.png
new file mode 100644 (file)
index 0000000..b47a974
Binary files /dev/null and b/teleschorsch.png differ