Skip to content

Commit

Permalink
- added some tr() in OMPlot
Browse files Browse the repository at this point in the history
- OMEdit: added translation of OMPlot in .ts-files

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11695 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
a-severin committed Apr 9, 2012
1 parent 38b7402 commit 389c8c5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions OMPlot/OMPlotGUI/Legend.cpp
Expand Up @@ -44,15 +44,15 @@ Legend::Legend(Plot *pParent)
mpPlot = pParent;

// create actions for context menu
mpChangeColorAction = new QAction(QString("Change Color"), this);
mpChangeColorAction = new QAction(QString(tr("Change Color")), this);
connect(mpChangeColorAction, SIGNAL(triggered()), this, SLOT(selectColor()));

mpAutomaticColorAction = new QAction(QString("Automatic Color"), this);
mpAutomaticColorAction = new QAction(QString(tr("Automatic Color")), this);
mpAutomaticColorAction->setCheckable(true);
mpAutomaticColorAction->setChecked(true);
connect(mpAutomaticColorAction, SIGNAL(triggered(bool)), this, SLOT(automaticColor(bool)));

mpHideAction = new QAction(QString("Hide"), this);
mpHideAction = new QAction(QString(tr("Hide")), this);
mpHideAction->setCheckable(true);
connect(mpHideAction, SIGNAL(triggered(bool)), this, SLOT(toggleHide(bool)));
}
Expand Down
2 changes: 1 addition & 1 deletion OMPlot/OMPlotGUI/PlotApplication.cpp
Expand Up @@ -104,7 +104,7 @@ bool PlotApplication::notify(QObject *receiver, QEvent *event)
catch (PlotException &e)
{
QMessageBox *msgBox = new QMessageBox();
msgBox->setWindowTitle(QString("OMPlot - Error"));
msgBox->setWindowTitle(QString(tr("OMPlot - Error")));
msgBox->setIcon(QMessageBox::Warning);
msgBox->setText(QString(e.what()));
msgBox->setStandardButtons(QMessageBox::Ok);
Expand Down
4 changes: 2 additions & 2 deletions OMPlot/OMPlotGUI/PlotMainWindow.cpp
Expand Up @@ -86,15 +86,15 @@ void PlotMainWindow::createMenus()
//Create the File menu
mpMenuFile = new QMenu(mpMenuBar);
mpMenuFile->setObjectName("menuFile");
mpMenuFile->setTitle("&File");
mpMenuFile->setTitle(tr("&File"));
//Add the actions to file menu
mpMenuFile->addAction(mpCloseAction);
// add file menu to menubar
mpMenuBar->addAction(mpMenuFile->menuAction());
//Create the Options menu
mpMenuOptions = new QMenu(mpMenuBar);
mpMenuOptions->setObjectName("menuFile");
mpMenuOptions->setTitle("&Options");
mpMenuOptions->setTitle(tr("&Options"));
//Add the actions to Options menu
mpMenuOptions->addAction(mpTabViewAction);
// add options menu to menubar
Expand Down
16 changes: 8 additions & 8 deletions OMPlot/OMPlotGUI/PlotWindow.cpp
Expand Up @@ -166,21 +166,21 @@ void PlotWindow::setupToolbar()
setContextMenuPolicy(Qt::NoContextMenu);
//ZOOM
mpZoomButton = new QToolButton(toolBar);
mpZoomButton->setText("Zoom");
mpZoomButton->setText(tr("Zoom"));
mpZoomButton->setCheckable(true);
connect(mpZoomButton, SIGNAL(toggled(bool)), SLOT(enableZoomMode(bool)));
toolBar->addWidget(mpZoomButton);
toolBar->addSeparator();
//PAN
mpPanButton = new QToolButton(toolBar);
mpPanButton->setText("Pan");
mpPanButton->setText(tr("Pan"));
mpPanButton->setCheckable(true);
connect(mpPanButton, SIGNAL(toggled(bool)), SLOT(enablePanMode(bool)));
toolBar->addWidget(mpPanButton);
toolBar->addSeparator();
//Fit in View
QToolButton *fitInViewButton = new QToolButton(toolBar);
fitInViewButton->setText("Fit in View");
fitInViewButton->setText(tr("Fit in View"));
connect(fitInViewButton, SIGNAL(clicked()), SLOT(fitInView()));
toolBar->addWidget(fitInViewButton);
toolBar->addSeparator();
Expand All @@ -191,31 +191,31 @@ void PlotWindow::setupToolbar()
pViewsButtonGroup->addButton(mpPanButton);
//EXPORT
QToolButton *btnExport = new QToolButton(toolBar);
btnExport->setText("Save");
btnExport->setText(tr("Save"));
//btnExport->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
connect(btnExport, SIGNAL(clicked()), SLOT(exportDocument()));
toolBar->addWidget(btnExport);
toolBar->addSeparator();
//PRINT
QToolButton *btnPrint = new QToolButton(toolBar);
btnPrint->setText("Print");
btnPrint->setText(tr("Print"));
connect(btnPrint, SIGNAL(clicked()), SLOT(printPlot()));
toolBar->addWidget(btnPrint);
toolBar->addSeparator();
//GRID
mpGridButton = new QToolButton(toolBar);
mpGridButton->setText("Grid");
mpGridButton->setText(tr("Grid"));
mpGridButton->setCheckable(true);
mpGridButton->setChecked(true);
connect(mpGridButton, SIGNAL(toggled(bool)), SLOT(setGrid(bool)));
toolBar->addWidget(mpGridButton);
toolBar->addSeparator();
//LOG x LOG y
mpLogXCheckBox = new QCheckBox("Log X", this);
mpLogXCheckBox = new QCheckBox(tr("Log X"), this);
connect(mpLogXCheckBox, SIGNAL(toggled(bool)), SLOT(setLogX(bool)));
toolBar->addWidget(mpLogXCheckBox);
toolBar->addSeparator();
mpLogYCheckBox = new QCheckBox("Log Y", this);
mpLogYCheckBox = new QCheckBox(tr("Log Y"), this);
connect(mpLogYCheckBox, SIGNAL(toggled(bool)), SLOT(setLogY(bool)));
toolBar->addWidget(mpLogYCheckBox);
// finally add the tool bar to the mainwindow
Expand Down

0 comments on commit 389c8c5

Please sign in to comment.