1
0
Fork 0
mirror of https://github.com/Athemis/PyDSF.git synced 2025-04-04 14:26:03 +00:00

Preparing translations; Added de_DE

This commit is contained in:
Alexander Minges 2015-07-08 02:13:28 +02:00
parent abe85f323e
commit fb75cb0864
6 changed files with 290 additions and 32 deletions

BIN
i18n/de_DE.qm Normal file

Binary file not shown.

245
i18n/de_DE.ts Normal file
View file

@ -0,0 +1,245 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE" sourcelanguage="en_US">
<context>
<name>CustomNavigationToolbar</name>
<message>
<location filename="../ui/mplwidget.py" line="32"/>
<source>Save</source>
<translation>Speichern</translation>
</message>
<message>
<location filename="../ui/mplwidget.py" line="32"/>
<source>Save the figure</source>
<translation>Abbildung speichern</translation>
</message>
<message>
<location filename="../ui/mplwidget.py" line="32"/>
<source>Subplots</source>
<translation>Untergrafiken</translation>
</message>
<message>
<location filename="../ui/mplwidget.py" line="32"/>
<source>Configure subplots</source>
<translation>Untergrafiken formatieren</translation>
</message>
</context>
<context>
<name>MainWindow</name>
<message>
<location filename="../ui/mainwindow.py" line="121"/>
<source>&amp;Start Processing</source>
<translation>&amp;Prozessierung starten</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="134"/>
<source>Open data file</source>
<translation>Datensatz öffnen</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="134"/>
<source>Text files (*.txt *.csv)</source>
<translation>Textdateien (*.txt *.csv)</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="192"/>
<source>Error</source>
<translation>Fehler</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="192"/>
<source>No data file loaded!</source>
<translation>Kein Datensatz geladen!</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="199"/>
<source>Warning</source>
<translation>Warnung</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="199"/>
<source>Signal threshold is currently set to zero.</source>
<translation>Signalschwellwert ist aktuell auf Null gesetzt.</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="207"/>
<source>Processing...</source>
<translation>Prozessierung...</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="218"/>
<source>Save data</source>
<translation>Daten speichern</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="218"/>
<source>Calculations are finished. Save results?</source>
<translation>Berechnungen abgeschlossen. Ergebnisse speichern?</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="226"/>
<source>Choose path for results</source>
<translation>Pfad zum Speichern der Ergebnisse wählen</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="255"/>
<source>Finished!</source>
<translation>Fertig!</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="251"/>
<source>PyDSF</source>
<translation>PyDSF</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="252"/>
<source>Experimental Setup</source>
<translation type="unfinished">Experiment</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="253"/>
<source>Instrument</source>
<translation>Instrument</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="254"/>
<source>Analytik Jena qTOWER 2.0/2.2</source>
<translation>Analytik Jena qTOWER 2.0/2.2</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="255"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Add data files to the experiment. If multiple files are loaded, they are treated as replicates.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Daten zum Experiment hinzufügen. Werden mehrere Datensätze geladen, werden diese als Replikate behandelt.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="256"/>
<source>Data File</source>
<translation>Datensatz</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="257"/>
<source>Replicates</source>
<translation>Replikate</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="258"/>
<source>Files</source>
<translation>Dateien</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="259"/>
<source>Processing Options</source>
<translation>Prozessierungsoptionen</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="260"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Temperature range of the data points. Only applies, if the data file does not contain any temperature information.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Temperaturbereich des Datensatzes. Trifft nur zu, falls der Datensatz selbst keine Informationen zum Temperaturbereich bereitstellt.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="261"/>
<source>Temperature settings</source>
<translation>Temperatureinstellungen</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="262"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;T&lt;span style=&quot; vertical-align:sub;&quot;&gt;min&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;T&lt;span style=&quot; vertical-align:sub;&quot;&gt;min&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="Ui_mainwindow.py" line="281"/>
<source> °C</source>
<translation type="obsolete"> °C</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="264"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;T&lt;span style=&quot; vertical-align:sub;&quot;&gt;max&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;T&lt;span style=&quot; vertical-align:sub;&quot;&gt;max&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="266"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&amp;Delta;T&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&amp;Delta;T&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="268"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Only T&lt;span style=&quot; vertical-align:sub;&quot;&gt;m&lt;/span&gt; values within this limit are considered valid.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Nur T&lt;span style=&quot; vertical-align:sub;&quot;&gt;m&lt;/span&gt;-Werte innerhalb dieser Grenzen werden als gültig betrachtet.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="269"/>
<source>&amp;Cutoff</source>
<translation>&amp;Schwellwert</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="270"/>
<source>&amp;Upper</source>
<translation>&amp;Oberer</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="272"/>
<source>Lower</source>
<translation>Unterer</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="274"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If the signal exceeds this threshold, the coresponding well is assumed to be denatured.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Überschreitet das Signal diesen Schwellwert, wird die zugehörige Probe als denaturiert betrachtet.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="275"/>
<source>Signal &amp;Threshold</source>
<translation>Signal&amp;schwellwert</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="276"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Defines the range of the colorbar used for the T&lt;span style=&quot; vertical-align:sub;&quot;&gt;m&lt;/span&gt; heatmap.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Definiert den Bereich des Farbverlaufs, welcher für die T&lt;span style=&quot; vertical-align:sub;&quot;&gt;m&lt;/span&gt; Heatmap verwendet wird.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="277"/>
<source>&amp;Colorbar</source>
<translation>&amp;Farbverlauf</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="278"/>
<source>S&amp;tart</source>
<translation>&amp;Start</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="280"/>
<source>En&amp;d</source>
<translation>&amp;Ende</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="282"/>
<source>Fi&amp;le</source>
<translation>&amp;Datei</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="283"/>
<source>Hel&amp;p</source>
<translation>&amp;Hilfe</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="284"/>
<source>&amp;Quit</source>
<translation>&amp;Beenden</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="285"/>
<source>&amp;About</source>
<translation>&amp;Über</translation>
</message>
<message>
<location filename="../ui/Ui_mainwindow.py" line="286"/>
<source>About &amp;Qt</source>
<translation>Über &amp;Qt</translation>
</message>
<message>
<location filename="../ui/mainwindow.py" line="118"/>
<source>Welcome to PyDSF</source>
<translation>Willkommen zu PyDSF</translation>
</message>
</context>
</TS>

View file

@ -26,27 +26,27 @@
<context encoding="UTF-8">
<name>MainWindow</name>
<message>
<location filename="mainwindow.py" line="119"/>
<location filename="mainwindow.py" line="121"/>
<source>&amp;Start Processing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="132"/>
<location filename="mainwindow.py" line="134"/>
<source>Open data file</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="132"/>
<location filename="mainwindow.py" line="134"/>
<source>Text files (*.txt *.csv)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="191"/>
<location filename="mainwindow.py" line="192"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="191"/>
<location filename="mainwindow.py" line="192"/>
<source>No data file loaded!</source>
<translation type="unfinished"></translation>
</message>
@ -66,22 +66,22 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="219"/>
<location filename="mainwindow.py" line="218"/>
<source>Save data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="219"/>
<location filename="mainwindow.py" line="218"/>
<source>Calculations are finished. Save results?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="227"/>
<location filename="mainwindow.py" line="226"/>
<source>Choose path for results</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="257"/>
<location filename="mainwindow.py" line="255"/>
<source>Finished!</source>
<translation type="unfinished"></translation>
</message>
@ -235,5 +235,10 @@
<source>About &amp;Qt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.py" line="118"/>
<source>Welcome to PyDSF</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View file

@ -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_())

5
pydsf.pro Normal file
View file

@ -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

View file

@ -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):