1
0
Fork 0
mirror of https://github.com/Athemis/PyDSF.git synced 2025-04-20 11:59:12 +00:00

Prepare for translation

Made strings translatable and generated first translation template.
This commit is contained in:
Alexander Minges 2015-07-08 01:30:06 +02:00
parent 35b2920d34
commit abe85f323e
3 changed files with 285 additions and 21 deletions

View file

@ -1,4 +1,5 @@
from PyQt5 import QtWidgets
from PyQt5.QtCore import QCoreApplication
from matplotlib.backends.backend_qt5agg import (FigureCanvasQTAgg as
FigureCanvas)
from matplotlib.backends.backend_qt5agg import (NavigationToolbar2QT as
@ -29,9 +30,14 @@ class MplCanvas(FigureCanvas):
class CustomNavigationToolbar(NavigationToolbar):
toolitems = (
('Save', 'Save the figure', 'filesave', 'save_figure'),
('Subplots', 'Configure subplots', 'subplots', 'configure_subplots'),
(None, None, None, None), )
(QCoreApplication.translate("CustomNavigationToolbar", 'Save'),
QCoreApplication.translate("CustomNavigationToolbar",
'Save the figure'), 'filesave',
'save_figure'),
(QCoreApplication.translate("CustomNavigationToolbar", 'Subplots'),
QCoreApplication.translate("CustomNavigationToolbar",
'Configure subplots'), 'subplots',
'configure_subplots'), (None, None, None, None), )
def __init__(self, canvas, parent, coordinates=True):
NavigationToolbar.__init__(self, canvas, parent,