diff --git a/i18n/de_DE.qm b/i18n/de_DE.qm
new file mode 100644
index 0000000..1776c64
Binary files /dev/null and b/i18n/de_DE.qm differ
diff --git a/i18n/de_DE.ts b/i18n/de_DE.ts
new file mode 100644
index 0000000..7a29c35
--- /dev/null
+++ b/i18n/de_DE.ts
@@ -0,0 +1,245 @@
+
+
+
+
+ CustomNavigationToolbar
+
+
+ Save
+ Speichern
+
+
+
+ Save the figure
+ Abbildung speichern
+
+
+
+ Subplots
+ Untergrafiken
+
+
+
+ Configure subplots
+ Untergrafiken formatieren
+
+
+
+ MainWindow
+
+
+ &Start Processing
+ &Prozessierung starten
+
+
+
+ Open data file
+ Datensatz öffnen
+
+
+
+ Text files (*.txt *.csv)
+ Textdateien (*.txt *.csv)
+
+
+
+ Error
+ Fehler
+
+
+
+ No data file loaded!
+ Kein Datensatz geladen!
+
+
+
+ Warning
+ Warnung
+
+
+
+ Signal threshold is currently set to zero.
+ Signalschwellwert ist aktuell auf Null gesetzt.
+
+
+
+ Processing...
+ Prozessierung...
+
+
+
+ Save data
+ Daten speichern
+
+
+
+ Calculations are finished. Save results?
+ Berechnungen abgeschlossen. Ergebnisse speichern?
+
+
+
+ Choose path for results
+ Pfad zum Speichern der Ergebnisse wählen
+
+
+
+ Finished!
+ Fertig!
+
+
+
+ PyDSF
+ PyDSF
+
+
+
+ Experimental Setup
+ Experiment
+
+
+
+ Instrument
+ Instrument
+
+
+
+ Analytik Jena qTOWER 2.0/2.2
+ Analytik Jena qTOWER 2.0/2.2
+
+
+
+ <html><head/><body><p>Add data files to the experiment. If multiple files are loaded, they are treated as replicates.</p></body></html>
+ <html><head/><body><p>Daten zum Experiment hinzufügen. Werden mehrere Datensätze geladen, werden diese als Replikate behandelt.</p></body></html>
+
+
+
+ Data File
+ Datensatz
+
+
+
+ Replicates
+ Replikate
+
+
+
+ Files
+ Dateien
+
+
+
+ Processing Options
+ Prozessierungsoptionen
+
+
+
+ <html><head/><body><p>Temperature range of the data points. Only applies, if the data file does not contain any temperature information.</p></body></html>
+ <html><head/><body><p>Temperaturbereich des Datensatzes. Trifft nur zu, falls der Datensatz selbst keine Informationen zum Temperaturbereich bereitstellt.</p></body></html>
+
+
+
+ Temperature settings
+ Temperatureinstellungen
+
+
+
+ <html><head/><body><p>T<span style=" vertical-align:sub;">min</span></p></body></html>
+ <html><head/><body><p>T<span style=" vertical-align:sub;">min</span></p></body></html>
+
+
+
+ °C
+ °C
+
+
+
+ <html><head/><body><p>T<span style=" vertical-align:sub;">max</span></p></body></html>
+ <html><head/><body><p>T<span style=" vertical-align:sub;">max</span></p></body></html>
+
+
+
+ <html><head/><body><p>ΔT</p></body></html>
+ <html><head/><body><p>ΔT</p></body></html>
+
+
+
+ <html><head/><body><p>Only T<span style=" vertical-align:sub;">m</span> values within this limit are considered valid.</p></body></html>
+ <html><head/><body><p>Nur T<span style=" vertical-align:sub;">m</span>-Werte innerhalb dieser Grenzen werden als gültig betrachtet.</p></body></html>
+
+
+
+ &Cutoff
+ &Schwellwert
+
+
+
+ &Upper
+ &Oberer
+
+
+
+ Lower
+ Unterer
+
+
+
+ <html><head/><body><p>If the signal exceeds this threshold, the coresponding well is assumed to be denatured.</p></body></html>
+ <html><head/><body><p>Überschreitet das Signal diesen Schwellwert, wird die zugehörige Probe als denaturiert betrachtet.</p></body></html>
+
+
+
+ Signal &Threshold
+ Signal&schwellwert
+
+
+
+ <html><head/><body><p>Defines the range of the colorbar used for the T<span style=" vertical-align:sub;">m</span> heatmap.</p></body></html>
+ <html><head/><body><p>Definiert den Bereich des Farbverlaufs, welcher für die T<span style=" vertical-align:sub;">m</span> Heatmap verwendet wird.</p></body></html>
+
+
+
+ &Colorbar
+ &Farbverlauf
+
+
+
+ S&tart
+ &Start
+
+
+
+ En&d
+ &Ende
+
+
+
+ Fi&le
+ &Datei
+
+
+
+ Hel&p
+ &Hilfe
+
+
+
+ &Quit
+ &Beenden
+
+
+
+ &About
+ &Über
+
+
+
+ About &Qt
+ Über &Qt
+
+
+
+ Welcome to PyDSF
+ Willkommen zu PyDSF
+
+
+
diff --git a/i18n/template.ts b/i18n/template.ts
index d06549c..eeb8c88 100644
--- a/i18n/template.ts
+++ b/i18n/template.ts
@@ -26,27 +26,27 @@
MainWindow
-
+
&Start Processing
-
+
Open data file
-
+
Text files (*.txt *.csv)
-
+
Error
-
+
No data file loaded!
@@ -66,22 +66,22 @@
-
+
Save data
-
+
Calculations are finished. Save results?
-
+
Choose path for results
-
+
Finished!
@@ -235,5 +235,10 @@
About &Qt
+
+
+ Welcome to PyDSF
+
+
diff --git a/main.py b/main.py
index e30c52c..0ea71c9 100644
--- a/main.py
+++ b/main.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
-from PyQt5 import QtWidgets
+import glob
+from PyQt5 import QtWidgets, QtCore
from ui.mainwindow import MainWindow
@@ -10,6 +11,11 @@ if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
+ translationFiles = glob.glob("i18n/*.qm")
+ translator = QtCore.QTranslator()
+ for translationFile in translationFiles:
+ translator.load(translationFile)
+ app.installTranslator(translator)
ui = MainWindow()
ui.show()
sys.exit(app.exec_())
diff --git a/pydsf.pro b/pydsf.pro
new file mode 100644
index 0000000..9128f57
--- /dev/null
+++ b/pydsf.pro
@@ -0,0 +1,5 @@
+SOURCES += ui/mainwindow.py
+SOURCES += ui/Ui_mainwindow.py
+SOURCES += ui/mplwidget.py
+SOURCES += pydsf.py
+TRANSLATIONS += i18n/de_DE.ts
diff --git a/ui/mainwindow.py b/ui/mainwindow.py
index 668d7a1..9596b38 100644
--- a/ui/mainwindow.py
+++ b/ui/mainwindow.py
@@ -12,6 +12,7 @@ from .mplwidget import MplWidget
from pydsf import Experiment, PlotResults
VERSION = "1.0"
+_translate = QCoreApplication.translate
class WorkerSignals(QObject):
@@ -114,10 +115,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.progressBar.setMaximum(0)
self.progressBar.setEnabled(False)
self.statusBar.addPermanentWidget(self.progressBar)
- self.statusBar.showMessage("Welcome to PyDSF")
+ self.statusBar.showMessage(_translate("MainWindow",
+ "Welcome to PyDSF"))
self.buttonBox_process.addButton(
- QCoreApplication.translate("MainWindow", "&Start Processing"),
+ _translate("MainWindow", "&Start Processing"),
QDialogButtonBox.AcceptRole)
self.tasks = Tasks()
@@ -131,9 +133,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if button == self.buttonBox_open_reset.button(QDialogButtonBox.Open):
filenames = QFileDialog.getOpenFileNames(
self,
- QCoreApplication.translate("MainWindow", "Open data file"), '',
- QCoreApplication.translate("MainWindow",
- "Text files (*.txt *.csv)"))
+ _translate("MainWindow", "Open data file"), '',
+ _translate("MainWindow", "Text files (*.txt *.csv)"))
self.listWidget_data.addItems(filenames[0])
if self.listWidget_data.count() > 1:
self.groupBox_replicates.setChecked(True)
@@ -162,22 +163,22 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if id != 'average':
tab = self.generate_plot_tab("tab_heatmap_{}".format(id))
- self.tabWidget.addTab(tab, QCoreApplication.translate(
+ self.tabWidget.addTab(tab, _translate(
"MainWindow", "Heatmap #{}".format(plate.id)))
plotter.plot_tm_heatmap_single(plate, tab)
tab = self.generate_plot_tab("tab_raw_{}".format(id))
- self.tabWidget.addTab(tab, QCoreApplication.translate(
+ self.tabWidget.addTab(tab, _translate(
"MainWindow", "Raw Data #{}".format(plate.id)))
plotter.plot_raw(plate, tab)
tab = self.generate_plot_tab("tab_derivative_{}".format(id))
- self.tabWidget.addTab(tab, QCoreApplication.translate(
+ self.tabWidget.addTab(tab, _translate(
"MainWindow", "Derivatives #{}".format(plate.id)))
plotter.plot_derivative(plate, tab)
else:
tab = self.generate_plot_tab("tab_heatmap_{}".format(id))
- self.tabWidget.addTab(tab, QCoreApplication.translate(
+ self.tabWidget.addTab(tab, _translate(
"MainWindow", "Heatmap ({})".format(plate.id)))
plotter.plot_tm_heatmap_single(plate, tab)
@@ -189,23 +190,21 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if self.listWidget_data.count() < 1:
QMessageBox.critical(
- self, QCoreApplication.translate("MainWindow", "Error"),
- QCoreApplication.translate("MainWindow",
- "No data file loaded!"),
+ self, _translate("MainWindow", "Error"),
+ _translate("MainWindow", "No data file loaded!"),
QMessageBox.Close, QMessageBox.Close)
return
if self.spinBox_signal_threshold.value(
) == 0 and self.groupBox_signal_threshold.isChecked():
QMessageBox.warning(
- self, QCoreApplication.translate("MainWindow", "Warning"),
- QCoreApplication.translate(
+ self, _translate("MainWindow", "Warning"),
+ _translate(
"MainWindow",
"Signal threshold is currently set to zero."),
QMessageBox.Ok, QMessageBox.Ok)
self.progressBar.setEnabled(True)
- self.statusBar.showMessage(QCoreApplication.translate("MainWindow",
- "Processing..."))
+ self.statusBar.showMessage(_translate("MainWindow", "Processing..."))
self.tasks.signals.finished.connect(self.on_processing_finished)
self.tasks.add_task(self.worker)
@@ -217,16 +216,15 @@ class MainWindow(QMainWindow, Ui_MainWindow):
exp = self.tasks.data[0]
save_data = QMessageBox.question(
- self, QCoreApplication.translate("MainWindow", "Save data"),
- QCoreApplication.translate(
+ self, _translate("MainWindow", "Save data"),
+ _translate(
"MainWindow", "Calculations are finished. Save results?"),
QMessageBox.Yes | QMessageBox.No, QMessageBox.Yes)
if save_data == QMessageBox.Yes:
dialog = QFileDialog()
dialog.setFileMode(QFileDialog.Directory)
folder = dialog.getExistingDirectory(
- self, QCoreApplication.translate("MainWindow",
- "Choose path for results"))
+ self, _translate("MainWindow", "Choose path for results"))
for plate in exp.plates:
plate.write_tm_table(
'{}/plate_{}_04_tm.csv'.format(folder, str(plate.id)))
@@ -254,8 +252,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self.generate_plate_tabs(plate)
self.progressBar.setEnabled(False)
- self.statusBar.showMessage(QCoreApplication.translate("MainWindow",
- "Finished!"))
+ self.statusBar.showMessage(_translate("MainWindow", "Finished!"))
@pyqtSlot()
def on_buttonBox_process_rejected(self):