1
0
mirror of https://github.com/naruxde/revpipycontrol.git synced 2025-11-08 15:43:52 +01:00

Codestyle von tkinter.messagebox angepasst

This commit is contained in:
2017-06-29 13:03:39 +02:00
parent 624b6f6972
commit 1f668b153c
4 changed files with 160 additions and 159 deletions

View File

@@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: RevPiPyControl 0.4.0\n" "Project-Id-Version: RevPiPyControl 0.4.0\n"
"POT-Creation-Date: 2017-06-29 12:39+0200\n" "POT-Creation-Date: 2017-06-29 12:59+0200\n"
"PO-Revision-Date: 2017-06-29 12:39+0200\n" "PO-Revision-Date: 2017-06-29 13:03+0200\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n" "Language: de\n"
@@ -139,16 +139,16 @@ msgstr ""
msgid "XML-RPC server port" msgid "XML-RPC server port"
msgstr "XML-RPC Serverport" msgstr "XML-RPC Serverport"
#: revpioption.py:179 revpiplclist.py:112 #: revpioption.py:179 revpiplclist.py:111
msgid "Save" msgid "Save"
msgstr "Speichern" msgstr "Speichern"
#: revpioption.py:184 revpiplclist.py:115 #: revpioption.py:184 revpiplclist.py:114
msgid "Close" msgid "Close"
msgstr "Schließen" msgstr "Schließen"
#: revpioption.py:230 revpioption.py:254 revpiplclist.py:151 #: revpioption.py:230 revpioption.py:254 revpiplclist.py:150
#: revpiplclist.py:176 revpiprogram.py:367 revpiprogram.py:420 #: revpiplclist.py:175 revpiprogram.py:370 revpiprogram.py:418
msgid "Question" msgid "Question"
msgstr "Frage" msgstr "Frage"
@@ -164,7 +164,7 @@ msgstr ""
"Sollen die neuen Einstellungen sofort in Kraft treten?\n" "Sollen die neuen Einstellungen sofort in Kraft treten?\n"
"Dies bedeutet einen Neustart des Dienstes und des laufenden PLC-Programms!" "Dies bedeutet einen Neustart des Dienstes und des laufenden PLC-Programms!"
#: revpioption.py:239 revpiplclist.py:191 revpiprogram.py:65 #: revpioption.py:239 revpiplclist.py:190 revpiprogram.py:65
msgid "Information" msgid "Information"
msgstr "Information" msgstr "Information"
@@ -172,11 +172,11 @@ msgstr "Information"
msgid "Settings saved" msgid "Settings saved"
msgstr "Einstellungen gespeichert" msgstr "Einstellungen gespeichert"
#: revpioption.py:245 revpiplclist.py:199 revpiprogram.py:307 #: revpioption.py:245 revpiplclist.py:198 revpiprogram.py:306
#: revpiprogram.py:336 revpiprogram.py:400 revpiprogram.py:435 #: revpiprogram.py:337 revpiprogram.py:400 revpiprogram.py:433
#: revpiprogram.py:520 revpiprogram.py:590 revpiprogram.py:620 #: revpiprogram.py:517 revpiprogram.py:589 revpiprogram.py:620
#: revpiprogram.py:632 revpiprogram.py:681 revpiprogram.py:702 #: revpiprogram.py:633 revpiprogram.py:682 revpiprogram.py:702
#: revpiprogram.py:711 revpipycontrol.py:308 #: revpiprogram.py:710 revpipycontrol.py:307
msgid "Error" msgid "Error"
msgstr "Fehler" msgstr "Fehler"
@@ -198,31 +198,31 @@ msgstr ""
msgid "RevPi Python PLC connections" msgid "RevPi Python PLC connections"
msgstr "RevPi Python PLC Verbindungen" msgstr "RevPi Python PLC Verbindungen"
#: revpiplclist.py:75 #: revpiplclist.py:74
msgid "Name" msgid "Name"
msgstr "Name" msgstr "Name"
#: revpiplclist.py:82 #: revpiplclist.py:81
msgid "IP address" msgid "IP address"
msgstr "IP Adresse" msgstr "IP Adresse"
#: revpiplclist.py:90 #: revpiplclist.py:89
msgid "Port" msgid "Port"
msgstr "Port" msgstr "Port"
#: revpiplclist.py:99 #: revpiplclist.py:98
msgid "New" msgid "New"
msgstr "Neu" msgstr "Neu"
#: revpiplclist.py:102 #: revpiplclist.py:101
msgid "Apply" msgid "Apply"
msgstr "Übernehmen" msgstr "Übernehmen"
#: revpiplclist.py:106 #: revpiplclist.py:105
msgid "Remove" msgid "Remove"
msgstr "Entfernen" msgstr "Entfernen"
#: revpiplclist.py:152 #: revpiplclist.py:151
msgid "" msgid ""
"Do you really want to quit? \n" "Do you really want to quit? \n"
"Unsaved changes will be lost" "Unsaved changes will be lost"
@@ -230,11 +230,11 @@ msgstr ""
"Wollen Sie wirklich beenden? \n" "Wollen Sie wirklich beenden? \n"
"Nicht gespeicherte Änderungen gehen verloren" "Nicht gespeicherte Änderungen gehen verloren"
#: revpiplclist.py:177 #: revpiplclist.py:176
msgid "Do you really want to delete the selected connection '{}'" msgid "Do you really want to delete the selected connection '{}'"
msgstr "Wollen Sie die ausgewählte Verbindung '{}' wirklich löschen?" msgstr "Wollen Sie die ausgewählte Verbindung '{}' wirklich löschen?"
#: revpiplclist.py:192 #: revpiplclist.py:191
msgid "" msgid ""
"Successfully saved. \n" "Successfully saved. \n"
"Do you want to close this window?" "Do you want to close this window?"
@@ -242,11 +242,11 @@ msgstr ""
"Verbindungen erfolgreich gespeichert. \n" "Verbindungen erfolgreich gespeichert. \n"
"Möchten Sie dieses Fenster jetzt schließen?" "Möchten Sie dieses Fenster jetzt schließen?"
#: revpiplclist.py:200 #: revpiplclist.py:199
msgid "Failed to save connections" msgid "Failed to save connections"
msgstr "Verbindungen konnten nicht gespeichert werden" msgstr "Verbindungen konnten nicht gespeichert werden"
#: revpiprogram.py:67 #: revpiprogram.py:66
msgid "" msgid ""
"A PLC program has been uploaded. Please check the PLC options to see if the " "A PLC program has been uploaded. Please check the PLC options to see if the "
"correct program is specified as the start program." "correct program is specified as the start program."
@@ -254,135 +254,135 @@ msgstr ""
"Ein PLC Programm wurde hochgeladen. Bitte prüfen Sie die PLC Optionen, ob " "Ein PLC Programm wurde hochgeladen. Bitte prüfen Sie die PLC Optionen, ob "
"dort das richtige Programm als Startprogramm angegeben ist." "dort das richtige Programm als Startprogramm angegeben ist."
#: revpiprogram.py:75 #: revpiprogram.py:74
msgid "RevPi Python PLC program" msgid "RevPi Python PLC program"
msgstr "RevPi Python PLC Programm" msgstr "RevPi Python PLC Programm"
#: revpiprogram.py:89 #: revpiprogram.py:88
msgid "PLC python program" msgid "PLC python program"
msgstr "PLC Python Programm" msgstr "PLC Python Programm"
#: revpiprogram.py:99 revpiprogram.py:101 revpiprogram.py:109 #: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:108
#: revpiprogram.py:113 #: revpiprogram.py:112
msgid "Files" msgid "Files"
msgstr "Dateien" msgstr "Dateien"
#: revpiprogram.py:99 revpiprogram.py:101 revpiprogram.py:468 #: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:465
#: revpiprogram.py:574 #: revpiprogram.py:573
msgid "Zip archive" msgid "Zip archive"
msgstr "Zip Archiv" msgstr "Zip Archiv"
#: revpiprogram.py:99 revpiprogram.py:101 revpiprogram.py:481 #: revpiprogram.py:98 revpiprogram.py:100 revpiprogram.py:478
#: revpiprogram.py:603 #: revpiprogram.py:603
msgid "TGZ archive" msgid "TGZ archive"
msgstr "TGZ Archiv" msgstr "TGZ Archiv"
#: revpiprogram.py:101 #: revpiprogram.py:100
msgid "Folder" msgid "Folder"
msgstr "Verzeichnis" msgstr "Verzeichnis"
#: revpiprogram.py:118 #: revpiprogram.py:117
msgid "Download PLC program as:" msgid "Download PLC program as:"
msgstr "PLC Programm herunterladen als:" msgstr "PLC Programm herunterladen als:"
#: revpiprogram.py:128 #: revpiprogram.py:127
msgid "include piCtory configuration" msgid "include piCtory configuration"
msgstr "inkl. piCtory Konfiguration" msgstr "inkl. piCtory Konfiguration"
#: revpiprogram.py:133 revpiprogram.py:177 revpiprogram.py:198 #: revpiprogram.py:132 revpiprogram.py:176 revpiprogram.py:197
msgid "Download" msgid "Download"
msgstr "Herunterladen" msgstr "Herunterladen"
#: revpiprogram.py:138 #: revpiprogram.py:137
msgid "Upload PLC program as:" msgid "Upload PLC program as:"
msgstr "PLC Programm hochladen als:" msgstr "PLC Programm hochladen als:"
#: revpiprogram.py:150 #: revpiprogram.py:149
msgid "clean upload folder before upload" msgid "clean upload folder before upload"
msgstr "vorher Inhalt im Uploadverzeichnis löschen" msgstr "vorher Inhalt im Uploadverzeichnis löschen"
#: revpiprogram.py:157 #: revpiprogram.py:156
msgid "includes piCtory configuration" msgid "includes piCtory configuration"
msgstr "enthält piCtory Konfiguration" msgstr "enthält piCtory Konfiguration"
#: revpiprogram.py:163 revpiprogram.py:185 #: revpiprogram.py:162 revpiprogram.py:184
msgid "Upload" msgid "Upload"
msgstr "Hochladen" msgstr "Hochladen"
#: revpiprogram.py:169 #: revpiprogram.py:168
msgid "piCtory configuration" msgid "piCtory configuration"
msgstr "piCtory Konfiguration" msgstr "piCtory Konfiguration"
#: revpiprogram.py:173 #: revpiprogram.py:172
msgid "Download piCtory configuration" msgid "Download piCtory configuration"
msgstr "piCtory Konfiguration herunterladen" msgstr "piCtory Konfiguration herunterladen"
#: revpiprogram.py:180 #: revpiprogram.py:179
msgid "Upload piCtory configuration" msgid "Upload piCtory configuration"
msgstr "piCtory Konfiguration hochladen" msgstr "piCtory Konfiguration hochladen"
#: revpiprogram.py:191 #: revpiprogram.py:190
msgid "piControl0 prozess image" msgid "piControl0 prozess image"
msgstr "piControl0 Prozessabbild" msgstr "piControl0 Prozessabbild"
#: revpiprogram.py:194 #: revpiprogram.py:193
msgid "Download process image dump" msgid "Download process image dump"
msgstr "Prozessabbild Dump herunterladen" msgstr "Prozessabbild Dump herunterladen"
#: revpiprogram.py:204 #: revpiprogram.py:203
msgid "Reset piControl" msgid "Reset piControl"
msgstr "piControl zurücksetzen" msgstr "piControl zurücksetzen"
#: revpiprogram.py:207 #: revpiprogram.py:206
msgid "Execute piControlReset" msgid "Execute piControlReset"
msgstr "piControlReset ausführen" msgstr "piControlReset ausführen"
#: revpiprogram.py:211 #: revpiprogram.py:210
msgid "execute" msgid "execute"
msgstr "ausführen" msgstr "ausführen"
#: revpiprogram.py:217 revpipycontrol.py:96 #: revpiprogram.py:216 revpipycontrol.py:96
msgid "Exit" msgid "Exit"
msgstr "Beenden" msgstr "Beenden"
#: revpiprogram.py:297 revpiprogram.py:326 revpiprogram.py:464 #: revpiprogram.py:296 revpiprogram.py:327 revpiprogram.py:461
#: revpiprogram.py:477 #: revpiprogram.py:474
msgid "Save as..." msgid "Save as..."
msgstr "Speichern unter..." msgstr "Speichern unter..."
#: revpiprogram.py:300 revpiprogram.py:359 #: revpiprogram.py:299 revpiprogram.py:362
msgid "piCtory config" msgid "piCtory config"
msgstr "piCtory Konfiguration" msgstr "piCtory Konfiguration"
#: revpiprogram.py:300 revpiprogram.py:329 revpiprogram.py:359 #: revpiprogram.py:299 revpiprogram.py:330 revpiprogram.py:362
#: revpiprogram.py:468 revpiprogram.py:481 revpiprogram.py:549 #: revpiprogram.py:465 revpiprogram.py:478 revpiprogram.py:548
#: revpiprogram.py:574 revpiprogram.py:603 #: revpiprogram.py:573 revpiprogram.py:603
msgid "All files" msgid "All files"
msgstr "Alle Dateien" msgstr "Alle Dateien"
#: revpiprogram.py:308 revpiprogram.py:337 revpiprogram.py:521 #: revpiprogram.py:307 revpiprogram.py:338 revpiprogram.py:518
msgid "Could not load and save file!" msgid "Could not load and save file!"
msgstr "Datei konnte nicht geladen und gespeichert werden!" msgstr "Datei konnte nicht geladen und gespeichert werden!"
#: revpiprogram.py:312 revpiprogram.py:341 revpiprogram.py:379 #: revpiprogram.py:312 revpiprogram.py:343 revpiprogram.py:381
#: revpiprogram.py:388 revpiprogram.py:430 revpiprogram.py:525 #: revpiprogram.py:389 revpiprogram.py:427 revpiprogram.py:523
#: revpiprogram.py:672 #: revpiprogram.py:672
msgid "Success" msgid "Success"
msgstr "Erfolgreich" msgstr "Erfolgreich"
#: revpiprogram.py:313 revpiprogram.py:342 revpiprogram.py:526 #: revpiprogram.py:313 revpiprogram.py:344 revpiprogram.py:524
msgid "File successfully loaded and saved." msgid "File successfully loaded and saved."
msgstr "Dateien erfolgreich übertragen und gespeichert." msgstr "Dateien erfolgreich übertragen und gespeichert."
#: revpiprogram.py:329 #: revpiprogram.py:330
msgid "Imagefiles" msgid "Imagefiles"
msgstr "Image Dateien" msgstr "Image Dateien"
#: revpiprogram.py:355 #: revpiprogram.py:358
msgid "Open piCtory file..." msgid "Open piCtory file..."
msgstr "piCtory Datei öffnen" msgstr "piCtory Datei öffnen"
#: revpiprogram.py:369 #: revpiprogram.py:371
msgid "" msgid ""
"Should the piControl driver be reset after uploading the piCtory " "Should the piControl driver be reset after uploading the piCtory "
"configuration?" "configuration?"
@@ -390,7 +390,7 @@ msgstr ""
"Soll nach dem Hochladen der piCtory Konfiguration ein Reset am piControl " "Soll nach dem Hochladen der piCtory Konfiguration ein Reset am piControl "
"Treiber durchgeführt werden?" "Treiber durchgeführt werden?"
#: revpiprogram.py:381 #: revpiprogram.py:382
msgid "" msgid ""
"The transfer of the piCtory configuration and the reset of piControl have " "The transfer of the piCtory configuration and the reset of piControl have "
"been successfully executed" "been successfully executed"
@@ -402,18 +402,18 @@ msgstr ""
msgid "The piCtory configuration was successfully transferred" msgid "The piCtory configuration was successfully transferred"
msgstr "Die Übertragung der piCtory Konfiguration wurde erfolgreich ausgeführt" msgstr "Die Übertragung der piCtory Konfiguration wurde erfolgreich ausgeführt"
#: revpiprogram.py:402 #: revpiprogram.py:401
msgid "The piCtory configuration could not be written on the Revolution Pi." msgid "The piCtory configuration could not be written on the Revolution Pi."
msgstr "" msgstr ""
"Die piCtory Konfiguration konnte auf dem Revolution Pi nicht geschrieben " "Die piCtory Konfiguration konnte auf dem Revolution Pi nicht geschrieben "
"werden." "werden."
#: revpiprogram.py:408 revpipycontrol.py:199 revpipycontrol.py:247 #: revpiprogram.py:407 revpipycontrol.py:199 revpipycontrol.py:246
#: revpipycontrol.py:267 #: revpipycontrol.py:266
msgid "Warning" msgid "Warning"
msgstr "Warnung" msgstr "Warnung"
#: revpiprogram.py:410 #: revpiprogram.py:408
msgid "" msgid ""
"The piCtroy configuration has been saved successfully. \n" "The piCtroy configuration has been saved successfully. \n"
"An error occurred on piControl reset!" "An error occurred on piControl reset!"
@@ -421,7 +421,7 @@ msgstr ""
"Die piCtroy Konfiguration wurde erfolgreich gespeichert. \n" "Die piCtroy Konfiguration wurde erfolgreich gespeichert. \n"
"Beim piControl Reset trat allerdings ein Fehler auf!" "Beim piControl Reset trat allerdings ein Fehler auf!"
#: revpiprogram.py:422 #: revpiprogram.py:419
msgid "" msgid ""
"Are you sure to reset piControl? \n" "Are you sure to reset piControl? \n"
"The process image and the piBridge are interrupted !!!" "The process image and the piBridge are interrupted !!!"
@@ -429,27 +429,27 @@ msgstr ""
"Soll piControlReset wirklich durchgeführt werden? \n" "Soll piControlReset wirklich durchgeführt werden? \n"
"Das Prozessabbild und die Steuerung werden dann unterbrochen!!!" "Das Prozessabbild und die Steuerung werden dann unterbrochen!!!"
#: revpiprogram.py:431 #: revpiprogram.py:428
msgid "piControlReset executed successfully" msgid "piControlReset executed successfully"
msgstr "piControl Reset war erfolgreich" msgstr "piControl Reset war erfolgreich"
#: revpiprogram.py:437 #: revpiprogram.py:434
msgid "piControl reset could not be executed successfully" msgid "piControl reset could not be executed successfully"
msgstr "piControl Reset konnte nicht erfolgreich durchgeführt werden" msgstr "piControl Reset konnte nicht erfolgreich durchgeführt werden"
#: revpiprogram.py:451 #: revpiprogram.py:448
msgid "Directory to save" msgid "Directory to save"
msgstr "Verzeichnis zum Ablegen" msgstr "Verzeichnis zum Ablegen"
#: revpiprogram.py:559 #: revpiprogram.py:558
msgid "Folder to upload" msgid "Folder to upload"
msgstr "Verzeichnis zum Hochladen" msgstr "Verzeichnis zum Hochladen"
#: revpiprogram.py:570 #: revpiprogram.py:569
msgid "Upload Zip archive..." msgid "Upload Zip archive..."
msgstr "Zip Archiv hochladen..." msgstr "Zip Archiv hochladen..."
#: revpiprogram.py:591 #: revpiprogram.py:590
msgid "The specified file is not a ZIP archive." msgid "The specified file is not a ZIP archive."
msgstr "Die angegebene Datei ist kein ZIP Archiv" msgstr "Die angegebene Datei ist kein ZIP Archiv"
@@ -474,11 +474,11 @@ msgstr "Die Übertragung war erfolgreich."
msgid "There is no piCtory configuration in this archive." msgid "There is no piCtory configuration in this archive."
msgstr "Es wurde keine piCtory Konfiguration im Archiv gefunden." msgstr "Es wurde keine piCtory Konfiguration im Archiv gefunden."
#: revpiprogram.py:704 #: revpiprogram.py:703
msgid "The Revolution Pi could not process some parts of the transmission." msgid "The Revolution Pi could not process some parts of the transmission."
msgstr "Der Revoluton Pi konnte Teile der Übertragung nicht verarbeiten." msgstr "Der Revoluton Pi konnte Teile der Übertragung nicht verarbeiten."
#: revpiprogram.py:712 #: revpiprogram.py:711
msgid "Errors occurred during transmission" msgid "Errors occurred during transmission"
msgstr "Bei der Übertragung traten Fehler auf" msgstr "Bei der Übertragung traten Fehler auf"
@@ -530,7 +530,7 @@ msgstr "Trennen"
msgid "Connect" msgid "Connect"
msgstr "Verbinden" msgstr "Verbinden"
#: revpipycontrol.py:201 #: revpipycontrol.py:200
msgid "" msgid ""
"The watch mode ist not supported in version {} of RevPiPyLoad on your RevPi! " "The watch mode ist not supported in version {} of RevPiPyLoad on your RevPi! "
"You need at least version 0.4.0." "You need at least version 0.4.0."
@@ -538,7 +538,7 @@ msgstr ""
"Die Debug-Funktion wird von der RevPiPyLoad Version {} auf dem RevPi nicht " "Die Debug-Funktion wird von der RevPiPyLoad Version {} auf dem RevPi nicht "
"unterstützt! Sie benötigen mindestens Version 0.4.0." "unterstützt! Sie benötigen mindestens Version 0.4.0."
#: revpipycontrol.py:249 revpipycontrol.py:269 #: revpipycontrol.py:248 revpipycontrol.py:268
msgid "" msgid ""
"XML-RPC access mode in the RevPiPyLoad configuration is to small to access " "XML-RPC access mode in the RevPiPyLoad configuration is to small to access "
"this dialog" "this dialog"
@@ -546,6 +546,6 @@ msgstr ""
"Der XML-RPC Modus ist beim RevPiPyLoad nicht hoch genug eingestellt, um " "Der XML-RPC Modus ist beim RevPiPyLoad nicht hoch genug eingestellt, um "
"diesen Dialog zu verwenden!" "diesen Dialog zu verwenden!"
#: revpipycontrol.py:309 #: revpipycontrol.py:308
msgid "Can not reach server!" msgid "Can not reach server!"
msgstr "Server ist nicht erreichbar!" msgstr "Server ist nicht erreichbar!"

View File

@@ -12,6 +12,7 @@ from mytools import gettrans
# Übersetzung laden # Übersetzung laden
_ = gettrans() _ = gettrans()
class RevPiOption(tkinter.Frame): class RevPiOption(tkinter.Frame):
def __init__(self, master, xmlcli, xmlmode): def __init__(self, master, xmlcli, xmlmode):
@@ -60,14 +61,16 @@ class RevPiOption(tkinter.Frame):
ckb_zexit = tkinter.Checkbutton(stst, justify="left") ckb_zexit = tkinter.Checkbutton(stst, justify="left")
ckb_zexit["state"] = self.xmlstate ckb_zexit["state"] = self.xmlstate
ckb_zexit["text"] = _("Set process image to NULL if program\n" ckb_zexit["text"] = _(
"Set process image to NULL if program\n"
"terminates successfully") "terminates successfully")
ckb_zexit["variable"] = self.var_zexit ckb_zexit["variable"] = self.var_zexit
ckb_zexit.grid(**cpadw) ckb_zexit.grid(**cpadw)
ckb_zerr = tkinter.Checkbutton(stst, justify="left") ckb_zerr = tkinter.Checkbutton(stst, justify="left")
ckb_zerr["state"] = self.xmlstate ckb_zerr["state"] = self.xmlstate
ckb_zerr["text"] = _("Set process image to NULL if program\n" ckb_zerr["text"] = _(
"Set process image to NULL if program\n"
"terminates with errors") "terminates with errors")
ckb_zerr["variable"] = self.var_zerr ckb_zerr["variable"] = self.var_zerr
ckb_zerr.grid(**cpadw) ckb_zerr.grid(**cpadw)

View File

@@ -63,11 +63,9 @@ class RevPiProgram(tkinter.Frame):
if True or self.uploaded: if True or self.uploaded:
tkmsg.showinfo( tkmsg.showinfo(
_("Information"), _("Information"),
_( _("A PLC program has been uploaded. Please check the "
"A PLC program has been uploaded. Please check the "
"PLC options to see if the correct program is specified " "PLC options to see if the correct program is specified "
"as the start program." "as the start program."),
),
parent=self.master parent=self.master
) )
self.master.destroy() self.master.destroy()
@@ -305,13 +303,15 @@ class RevPiProgram(tkinter.Frame):
fh.write(self.xmlcli.get_pictoryrsc().data) fh.write(self.xmlcli.get_pictoryrsc().data)
except: except:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_("Could not load and save file!") _("Could not load and save file!"),
parent=self.master,
) )
else: else:
tkmsg.showinfo( tkmsg.showinfo(
parent=self.master, title=_("Success"), _("Success"),
message=_("File successfully loaded and saved.") _("File successfully loaded and saved."),
parent=self.master
) )
# Einstellungen speichern # Einstellungen speichern
self.opt["getpictoryrsc_dir"] = os.path.dirname(fh.name) self.opt["getpictoryrsc_dir"] = os.path.dirname(fh.name)
@@ -334,13 +334,15 @@ class RevPiProgram(tkinter.Frame):
fh.write(self.xmlcli.get_procimg().data) fh.write(self.xmlcli.get_procimg().data)
except: except:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_("Could not load and save file!") _("Could not load and save file!"),
parent=self.master
) )
else: else:
tkmsg.showinfo( tkmsg.showinfo(
parent=self.master, title=_("Success"), _("Success"),
message=_("File successfully loaded and saved.") _("File successfully loaded and saved."),
parent=self.master
) )
# Einstellungen speichern # Einstellungen speichern
self.opt["getprocimg_dir"] = os.path.dirname(fh.name) self.opt["getprocimg_dir"] = os.path.dirname(fh.name)
@@ -365,11 +367,10 @@ class RevPiProgram(tkinter.Frame):
if fh is not None: if fh is not None:
ask = tkmsg.askyesno( ask = tkmsg.askyesno(
parent=self.master, title=_("Question"), _("Question"),
message=_( _("Should the piControl driver be reset after "
"Should the piControl driver be reset after " "uploading the piCtory configuration?"),
"uploading the piCtory configuration?" parent=self.master
)
) )
ec = self.xmlcli.set_pictoryrsc(Binary(fh.read()), ask) ec = self.xmlcli.set_pictoryrsc(Binary(fh.read()), ask)
@@ -377,20 +378,18 @@ class RevPiProgram(tkinter.Frame):
if ec == 0: if ec == 0:
if ask: if ask:
tkmsg.showinfo( tkmsg.showinfo(
parent=self.master, title=_("Success"), _("Success"),
message=_( _("The transfer of the piCtory configuration "
"The transfer of the piCtory configuration "
"and the reset of piControl have been " "and the reset of piControl have been "
"successfully executed" "successfully executed"),
) parent=self.master
) )
else: else:
tkmsg.showinfo( tkmsg.showinfo(
parent=self.master, title=_("Success"), _("Success"),
message=_( _("The piCtory configuration was "
"The piCtory configuration was " "successfully transferred"),
"successfully transferred" parent=self.master
)
) )
# Einstellungen speichern # Einstellungen speichern
@@ -398,19 +397,17 @@ class RevPiProgram(tkinter.Frame):
self._savedefaults() self._savedefaults()
elif ec < 0: elif ec < 0:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_( _("The piCtory configuration could not be "
"The piCtory configuration could not be " "written on the Revolution Pi."),
"written on the Revolution Pi." parent=self.master
)
) )
elif ec > 0: elif ec > 0:
tkmsg.showwarning( tkmsg.showwarning(
parent=self.master, title=_("Warning"), _("Warning"),
message=_( _("The piCtroy configuration has been saved successfully."
"The piCtroy configuration has been saved " " \nAn error occurred on piControl reset!"),
"successfully. \nAn error occurred on piControl reset!" parent=self.master
)
) )
fh.close() fh.close()
@@ -418,25 +415,24 @@ class RevPiProgram(tkinter.Frame):
def picontrolreset(self): def picontrolreset(self):
u"""Fürt ein Reset der piBridge durch.""" u"""Fürt ein Reset der piBridge durch."""
ask = tkmsg.askyesno( ask = tkmsg.askyesno(
parent=self.master, title=_("Question"), _("Question"),
message=_( _("Are you sure to reset piControl? \nThe process image "
"Are you sure to reset piControl? \nThe process image " "and the piBridge are interrupted !!!"),
"and the piBridge are interrupted !!!" parent=self.master
)
) )
if ask: if ask:
ec = self.xmlcli.resetpicontrol() ec = self.xmlcli.resetpicontrol()
if ec == 0: if ec == 0:
tkmsg.showinfo( tkmsg.showinfo(
parent=self.master, title=_("Success"), _("Success"),
message=_("piControlReset executed successfully") _("piControlReset executed successfully"),
parent=self.master
) )
else: else:
tkmsg.showerror( tkmsg.showerror(
parten=self.master, title=_("Error"), _("Error"),
message=_( _("piControl reset could not be executed successfully"),
"piControl reset could not be executed successfully" parten=self.master
)
) )
def plcdownload(self): def plcdownload(self):
@@ -518,13 +514,15 @@ class RevPiProgram(tkinter.Frame):
except: except:
raise raise
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_("Could not load and save file!") _("Could not load and save file!"),
parent=self.master
) )
else: else:
tkmsg.showinfo( tkmsg.showinfo(
parent=self.master, title=_("Success"), _("Success"),
message=_("File successfully loaded and saved.") _("File successfully loaded and saved."),
parent=self.master
) )
# Einstellungen speichern # Einstellungen speichern
@@ -588,8 +586,9 @@ class RevPiProgram(tkinter.Frame):
else: else:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_("The specified file is not a ZIP archive.") _("The specified file is not a ZIP archive."),
parent=self.master
) )
return False return False
@@ -618,8 +617,9 @@ class RevPiProgram(tkinter.Frame):
else: else:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_("The specified file is not a TAR archive.") _("The specified file is not a TAR archive."),
parent=self.master
) )
return False return False
@@ -630,11 +630,10 @@ class RevPiProgram(tkinter.Frame):
# Vor Übertragung aufräumen wenn ausgewählt # Vor Übertragung aufräumen wenn ausgewählt
if self.var_cleanup.get() and not self.xmlcli.plcuploadclean(): if self.var_cleanup.get() and not self.xmlcli.plcuploadclean():
tkmsg.showerror( tkmsg.showerror(
parent=self.masger, title=_("Error"), _("Error"),
message=_( _("There was an error deleting the files on the "
"There was an error deleting the files on the " "Revolution Pi."),
"Revolution Pi." parent=self.master
)
) )
return False return False
@@ -670,8 +669,9 @@ class RevPiProgram(tkinter.Frame):
if ec == 0: if ec == 0:
tkmsg.showinfo( tkmsg.showinfo(
parent=self.master, title=_("Success"), _("Success"),
message=_("The transfer was successful.") _("The transfer was successful."),
parent=self.master
) )
if self.var_picup.get(): if self.var_picup.get():
@@ -679,11 +679,10 @@ class RevPiProgram(tkinter.Frame):
self.setpictoryrsc(rscfile) self.setpictoryrsc(rscfile)
else: else:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_( _("There is no piCtory configuration in this "
"There is no piCtory configuration in this " "archive."),
"archive." parent=self.master
)
) )
# Einstellungen speichern # Einstellungen speichern
@@ -700,17 +699,17 @@ class RevPiProgram(tkinter.Frame):
elif ec == -1: elif ec == -1:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_( _("The Revolution Pi could not process some parts of the "
"The Revolution Pi could not process some parts of the " "transmission."),
"transmission." parent=self.master
)
) )
elif ec == -2: elif ec == -2:
tkmsg.showerror( tkmsg.showerror(
parent=self.master, title=_("Error"), _("Error"),
message=_("Errors occurred during transmission") _("Errors occurred during transmission"),
parent=self.master
) )
# Temp-Dir aufräumen # Temp-Dir aufräumen

View File

@@ -196,12 +196,11 @@ class RevPiPyControl(tkinter.Frame):
if "psstart" not in self.xmlfuncs: if "psstart" not in self.xmlfuncs:
tkmsg.showwarning( tkmsg.showwarning(
parent=self.master, title=_("Warning"), _("Warning"),
message=_( _("The watch mode ist not supported in version {} "
"The watch mode ist not supported in version {} "
"of RevPiPyLoad on your RevPi! You need at least version " "of RevPiPyLoad on your RevPi! You need at least version "
"0.4.0." "0.4.0.").format(self.cli.version()),
).format(self.cli.version()) parent=self.master
) )
else: else:
# Debugfenster laden # Debugfenster laden