diff --git a/src/Mod/Plot/CMakeLists.txt b/src/Mod/Plot/CMakeLists.txt index f52bb5f70..8d0730181 100644 --- a/src/Mod/Plot/CMakeLists.txt +++ b/src/Mod/Plot/CMakeLists.txt @@ -6,17 +6,25 @@ SET(PlotMain_SRCS SOURCE_GROUP("" FILES ${PlotMain_SRCS}) SET(PlotIcons_SRCS - Icons/Axes.svg - Icons/Grid.svg - Icons/Icon.svg - Icons/Labels.svg - Icons/Legend.svg - Icons/Positions.svg - Icons/Save.svg - Icons/Series.svg + resources/icons/Axes.svg + resources/icons/Grid.svg + resources/icons/Icon.svg + resources/icons/Labels.svg + resources/icons/Legend.svg + resources/icons/Positions.svg + resources/icons/Save.svg + resources/icons/Series.svg ) SOURCE_GROUP("ploticons" FILES ${PlotIcons_SRCS}) +SET(PlotTranslations_SRCS + resources/translations/Plot.ts + resources/translations/Plot.qm + resources/translations/Plot_es-ES.ts + resources/translations/Plot_es-ES.qm +) +SOURCE_GROUP("plottranslations" FILES ${PlotTranslations_SRCS}) + SET(PlotAxes_SRCS plotAxes/__init__.py plotAxes/TaskPanel.py @@ -59,7 +67,7 @@ SET(PlotUtils_SRCS ) SOURCE_GROUP("plotutils" FILES ${PlotUtils_SRCS}) -SET(all_files ${PlotMain_SRCS} ${PlotAxes_SRCS} ${PlotLabels_SRCS} ${PlotPositions_SRCS} ${PlotSave_SRCS} ${PlotSeries_SRCS} ${PlotIcons_SRCS} ${PlotUtils_SRCS}) +SET(all_files ${PlotMain_SRCS} ${PlotAxes_SRCS} ${PlotLabels_SRCS} ${PlotPositions_SRCS} ${PlotSave_SRCS} ${PlotSeries_SRCS} ${PlotIcons_SRCS} ${PlotTranslations_SRCS} ${PlotUtils_SRCS}) ADD_CUSTOM_TARGET(Plot ALL SOURCES ${all_files} @@ -71,7 +79,13 @@ INSTALL( FILES ${PlotIcons_SRCS} DESTINATION - Mod/Plot/Icons + Mod/Plot/resources/icons +) +INSTALL( + FILES + ${PlotTranslations_SRCS} + DESTINATION + Mod/Plot/resources/translations ) INSTALL( FILES diff --git a/src/Mod/Plot/InitGui.py b/src/Mod/Plot/InitGui.py index 35d9d465a..8038c0319 100644 --- a/src/Mod/Plot/InitGui.py +++ b/src/Mod/Plot/InitGui.py @@ -23,15 +23,14 @@ class PlotWorkbench ( Workbench ): """ @brief Workbench of Plot module. Here toolbars & icons are append. """ - from plotUtils import Paths, Translator + from plotUtils import Paths import PlotGui Icon = Paths.iconsPath() + "/Icon.svg" - MenuText = str(Translator.translate("Plot")) - ToolTip = str(Translator.translate("Plot")) + MenuText = "Plot" + ToolTip = "The Plot module is used to edit/save output plots performed by other tools" def Initialize(self): - from plotUtils import Translator # ToolBar list = ["Plot_SaveFig", "Plot_Axes", "Plot_Series", "Plot_Grid", "Plot_Legend", "Plot_Labels", "Plot_Positions"] self.appendToolbar("Plot",list) @@ -44,7 +43,6 @@ try: import matplotlib Gui.addWorkbench(PlotWorkbench()) except ImportError: - from plotUtils import Translator - msg = Translator.translate("matplotlib not found, Plot module will be disabled.\n") - FreeCAD.Console.PrintMessage(msg) + msg = QtCore.QT_TRANSLATE_NOOP("plot", "matplotlib not found, Plot module will be disabled") + FreeCAD.Console.PrintMessage(msg + '\n') diff --git a/src/Mod/Plot/Makefile.am b/src/Mod/Plot/Makefile.am index c0411b0d8..e1cf410d1 100644 --- a/src/Mod/Plot/Makefile.am +++ b/src/Mod/Plot/Makefile.am @@ -7,14 +7,18 @@ data_DATA = \ PlotGui.py nobase_data_DATA = \ - Icons/Axes.svg \ - Icons/Grid.svg \ - Icons/Icon.svg \ - Icons/Labels.svg \ - Icons/Legend.svg \ - Icons/Positions.svg \ - Icons/Save.svg \ - Icons/Series.svg \ + resources/icons/Axes.svg \ + resources/icons/Grid.svg \ + resources/icons/Icon.svg \ + resources/icons/Labels.svg \ + resources/icons/Legend.svg \ + resources/icons/Positions.svg \ + resources/icons/Save.svg \ + resources/icons/Series.svg \ + resources/translations/Plot.ts \ + resources/translations/Plot.qm \ + resources/translations/Plot_es-ES.ts \ + resources/translations/Plot_es-ES.qm \ plotAxes/__init__.py \ plotAxes/TaskPanel.py \ plotAxes/TaskPanel.ui \ diff --git a/src/Mod/Plot/Plot.py b/src/Mod/Plot/Plot.py index fc8767799..29fdff663 100644 --- a/src/Mod/Plot/Plot.py +++ b/src/Mod/Plot/Plot.py @@ -24,9 +24,6 @@ # FreeCAD import FreeCAD -# Plot module -from plotUtils import Paths, Translator - # PyQt4 from PyQt4 import QtCore, QtGui @@ -38,8 +35,8 @@ try: from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar from matplotlib.figure import Figure except ImportError: - msg = Translator.translate("matplotlib not installed, so Plot module is disabled.\n") - FreeCAD.Console.PrintError(msg) + msg = QtCore.QT_TRANSLATE_NOOP("plot", "matplotlib not found, so Plot module can not be loaded") + FreeCAD.Console.PrintMessage(msg + '\n') raise ImportError("matplotlib not installed") def getMainWindow(): diff --git a/src/Mod/Plot/PlotGui.py b/src/Mod/Plot/PlotGui.py index 7f220b90f..ad3b2da65 100644 --- a/src/Mod/Plot/PlotGui.py +++ b/src/Mod/Plot/PlotGui.py @@ -24,16 +24,29 @@ from PyQt4 import QtCore, QtGui import FreeCAD, FreeCADGui, os +# Setup tranlations +from plotUtils import Paths +path = Paths.translationsPath() +FreeCADGui.addLanguagePath(path) +import os +import FreeCAD +translator = QtCore.QTranslator() +dirList=os.listdir(path) +for fname in dirList: + valid = translator.load(os.path.join(path, fname)) + if valid: + QtGui.QApplication.installTranslator(translator) + class Save: def Activated(self): import plotSave plotSave.load() def GetResources(self): - from plotUtils import Paths, Translator + from plotUtils import Paths IconPath = Paths.iconsPath() + "/Save.svg" - MenuText = str(Translator.translate('Save plot')) - ToolTip = str(Translator.translate('Save plot as image file.')) + MenuText = str(QtGui.QApplication.translate("plot", "Save plot").toAscii()) + ToolTip = str(QtGui.QApplication.translate("plot", "Save plot as image file").toAscii()) return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip} class Axes: @@ -42,10 +55,10 @@ class Axes: plotAxes.load() def GetResources(self): - from plotUtils import Paths, Translator + from plotUtils import Paths IconPath = Paths.iconsPath() + "/Axes.svg" - MenuText = str(Translator.translate('Configure axes')) - ToolTip = str(Translator.translate('Configure axes parameters.')) + MenuText = str(QtGui.QApplication.translate("plot", "Configure axes").toAscii()) + ToolTip = str(QtGui.QApplication.translate("plot", "Configure axes parameters").toAscii()) return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip} class Series: @@ -54,48 +67,46 @@ class Series: plotSeries.load() def GetResources(self): - from plotUtils import Paths, Translator + from plotUtils import Paths IconPath = Paths.iconsPath() + "/Series.svg" - MenuText = str(Translator.translate('Configure series')) - ToolTip = str(Translator.translate('Configure series drawing style and label.')) + MenuText = str(QtGui.QApplication.translate("plot", "Configure series").toAscii()) + ToolTip = str(QtGui.QApplication.translate("plot", "Configure series drawing style and label").toAscii()) return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip} class Grid: def Activated(self): import Plot - from plotUtils import Translator plt = Plot.getPlot() if not plt: - msg = Translator.translate("Grid must be activated on top of a plot document.") + msg = str(QtGui.QApplication.translate("plot", "Grid must be activated on top of a plot document").toAscii()) FreeCAD.Console.PrintError(msg+"\n") return flag = plt.isGrid() Plot.grid(not flag) def GetResources(self): - from plotUtils import Paths, Translator + from plotUtils import Paths IconPath = Paths.iconsPath() + "/Grid.svg" - MenuText = str(Translator.translate('Show/Hide grid')) - ToolTip = str(Translator.translate('Show/Hide grid on selected plot')) + MenuText = str(QtGui.QApplication.translate("plot", "Show/Hide grid").toAscii()) + ToolTip = str(QtGui.QApplication.translate("plot", "Show/Hide grid on selected plot").toAscii()) return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip} class Legend: def Activated(self): import Plot - from plotUtils import Translator plt = Plot.getPlot() if not plt: - msg = Translator.translate("Legend must be activated on top of a plot document.") + msg = str(QtGui.QApplication.translate("plot", "Legend must be activated on top of a plot document").toAscii()) FreeCAD.Console.PrintError(msg+"\n") return flag = plt.isLegend() Plot.legend(not flag) def GetResources(self): - from plotUtils import Paths, Translator + from plotUtils import Paths IconPath = Paths.iconsPath() + "/Legend.svg" - MenuText = str(Translator.translate('Show/Hide legend')) - ToolTip = str(Translator.translate('Show/Hide legend on selected plot')) + MenuText = str(QtGui.QApplication.translate("plot", "Show/Hide legend").toAscii()) + ToolTip = str(QtGui.QApplication.translate("plot", "Show/Hide legend on selected plot").toAscii()) return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip} class Labels: @@ -104,10 +115,10 @@ class Labels: plotLabels.load() def GetResources(self): - from plotUtils import Paths, Translator + from plotUtils import Paths IconPath = Paths.iconsPath() + "/Labels.svg" - MenuText = str(Translator.translate('Set labels')) - ToolTip = str(Translator.translate('Set title and axes labels')) + MenuText = str(QtGui.QApplication.translate("plot", "Set labels").toAscii()) + ToolTip = str(QtGui.QApplication.translate("plot", "Set title and axes labels").toAscii()) return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip} class Positions: @@ -116,10 +127,10 @@ class Positions: plotPositions.load() def GetResources(self): - from plotUtils import Paths, Translator + from plotUtils import Paths IconPath = Paths.iconsPath() + "/Positions.svg" - MenuText = str(Translator.translate('Set positions and sizes')) - ToolTip = str(Translator.translate('Set labels and legend positions and sizes.')) + MenuText = str(QtGui.QApplication.translate("plot", "Set positions and sizes").toAscii()) + ToolTip = str(QtGui.QApplication.translate("plot", "Set labels and legend positions and sizes").toAscii()) return {'Pixmap' : IconPath, 'MenuText': MenuText, 'ToolTip': ToolTip} FreeCADGui.addCommand('Plot_SaveFig', Save()) diff --git a/src/Mod/Plot/plotAxes/TaskPanel.py b/src/Mod/Plot/plotAxes/TaskPanel.py index 848b9506a..fc18dfd69 100644 --- a/src/Mod/Plot/plotAxes/TaskPanel.py +++ b/src/Mod/Plot/plotAxes/TaskPanel.py @@ -28,7 +28,7 @@ import FreeCADGui as Gui from PyQt4 import QtGui,QtCore # Module import Plot -from plotUtils import Paths, Translator +from plotUtils import Paths class TaskPanel: def __init__(self): @@ -127,19 +127,19 @@ class TaskPanel: def retranslateUi(self): """ Set user interface locale strings. """ - self.form.setWindowTitle(Translator.translate("Configure axes")) - self.form.findChild(QtGui.QLabel, "axesLabel").setText(Translator.translate("Active axes")) - self.form.all.setText(Translator.translate("Apply to all axes")) - self.form.findChild(QtGui.QLabel, "dimLabel").setText(Translator.translate("Dimensions")) - self.form.findChild(QtGui.QLabel, "xPosLabel").setText(Translator.translate("X axis position")) - self.form.findChild(QtGui.QLabel, "yPosLabel").setText(Translator.translate("Y axis position")) - self.form.findChild(QtGui.QLabel, "scalesLabel").setText(Translator.translate("Scales")) - self.form.xAuto.setText(Translator.translate("X auto")) - self.form.yAuto.setText(Translator.translate("Y auto")) - self.form.findChild(QtGui.QCheckBox, "allAxes").setText(Translator.translate("Apply to all axes")) - self.form.findChild(QtGui.QLabel, "dimLabel").setText(Translator.translate("Dimensions")) - self.form.findChild(QtGui.QLabel, "xPosLabel").setText(Translator.translate("X axis position")) - self.form.findChild(QtGui.QLabel, "yPosLabel").setText(Translator.translate("Y axis position")) + self.form.setWindowTitle(str(QtGui.QApplication.translate("plot_axes", "Configure axes").toAscii())) + self.form.findChild(QtGui.QLabel, "axesLabel").setText(str(QtGui.QApplication.translate("plot_axes", "Active axes").toAscii())) + self.form.all.setText(str(QtGui.QApplication.translate("plot_axes", "Apply to all axes").toAscii())) + self.form.findChild(QtGui.QLabel, "dimLabel").setText(str(QtGui.QApplication.translate("plot_axes", "Dimensions").toAscii())) + self.form.findChild(QtGui.QLabel, "xPosLabel").setText(str(QtGui.QApplication.translate("plot_axes", "X axis position").toAscii())) + self.form.findChild(QtGui.QLabel, "yPosLabel").setText(str(QtGui.QApplication.translate("plot_axes", "Y axis position").toAscii())) + self.form.findChild(QtGui.QLabel, "scalesLabel").setText(str(QtGui.QApplication.translate("plot_axes", "Scales").toAscii())) + self.form.xAuto.setText(str(QtGui.QApplication.translate("plot_axes", "X auto").toAscii())) + self.form.yAuto.setText(str(QtGui.QApplication.translate("plot_axes", "Y auto").toAscii())) + self.form.findChild(QtGui.QCheckBox, "allAxes").setText(str(QtGui.QApplication.translate("plot_axes", "Apply to all axes").toAscii())) + self.form.findChild(QtGui.QLabel, "dimLabel").setText(str(QtGui.QApplication.translate("plot_axes", "Dimensions").toAscii())) + self.form.findChild(QtGui.QLabel, "xPosLabel").setText(str(QtGui.QApplication.translate("plot_axes", "X axis position").toAscii())) + self.form.findChild(QtGui.QLabel, "yPosLabel").setText(str(QtGui.QApplication.translate("plot_axes", "Y axis position").toAscii())) def onAxesId(self, value): """ Executed when axes index is modified. """ @@ -178,7 +178,7 @@ class TaskPanel: return # Don't remove first axes if not self.form.axId.value(): - msg = Translator.translate("Axes 0 can't be deleted") + msg = str(QtGui.QApplication.translate("plot_axes", "Axes 0 can not be deleted".toAscii())) App.Console.PrintError(msg+"\n") return # Remove axes diff --git a/src/Mod/Plot/plotLabels/TaskPanel.py b/src/Mod/Plot/plotLabels/TaskPanel.py index fe47acbeb..b50262e61 100644 --- a/src/Mod/Plot/plotLabels/TaskPanel.py +++ b/src/Mod/Plot/plotLabels/TaskPanel.py @@ -28,7 +28,7 @@ import FreeCADGui as Gui from PyQt4 import QtGui,QtCore # Module import Plot -from plotUtils import Paths, Translator +from plotUtils import Paths class TaskPanel: def __init__(self): @@ -106,11 +106,11 @@ class TaskPanel: def retranslateUi(self): """ Set user interface locale strings. """ - self.form.setWindowTitle(Translator.translate("Set labels")) - self.form.findChild(QtGui.QLabel, "axesLabel").setText(Translator.translate("Active axes")) - self.form.findChild(QtGui.QLabel, "titleLabel").setText(Translator.translate("Title")) - self.form.findChild(QtGui.QLabel, "xLabel").setText(Translator.translate("X label")) - self.form.findChild(QtGui.QLabel, "yLabel").setText(Translator.translate("Y label")) + self.form.setWindowTitle(str(QtGui.QApplication.translate("plot_labels", "Set labels").toAscii())) + self.form.findChild(QtGui.QLabel, "axesLabel").setText(str(QtGui.QApplication.translate("plot_labels", "Active axes").toAscii())) + self.form.findChild(QtGui.QLabel, "titleLabel").setText(str(QtGui.QApplication.translate("plot_labels", "Title").toAscii())) + self.form.findChild(QtGui.QLabel, "xLabel").setText(str(QtGui.QApplication.translate("plot_labels", "X label").toAscii())) + self.form.findChild(QtGui.QLabel, "yLabel").setText(str(QtGui.QApplication.translate("plot_labels", "Y label").toAscii())) def onAxesId(self, value): """ Executed when axes index is modified. """ diff --git a/src/Mod/Plot/plotPositions/TaskPanel.py b/src/Mod/Plot/plotPositions/TaskPanel.py index a5737d396..bf409fdea 100644 --- a/src/Mod/Plot/plotPositions/TaskPanel.py +++ b/src/Mod/Plot/plotPositions/TaskPanel.py @@ -28,7 +28,7 @@ import FreeCADGui as Gui from PyQt4 import QtGui,QtCore # Module import Plot -from plotUtils import Paths, Translator +from plotUtils import Paths class TaskPanel: def __init__(self): @@ -97,9 +97,9 @@ class TaskPanel: def retranslateUi(self): """ Set user interface locale strings. """ - self.form.setWindowTitle(Translator.translate("Set positions and sizes")) - self.form.findChild(QtGui.QLabel, "posLabel").setText(Translator.translate("Position")) - self.form.findChild(QtGui.QLabel, "sizeLabel").setText(Translator.translate("Size")) + self.form.setWindowTitle(str(QtGui.QApplication.translate("plot_positions", "Set positions and sizes").toAscii())) + self.form.findChild(QtGui.QLabel, "posLabel").setText(str(QtGui.QApplication.translate("plot_positions", "Position").toAscii())) + self.form.findChild(QtGui.QLabel, "sizeLabel").setText(str(QtGui.QApplication.translate("plot_positions", "Size").toAscii())) def onItem(self, row): """ Executed when selected item is modified. """ diff --git a/src/Mod/Plot/plotSave/TaskPanel.py b/src/Mod/Plot/plotSave/TaskPanel.py index f545d9ff5..051184710 100644 --- a/src/Mod/Plot/plotSave/TaskPanel.py +++ b/src/Mod/Plot/plotSave/TaskPanel.py @@ -29,7 +29,7 @@ import FreeCADGui as Gui from PyQt4 import QtGui,QtCore # Module import Plot -from plotUtils import Paths, Translator +from plotUtils import Paths class TaskPanel: def __init__(self): @@ -38,7 +38,7 @@ class TaskPanel: def accept(self): plt = Plot.getPlot() if not plt: - msg = Translator.translate("Plot document must be selected in order to save it.") + msg = str(QtGui.QApplication.translate("plot_save", "Plot document must be selected in order to save it").toAscii()) App.Console.PrintError(msg+"\n") return False path = unicode(self.form.path.text()) @@ -102,9 +102,9 @@ class TaskPanel: def retranslateUi(self): """ Set user interface locale strings. """ - self.form.setWindowTitle(Translator.translate("Save figure")) - self.form.findChild(QtGui.QLabel, "sizeLabel").setText(Translator.translate("Inches")) - self.form.findChild(QtGui.QLabel, "dpiLabel").setText(Translator.translate("Dots per Inch")) + self.form.setWindowTitle(str(QtGui.QApplication.translate("plot_save", "Save figure").toAscii())) + self.form.findChild(QtGui.QLabel, "sizeLabel").setText(str(QtGui.QApplication.translate("plot_save", "Inches").toAscii())) + self.form.findChild(QtGui.QLabel, "dpiLabel").setText(str(QtGui.QApplication.translate("plot_save", "Dots per Inch").toAscii())) def updateUI(self): """ Setup UI controls values if possible """ diff --git a/src/Mod/Plot/plotSeries/TaskPanel.py b/src/Mod/Plot/plotSeries/TaskPanel.py index 3d129ebf7..67b1950b4 100644 --- a/src/Mod/Plot/plotSeries/TaskPanel.py +++ b/src/Mod/Plot/plotSeries/TaskPanel.py @@ -28,7 +28,7 @@ import FreeCADGui as Gui from PyQt4 import QtGui,QtCore # Module import Plot -from plotUtils import Paths, Translator +from plotUtils import Paths # matplotlib import matplotlib from matplotlib.lines import Line2D @@ -110,11 +110,11 @@ class TaskPanel: def retranslateUi(self): """ Set user interface locale strings. """ - self.form.setWindowTitle(Translator.translate("Set positions and sizes")) - self.form.isLabel.setText(Translator.translate("No label")) - self.form.remove.setText(Translator.translate("Remove serie")) - self.form.findChild(QtGui.QLabel, "styleLabel").setText(Translator.translate("Line style")) - self.form.findChild(QtGui.QLabel, "markerLabel").setText(Translator.translate("Marker")) + self.form.setWindowTitle(str(QtGui.QApplication.translate("plot_series", "Configure series").toAscii())) + self.form.isLabel.setText(str(QtGui.QApplication.translate("plot_series", "No label").toAscii())) + self.form.remove.setText(str(QtGui.QApplication.translate("plot_series", "Remove serie").toAscii())) + self.form.findChild(QtGui.QLabel, "styleLabel").setText(str(QtGui.QApplication.translate("plot_series", "Line style").toAscii())) + self.form.findChild(QtGui.QLabel, "markerLabel").setText(str(QtGui.QApplication.translate("plot_series", "Marker").toAscii())) def fillStyles(self): """ Fill style combo boxes. """ diff --git a/src/Mod/Plot/plotUtils/Paths.py b/src/Mod/Plot/plotUtils/Paths.py index 8549681c7..b03f3f64a 100644 --- a/src/Mod/Plot/plotUtils/Paths.py +++ b/src/Mod/Plot/plotUtils/Paths.py @@ -24,7 +24,7 @@ import FreeCAD, FreeCADGui, os def modulePath(): - """returns the current Ship design module path + """returns the current Plot module path @return Module path""" path1 = FreeCAD.ConfigGet("AppHomePath") + "Mod/Plot" path2 = FreeCAD.ConfigGet("UserAppData") + "Mod/Plot" @@ -34,9 +34,15 @@ def modulePath(): return path1 def iconsPath(): - """returns the current Ship design module icons path + """returns the current Plot module icons path @return Icons path""" - path = modulePath() + "/Icons" + path = modulePath() + "/resources/icons" + return path + +def translationsPath(): + """returns the current Plot module translations path + @return Icons path""" + path = modulePath() + "/resources/translations" return path def getPathFromFile(fileName): diff --git a/src/Mod/Plot/Icons/Axes.svg b/src/Mod/Plot/resources/icons/Axes.svg similarity index 100% rename from src/Mod/Plot/Icons/Axes.svg rename to src/Mod/Plot/resources/icons/Axes.svg diff --git a/src/Mod/Plot/Icons/Grid.svg b/src/Mod/Plot/resources/icons/Grid.svg similarity index 100% rename from src/Mod/Plot/Icons/Grid.svg rename to src/Mod/Plot/resources/icons/Grid.svg diff --git a/src/Mod/Plot/Icons/Icon.svg b/src/Mod/Plot/resources/icons/Icon.svg similarity index 100% rename from src/Mod/Plot/Icons/Icon.svg rename to src/Mod/Plot/resources/icons/Icon.svg diff --git a/src/Mod/Plot/Icons/Labels.svg b/src/Mod/Plot/resources/icons/Labels.svg similarity index 100% rename from src/Mod/Plot/Icons/Labels.svg rename to src/Mod/Plot/resources/icons/Labels.svg diff --git a/src/Mod/Plot/Icons/Legend.svg b/src/Mod/Plot/resources/icons/Legend.svg similarity index 100% rename from src/Mod/Plot/Icons/Legend.svg rename to src/Mod/Plot/resources/icons/Legend.svg diff --git a/src/Mod/Plot/Icons/Positions.svg b/src/Mod/Plot/resources/icons/Positions.svg similarity index 100% rename from src/Mod/Plot/Icons/Positions.svg rename to src/Mod/Plot/resources/icons/Positions.svg diff --git a/src/Mod/Plot/Icons/Save.svg b/src/Mod/Plot/resources/icons/Save.svg similarity index 100% rename from src/Mod/Plot/Icons/Save.svg rename to src/Mod/Plot/resources/icons/Save.svg diff --git a/src/Mod/Plot/Icons/Series.svg b/src/Mod/Plot/resources/icons/Series.svg similarity index 100% rename from src/Mod/Plot/Icons/Series.svg rename to src/Mod/Plot/resources/icons/Series.svg diff --git a/src/Mod/Plot/resources/translations/Plot.qm b/src/Mod/Plot/resources/translations/Plot.qm new file mode 100644 index 000000000..be651eede --- /dev/null +++ b/src/Mod/Plot/resources/translations/Plot.qm @@ -0,0 +1 @@ +<¸dÊÍ!¿`¡½Ý \ No newline at end of file diff --git a/src/Mod/Plot/resources/translations/Plot.ts b/src/Mod/Plot/resources/translations/Plot.ts new file mode 100644 index 000000000..b74f108cd --- /dev/null +++ b/src/Mod/Plot/resources/translations/Plot.ts @@ -0,0 +1,241 @@ + + + + plot + + + Save plot + + + + + Configure axes + + + + + Configure axes parameters + + + + + Configure series + + + + + Configure series drawing style and label + + + + + Grid must be activated on top of a plot document + + + + + Show/Hide grid + + + + + Show/Hide grid on selected plot + + + + + Legend must be activated on top of a plot document + + + + + Show/Hide legend + + + + + Show/Hide legend on selected plot + + + + + Set labels + + + + + Set title and axes labels + + + + + Set positions and sizes + + + + + Set labels and legend positions and sizes + + + + + matplotlib not found, Plot module will be disabled + + + + + Save plot as image file + + + + + matplotlib not found, so Plot module can not be loaded + + + + + plot_axes + + + Configure axes + + + + + Active axes + + + + + Apply to all axes + + + + + Dimensions + + + + + X axis position + + + + + Y axis position + + + + + Scales + + + + + X auto + + + + + Y auto + + + + + plot_labels + + + Set labels + + + + + Active axes + + + + + Title + + + + + X label + + + + + Y label + + + + + plot_positions + + + Set positions and sizes + + + + + Position + + + + + Size + + + + + plot_save + + + Save figure + + + + + Inches + + + + + Dots per Inch + + + + + Plot document must be selected in order to save it + + + + + plot_series + + + No label + + + + + Remove serie + + + + + Line style + + + + + Marker + + + + + Configure series + + + + diff --git a/src/Mod/Plot/resources/translations/Plot_es-ES.qm b/src/Mod/Plot/resources/translations/Plot_es-ES.qm new file mode 100644 index 000000000..ccb2cc5a9 Binary files /dev/null and b/src/Mod/Plot/resources/translations/Plot_es-ES.qm differ diff --git a/src/Mod/Plot/resources/translations/Plot_es-ES.ts b/src/Mod/Plot/resources/translations/Plot_es-ES.ts new file mode 100644 index 000000000..033a50621 --- /dev/null +++ b/src/Mod/Plot/resources/translations/Plot_es-ES.ts @@ -0,0 +1,241 @@ + + + + plot + + + matplotlib not found, Plot module will be disabled + No se puede encontrar matplotlib, el modulo de graficado sera desactivado + + + + Save plot + Guardar gráfica + + + + Save plot as image file + Guarda la gráfica como archivo de imagen + + + + Configure axes + Configure los ejes + + + + Configure axes parameters + Establezca los parámetros de cada eje + + + + Configure series + Configure las series trazadas + + + + Configure series drawing style and label + Establezca el título y el estilo de las curvas trazadas + + + + Grid must be activated on top of a plot document + Para activar la malla se requiere un documento de grafica seleccionado + + + + Show/Hide grid + Mostrar/Ocultar la malla + + + + Show/Hide grid on selected plot + Muestre/Oculte la malla del gráfico seleccionado + + + + Legend must be activated on top of a plot document + Para activar la legenda se requiere un documento de grafica seleccionado + + + + Show/Hide legend + Mostrar/Ocultar la legenda + + + + Show/Hide legend on selected plot + Muestre/Oculte la legenda del gráfico seleccionado + + + + Set labels + Establecer títulos + + + + Set title and axes labels + Establezca los tñitulos de ejes y series de datos + + + + Set positions and sizes + Modificar posiciones y tamaños + + + + Set labels and legend positions and sizes + Modifique la posición y tamaño de títulos y legenda + + + + matplotlib not found, so Plot module can not be loaded + No se puede encontrar matplotlib, y por tanto no se puede cargar el modulo de graficado + + + + plot_axes + + + Configure axes + Configuración de los ejes + + + + Active axes + Ejes activos + + + + Apply to all axes + Aplicar a todos los ejes + + + + Dimensions + Dimensiones + + + + X axis position + Posición del eje X + + + + Y axis position + Posición del eje Y + + + + Scales + Escalas + + + + X auto + Automatica en X + + + + Y auto + + + + + plot_labels + + + Set labels + Selección de títulos + + + + Active axes + Ejes activos + + + + Title + Título + + + + X label + Título del eje X + + + + Y label + Título del eje Y + + + + plot_positions + + + Set positions and sizes + Selección de posiciones y tamaños + + + + Position + Posición + + + + Size + Tamaño + + + + plot_save + + + Save figure + Guardar figura + + + + Inches + Pulgadas + + + + Dots per Inch + Puntos por pulgada + + + + Plot document must be selected in order to save it + Debe seleccionar una grafica primero + + + + plot_series + + + Configure series + Configurar series de datos + + + + No label + Sin título + + + + Remove serie + Eliminar serie + + + + Line style + Estilo de línea + + + + Marker + Marcador + + +