Mercurial > hg > octave-avbm
changeset 13468:519ae5ea6bd4
Translated Quint to German.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Mon, 18 Apr 2011 00:14:40 +0200 |
parents | df787fd0a6e5 |
children | a20f8763105f |
files | gui//Quint.pro gui//src/FilesDockWidget.cpp gui//src/HistoryDockWidget.cpp gui//src/MainWindow.cpp gui//src/Quint.cpp gui//src/VariablesDockWidget.cpp gui/languages/german gui/languages/german.qm |
diffstat | 8 files changed, 214 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/gui//Quint.pro +++ b/gui//Quint.pro @@ -93,3 +93,5 @@ #LIBS += $$LFLAGS -lutil QMAKE_LFLAGS += $$LFLAGS -lutil QMAKE_CXXFLAGS += $$INCFLAGS + +TRANSLATIONS += languages/german
--- a/gui//src/FilesDockWidget.cpp +++ b/gui//src/FilesDockWidget.cpp @@ -6,7 +6,7 @@ FilesDockWidget::FilesDockWidget(QWidget *parent) : QDockWidget(parent) { setObjectName("FilesDockWidget"); - setWindowTitle("Current Folder"); + setWindowTitle(tr("Current Folder")); setWidget(new QWidget(this)); // Create a toolbar
--- a/gui//src/HistoryDockWidget.cpp +++ b/gui//src/HistoryDockWidget.cpp @@ -38,7 +38,7 @@ m_historyListView->setEditTriggers(QAbstractItemView::NoEditTriggers); QHBoxLayout *layout = new QHBoxLayout(); - setWindowTitle("Command History"); + setWindowTitle(tr("Command History")); setWidget(new QWidget()); layout->addWidget(m_historyListView); @@ -50,12 +50,12 @@ void HistoryDockWidget::updateHistory(string_vector historyEntries) { QStringList stringList = m_historyListModel->stringList(); - for(size_t i = 0; i < historyEntries.length(); i++) { + for(int i = 0; i < historyEntries.length(); i++) { QString command(historyEntries[i].c_str()); if(!command.startsWith("#")) { stringList.push_front(command); } } m_historyListModel->setStringList(stringList); - emit information("History updated."); + emit information(tr("History updated.")); }
--- a/gui//src/MainWindow.cpp +++ b/gui//src/MainWindow.cpp @@ -39,7 +39,7 @@ } void MainWindow::handleOpenFileRequest(QString fileName) { - reportStatusMessage("Opening file."); + reportStatusMessage(tr("Opening file.")); QPixmap pixmap; if(pixmap.load(fileName)) { ImageViewerMdiSubWindow *subWindow = new ImageViewerMdiSubWindow(pixmap, this); @@ -65,7 +65,7 @@ void MainWindow::handleSaveWorkspaceRequest() { QDesktopServices desktopServices; - QString selectedFile = QFileDialog::getSaveFileName(this, "Save Workspace", + QString selectedFile = QFileDialog::getSaveFileName(this, tr("Save Workspace"), desktopServices.storageLocation(QDesktopServices::HomeLocation) + "/.quint/workspace"); m_octaveTerminal->sendText(QString("save \'%1\'\n").arg(selectedFile)); m_octaveTerminal->setFocus(); @@ -73,7 +73,7 @@ void MainWindow::handleLoadWorkspaceRequest() { QDesktopServices desktopServices; - QString selectedFile = QFileDialog::getOpenFileName(this, "Load Workspace", + QString selectedFile = QFileDialog::getOpenFileName(this, tr("Load Workspace"), desktopServices.storageLocation(QDesktopServices::HomeLocation) + "/.quint/workspace"); m_octaveTerminal->sendText(QString("load \'%1\'\n").arg(selectedFile)); m_octaveTerminal->setFocus(); @@ -91,7 +91,7 @@ void MainWindow::closeEvent(QCloseEvent *closeEvent) { m_isRunning = false; - reportStatusMessage("Saving data and shutting down."); + reportStatusMessage(tr("Saving data and shutting down.")); writeSettings(); m_octaveCallbackThread->terminate(); @@ -116,7 +116,7 @@ void MainWindow::constructWindow() { QStyle *style = QApplication::style(); m_octaveTerminal = new OctaveTerminal(this); - m_generalPurposeToolbar = new QToolBar("Octave Toolbar", this); + m_generalPurposeToolbar = new QToolBar(tr("Octave Toolbar"), this); m_variablesDockWidget = new VariablesDockWidget(this); m_historyDockWidget = new HistoryDockWidget(this); m_filesDockWidget = new FilesDockWidget(this); @@ -125,10 +125,10 @@ m_browserWidget = new BrowserWidget(this); m_serviceWidget = new BrowserWidget(this); m_centralTabWidget = new QTabWidget(this); - m_centralTabWidget->addTab(m_octaveTerminal, "Command Window"); - m_centralTabWidget->addTab(m_openedFiles, "File Editor"); - m_centralTabWidget->addTab(m_browserWidget, "Documentation"); - m_centralTabWidget->addTab(m_serviceWidget, "Service"); + m_centralTabWidget->addTab(m_octaveTerminal, tr("Command Window")); + m_centralTabWidget->addTab(m_openedFiles, tr("File Editor")); + m_centralTabWidget->addTab(m_browserWidget, tr("Documentation")); + m_centralTabWidget->addTab(m_serviceWidget, tr("Service")); // TODO: Add meaningfull toolbar items. QAction *commandAction = new QAction(style->standardIcon(QStyle::SP_CommandLink), @@ -176,5 +176,5 @@ dup2 (fds, 1); dup2 (fds, 2); m_octaveTerminal->openTeletype(fdm); - reportStatusMessage("Established link to Octave."); + reportStatusMessage(tr("Established link to Octave.")); }
--- a/gui//src/Quint.cpp +++ b/gui//src/Quint.cpp @@ -17,13 +17,25 @@ */ #include <QtGui/QApplication> +#include <QTranslator> +#include <QSettings> #include "MainWindow.h" int main(int argc, char *argv[]) { - QApplication a(argc, argv); + QApplication application(argc, argv); + + QDesktopServices desktopServices; + QSettings settings( + desktopServices.storageLocation(QDesktopServices::HomeLocation) + + "/.quint/settings.ini", QSettings::IniFormat); + + QTranslator translator; + translator.load(QString("../languages/%1.qm").arg(settings.value("application/language").toString())); + application.installTranslator(&translator); + MainWindow w; w.show(); - return a.exec(); + return application.exec(); }
--- a/gui//src/VariablesDockWidget.cpp +++ b/gui//src/VariablesDockWidget.cpp @@ -12,13 +12,13 @@ void VariablesDockWidget::construct() { m_updateSemaphore = new QSemaphore(1); QStringList headerLabels; - headerLabels << "Name" << "Type" << "Value"; + headerLabels << tr("Name") << tr("Type") << tr("Value"); m_variablesTreeWidget = new QTreeWidget(this); m_variablesTreeWidget->setHeaderHidden(false); m_variablesTreeWidget->setHeaderLabels(headerLabels); QVBoxLayout *layout = new QVBoxLayout(); - setWindowTitle("Workspace"); + setWindowTitle(tr("Workspace")); setWidget(new QWidget()); layout->addWidget(m_variablesTreeWidget); @@ -26,9 +26,9 @@ layout->addWidget(buttonBar); QHBoxLayout *buttonBarLayout = new QHBoxLayout(); - QPushButton *saveWorkspaceButton = new QPushButton("Save", buttonBar); - QPushButton *loadWorkspaceButton = new QPushButton("Load", buttonBar); - QPushButton *clearWorkspaceButton = new QPushButton("Clear", buttonBar); + QPushButton *saveWorkspaceButton = new QPushButton(tr("Save"), buttonBar); + QPushButton *loadWorkspaceButton = new QPushButton(tr("Load"), buttonBar); + QPushButton *clearWorkspaceButton = new QPushButton(tr("Clear"), buttonBar); buttonBarLayout->addWidget(saveWorkspaceButton); buttonBarLayout->addWidget(loadWorkspaceButton); buttonBarLayout->addWidget(clearWorkspaceButton); @@ -43,19 +43,19 @@ connect(clearWorkspaceButton, SIGNAL(clicked()), this, SLOT(emitClearWorkspace())); QTreeWidgetItem *treeWidgetItem = new QTreeWidgetItem(); - treeWidgetItem->setData(0, 0, QString("Local")); + treeWidgetItem->setData(0, 0, QString(tr("Local"))); m_variablesTreeWidget->insertTopLevelItem(0, treeWidgetItem); treeWidgetItem = new QTreeWidgetItem(); - treeWidgetItem->setData(0, 0, QString("Global")); + treeWidgetItem->setData(0, 0, QString(tr("Global"))); m_variablesTreeWidget->insertTopLevelItem(1, treeWidgetItem); treeWidgetItem = new QTreeWidgetItem(); - treeWidgetItem->setData(0, 0, QString("Persistent")); + treeWidgetItem->setData(0, 0, QString(tr("Persistent"))); m_variablesTreeWidget->insertTopLevelItem(2, treeWidgetItem); treeWidgetItem = new QTreeWidgetItem(); - treeWidgetItem->setData(0, 0, QString("Hidden")); + treeWidgetItem->setData(0, 0, QString(tr("Hidden"))); m_variablesTreeWidget->insertTopLevelItem(3, treeWidgetItem); m_variablesTreeWidget->expandAll();
new file mode 100644 --- /dev/null +++ b/gui/languages/german @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="de_DE"> +<context> + <name>FilesDockWidget</name> + <message> + <location filename="../src/FilesDockWidget.cpp" line="9"/> + <source>Current Folder</source> + <translation>Aktuelles Verzeichnis</translation> + </message> +</context> +<context> + <name>HistoryDockWidget</name> + <message> + <location filename="../src/HistoryDockWidget.cpp" line="41"/> + <source>Command History</source> + <translation>Befehlshistorie</translation> + </message> + <message> + <location filename="../src/HistoryDockWidget.cpp" line="60"/> + <source>History updated.</source> + <translation>Befehlshistorie aktualisiert.</translation> + </message> +</context> +<context> + <name>MainWindow</name> + <message> + <location filename="../src/MainWindow.cpp" line="42"/> + <source>Opening file.</source> + <translation>Öffne Datei.</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="68"/> + <source>Save Workspace</source> + <translation>Speichere Arbeitsumgebung</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="76"/> + <source>Load Workspace</source> + <translation>Lade Arbeitsumgebung</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="94"/> + <source>Saving data and shutting down.</source> + <translation>Speichere Daten und schließe.</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="119"/> + <source>Octave Toolbar</source> + <translation>Octave Werkzeugleiste</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="128"/> + <source>Command Window</source> + <translation>Konsolenfenster</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="129"/> + <source>File Editor</source> + <translation>Dateieditor</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="130"/> + <source>Documentation</source> + <translation>Dokumentation</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="131"/> + <source>Service</source> + <translation>Service</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="179"/> + <source>Established link to Octave.</source> + <translation>Verbindung zu Octave hergestellt.</translation> + </message> +</context> +<context> + <name>NumberBar</name> + <message> + <location filename="../src/NumberedCodeEdit.cpp" line="189"/> + <source>Stop Here</source> + <translation>Stoppe hier</translation> + </message> + <message> + <location filename="../src/NumberedCodeEdit.cpp" line="192"/> + <source>Current Line</source> + <translation>Aktuelle Zeile</translation> + </message> + <message> + <location filename="../src/NumberedCodeEdit.cpp" line="195"/> + <source>Error Line</source> + <translation>Fehlerzeile</translation> + </message> +</context> +<context> + <name>NumberedCodeEdit</name> + <message> + <location filename="../src/NumberedCodeEdit.cpp" line="387"/> + <source>This file name is not valid.</source> + <translation>Dieser Dateiname ist nicht gültig.</translation> + </message> + <message> + <location filename="../src/NumberedCodeEdit.cpp" line="388"/> + <source>Octave doesn't understand this file name: +</source> + <translation>Octave versteht diesen Dateityp nicht:</translation> + </message> + <message> + <location filename="../src/NumberedCodeEdit.cpp" line="388"/> + <source> +Please, change it. + Do you want to save your changes?</source> + <translation>Bitte ändern Sie dies. Möchten Sie Ihre Änderungen sichern?</translation> + </message> +</context> +<context> + <name>VariablesDockWidget</name> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="15"/> + <source>Name</source> + <translation>Bezeichner</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="15"/> + <source>Type</source> + <translation>Typ</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="15"/> + <source>Value</source> + <translation>Wert</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="21"/> + <source>Workspace</source> + <translation>Arbeitsumgebung</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="29"/> + <source>Save</source> + <translation>Sichern</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="30"/> + <source>Load</source> + <translation>Laden</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="31"/> + <source>Clear</source> + <translation>Löschen</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="46"/> + <source>Local</source> + <translation>Lokal</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="50"/> + <source>Global</source> + <translation>Global</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="54"/> + <source>Persistent</source> + <translation>Persistent</translation> + </message> + <message> + <location filename="../src/VariablesDockWidget.cpp" line="58"/> + <source>Hidden</source> + <translation>Versteckt</translation> + </message> +</context> +</TS>
new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..13cd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