Mercurial > hg > octave-nkf
changeset 13551:ad905cd33563
Hotfixed language support.
author | Jacob Dawid <jacob.dawid@googlemail.com> |
---|---|
date | Wed, 27 Jul 2011 13:54:32 +0200 |
parents | cd66481d55b0 |
children | 324adf6109e7 |
files | gui/languages/german gui/src/OctaveGUI.cpp gui/src/ResourceManager.cpp gui/src/ResourceManager.h |
diffstat | 4 files changed, 348 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/languages/german +++ b/gui/languages/german @@ -2,172 +2,459 @@ <!DOCTYPE TS> <TS version="2.0" language="de_DE"> <context> + <name>FileEditorMdiSubWindow</name> + <message> + <location filename="../src/FileEditorMdiSubWindow.cpp" line="79"/> + <location filename="../src/FileEditorMdiSubWindow.cpp" line="172"/> + <source>File Editor</source> + <translation type="unfinished">Dateieditor</translation> + </message> + <message> + <location filename="../src/FileEditorMdiSubWindow.cpp" line="80"/> + <source>Cannot read file %1: +%2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FileEditorMdiSubWindow.cpp" line="92"/> + <source>File loaded.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FileEditorMdiSubWindow.cpp" line="118"/> + <source>Do you want to save the current file +%1 ?</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FileEditorMdiSubWindow.cpp" line="173"/> + <source>Cannot write file %1: +%2.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FileEditorMdiSubWindow.cpp" line="185"/> + <source>File %1 saved</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>FilesDockWidget</name> <message> - <location filename="../src/FilesDockWidget.cpp" line="9"/> + <location filename="../src/FilesDockWidget.cpp" line="32"/> <source>Current Folder</source> <translation>Aktuelles Verzeichnis</translation> </message> + <message> + <location filename="../src/FilesDockWidget.cpp" line="46"/> + <source>Move up one directory.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FilesDockWidget.cpp" line="49"/> + <source>Enter the path or filename.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/FilesDockWidget.cpp" line="78"/> + <source>Doubleclick a file to open it.</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>HistoryDockWidget</name> <message> + <location filename="../src/HistoryDockWidget.cpp" line="36"/> + <source>Doubleclick a command to transfer it to the terminal.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/HistoryDockWidget.cpp" line="38"/> + <source>Enter text to filter the command history.</source> + <translation type="unfinished"></translation> + </message> + <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> + <translation type="obsolete">Befehlshistorie aktualisiert.</translation> </message> </context> <context> <name>MainWindow</name> <message> - <location filename="../src/MainWindow.cpp" line="42"/> + <location filename="../src/MainWindow.cpp" line="46"/> <source>Opening file.</source> <translation>Öffne Datei.</translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="68"/> + <location filename="../src/MainWindow.cpp" line="79"/> <source>Save Workspace</source> <translation>Speichere Arbeitsumgebung</translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="76"/> + <location filename="../src/MainWindow.cpp" line="89"/> <source>Load Workspace</source> <translation>Lade Arbeitsumgebung</translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="94"/> + <location filename="../src/MainWindow.cpp" line="171"/> + <location filename="../src/MainWindow.cpp" line="302"/> + <source>About Octave</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="183"/> <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> + <location filename="../src/MainWindow.cpp" line="225"/> + <source>View the variables in the active workspace.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="227"/> + <source>Browse and search the command history.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="229"/> + <source>Browse your files.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="245"/> + <source>Terminal</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="247"/> + <source>Enter your commands into the Octave terminal.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="257"/> + <source>Browse the Octave documentation for help.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="266"/> + <source>Chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="268"/> + <source>Instantly chat with other Octave users for help.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="270"/> + <source>Octave</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="271"/> + <source>Settings</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="273"/> + <source>Exit</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="275"/> + <source>Interface</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="277"/> + <source>Align Windows</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="128"/> - <source>Command Window</source> - <translation>Konsolenfenster</translation> + <location filename="../src/MainWindow.cpp" line="279"/> + <location filename="../src/MainWindow.cpp" line="291"/> + <source>Workspace</source> + <translation type="unfinished">Arbeitsumgebung</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="282"/> + <source>History</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="285"/> + <source>File Browser</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="289"/> + <source>Open New Editor Window</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="292"/> + <source>Load</source> + <translation type="unfinished">Laden</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="293"/> + <source>Save</source> + <translation type="unfinished">Sichern</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="295"/> + <source>Clear</source> + <translation type="unfinished">Löschen</translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="129"/> - <source>File Editor</source> - <translation>Dateieditor</translation> + <location filename="../src/MainWindow.cpp" line="297"/> + <source>Community</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="298"/> + <source>Report Bug</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="299"/> + <source>Agora</source> + <translation type="unfinished"></translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="130"/> + <location filename="../src/MainWindow.cpp" line="300"/> + <source>Octave Forge</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="303"/> + <source>About Qt</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Octave Toolbar</source> + <translation type="obsolete">Octave Werkzeugleiste</translation> + </message> + <message> + <source>Command Window</source> + <translation type="obsolete">Konsolenfenster</translation> + </message> + <message> + <source>File Editor</source> + <translation type="obsolete">Dateieditor</translation> + </message> + <message> + <location filename="../src/MainWindow.cpp" line="255"/> <source>Documentation</source> <translation>Dokumentation</translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="131"/> <source>Service</source> - <translation>Service</translation> + <translation type="obsolete">Service</translation> </message> <message> - <location filename="../src/MainWindow.cpp" line="179"/> <source>Established link to Octave.</source> - <translation>Verbindung zu Octave hergestellt.</translation> + <translation type="obsolete">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> + <translation type="obsolete">Stoppe hier</translation> </message> <message> - <location filename="../src/NumberedCodeEdit.cpp" line="192"/> <source>Current Line</source> - <translation>Aktuelle Zeile</translation> + <translation type="obsolete">Aktuelle Zeile</translation> </message> <message> - <location filename="../src/NumberedCodeEdit.cpp" line="195"/> <source>Error Line</source> - <translation>Fehlerzeile</translation> + <translation type="obsolete">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> + <translation type="obsolete">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> + <translation type="obsolete">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> + <translation type="obsolete">Bitte ändern Sie dies. Möchten Sie Ihre Änderungen sichern?</translation> + </message> +</context> +<context> + <name>SettingsDialog</name> + <message> + <location filename="../src/SettingsDialog.ui" line="29"/> + <source>Settings</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="39"/> + <source>Chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="47"/> + <source>Connect to #octave on startup</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="57"/> + <source>Show message of the day</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="64"/> + <source>Show topic</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="71"/> + <source>Automatically identify on NickServ</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="78"/> + <source>Warning: Your password will be stored in ~/.octavegui in human-readable format. Do not enter your password if you worry about security issues.</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="103"/> + <source>Password:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="125"/> + <source>Editor</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="133"/> + <source>Use custom file editor:</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="143"/> + <source>emacs</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="166"/> + <source>File Browser</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="172"/> + <source>Show filenames</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="179"/> + <source>Show file size</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="186"/> + <source>Show file type</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="193"/> + <source>Show date of last modification</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="200"/> + <source>Show hidden files</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="207"/> + <source>Alternating row colors</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="223"/> + <source>Reset to defaults</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="246"/> + <source>Export</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../src/SettingsDialog.ui" line="256"/> + <source>Import</source> + <translation type="unfinished"></translation> </message> </context> <context> <name>VariablesDockWidget</name> <message> - <location filename="../src/VariablesDockWidget.cpp" line="15"/> + <location filename="../src/VariablesDockWidget.cpp" line="40"/> <source>Name</source> <translation>Bezeichner</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="15"/> + <location filename="../src/VariablesDockWidget.cpp" line="40"/> <source>Type</source> <translation>Typ</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="15"/> + <location filename="../src/VariablesDockWidget.cpp" line="40"/> <source>Value</source> <translation>Wert</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="21"/> + <location filename="../src/VariablesDockWidget.cpp" line="36"/> <source>Workspace</source> <translation>Arbeitsumgebung</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="29"/> <source>Save</source> - <translation>Sichern</translation> + <translation type="obsolete">Sichern</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="30"/> <source>Load</source> - <translation>Laden</translation> + <translation type="obsolete">Laden</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="31"/> <source>Clear</source> - <translation>Löschen</translation> + <translation type="obsolete">Löschen</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="46"/> + <location filename="../src/VariablesDockWidget.cpp" line="52"/> <source>Local</source> <translation>Lokal</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="50"/> + <location filename="../src/VariablesDockWidget.cpp" line="56"/> <source>Global</source> <translation>Global</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="54"/> + <location filename="../src/VariablesDockWidget.cpp" line="60"/> <source>Persistent</source> <translation>Persistent</translation> </message> <message> - <location filename="../src/VariablesDockWidget.cpp" line="58"/> + <location filename="../src/VariablesDockWidget.cpp" line="64"/> <source>Hidden</source> <translation>Versteckt</translation> </message>
--- a/gui/src/OctaveGUI.cpp +++ b/gui/src/OctaveGUI.cpp @@ -31,11 +31,13 @@ commandLineParser.registerOption ("--config", "-c", "Tells OctaveGUI to use that configuration file.", true); commandLineParser.parse (argc, argv); - // QSettings *settings = ResourceManager::instance ()->instance (); + QSettings *settings = ResourceManager::instance ()->settings (); + QString language = settings->value ("language").toString (); - // TODO: reimplement translation. - // translator.load (translatorFile); - // application.installTranslator (&translator); + QString translatorFile = ResourceManager::instance ()->findTranslatorFile (language); + QTranslator translator; + translator.load (translatorFile); + application.installTranslator (&translator); MainWindow w; w.show ();
--- a/gui/src/ResourceManager.cpp +++ b/gui/src/ResourceManager.cpp @@ -51,3 +51,10 @@ delete m_settings; m_settings = new QSettings (file, QSettings::IniFormat); } + +QString +ResourceManager::findTranslatorFile (QString language) +{ + // TODO: Quick hack to be able to test language files. + return QString("../languages/%1.qm").arg(language); +}