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:
parent
abe85f323e
commit
fb75cb0864
6 changed files with 290 additions and 32 deletions
BIN
i18n/de_DE.qm
Normal file
BIN
i18n/de_DE.qm
Normal file
Binary file not shown.
245
i18n/de_DE.ts
Normal file
245
i18n/de_DE.ts
Normal 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>&Start Processing</source>
|
||||
<translation>&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><html><head/><body><p>Add data files to the experiment. If multiple files are loaded, they are treated as replicates.</p></body></html></source>
|
||||
<translation><html><head/><body><p>Daten zum Experiment hinzufügen. Werden mehrere Datensätze geladen, werden diese als Replikate behandelt.</p></body></html></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><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></source>
|
||||
<translation><html><head/><body><p>Temperaturbereich des Datensatzes. Trifft nur zu, falls der Datensatz selbst keine Informationen zum Temperaturbereich bereitstellt.</p></body></html></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><html><head/><body><p>T<span style=" vertical-align:sub;">min</span></p></body></html></source>
|
||||
<translation><html><head/><body><p>T<span style=" vertical-align:sub;">min</span></p></body></html></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><html><head/><body><p>T<span style=" vertical-align:sub;">max</span></p></body></html></source>
|
||||
<translation><html><head/><body><p>T<span style=" vertical-align:sub;">max</span></p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="266"/>
|
||||
<source><html><head/><body><p>&Delta;T</p></body></html></source>
|
||||
<translation><html><head/><body><p>&Delta;T</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="268"/>
|
||||
<source><html><head/><body><p>Only T<span style=" vertical-align:sub;">m</span> values within this limit are considered valid.</p></body></html></source>
|
||||
<translation><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></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="269"/>
|
||||
<source>&Cutoff</source>
|
||||
<translation>&Schwellwert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="270"/>
|
||||
<source>&Upper</source>
|
||||
<translation>&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><html><head/><body><p>If the signal exceeds this threshold, the coresponding well is assumed to be denatured.</p></body></html></source>
|
||||
<translation><html><head/><body><p>Überschreitet das Signal diesen Schwellwert, wird die zugehörige Probe als denaturiert betrachtet.</p></body></html></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="275"/>
|
||||
<source>Signal &Threshold</source>
|
||||
<translation>Signal&schwellwert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="276"/>
|
||||
<source><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></source>
|
||||
<translation><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></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="277"/>
|
||||
<source>&Colorbar</source>
|
||||
<translation>&Farbverlauf</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="278"/>
|
||||
<source>S&tart</source>
|
||||
<translation>&Start</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="280"/>
|
||||
<source>En&d</source>
|
||||
<translation>&Ende</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="282"/>
|
||||
<source>Fi&le</source>
|
||||
<translation>&Datei</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="283"/>
|
||||
<source>Hel&p</source>
|
||||
<translation>&Hilfe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="284"/>
|
||||
<source>&Quit</source>
|
||||
<translation>&Beenden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="285"/>
|
||||
<source>&About</source>
|
||||
<translation>&Über</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/Ui_mainwindow.py" line="286"/>
|
||||
<source>About &Qt</source>
|
||||
<translation>Über &Qt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../ui/mainwindow.py" line="118"/>
|
||||
<source>Welcome to PyDSF</source>
|
||||
<translation>Willkommen zu PyDSF</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
|
@ -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>&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 &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>
|
||||
|
|
8
main.py
8
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_())
|
||||
|
|
5
pydsf.pro
Normal file
5
pydsf.pro
Normal 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
|
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue