Prerequisites
To be able to translate GNS3, you need to install Qt Linguist and an associated tool called lrelease.
Microsoft Windows
On Windows you have to install Qt (mingw version), it is available here:
http://trolltech.com/developer/downloads/qt/windows
Ubuntu 7.10 (Gutsy)
On Ubuntu Gutsy you just need to install those packages:
sudo apt-get install libqt4-dev qt4-dev-tools
Gentoo
If you are a Gentoo user, all you need is to emerge the Qt4 library:
emerge -av '>=x11-libs/qt-4.3.1'
Translating
Update an existing translation
If GNS3 hasn't been translated in your language, go to the next section. Instead, if there are untranslated or not correctly translated strings, you should consider to update the translation.
To do so, download the latest translation:
http://code.gns3.net/gns3-devel/raw-file/tip/src/GNS3/Langs/Lang_CODE.ts
Don't forget to replace CODE with your country/language code, you can get a list of the current translated languages on the Team page. Now you can jump directly to the Translate strings section.
Create a new translation
If GNS3 is currently not available into your language, then this section is for you.
First, download the latest skeleton translation (based on English):
http://code.gns3.net/gns3-devel/raw-file/tip/src/GNS3/Langs/Lang_en.ts
Then go to the next section ...
Translate strings
Start Qt4 Linguist (Unix command: linguist, on Windows C:\Qt\4.3.0\bin\linguist.exe by default), then open the file you have previously downloaded and set your language / country under “Translation File Settings” window that is available from the Edit menu.
You can now do the translation. To learn how to use Qt linguist, please see this One Minute guide:
http://doc.trolltech.com/4.3.0/linguist-translators.html
Note: the “English” string in the MainWindow context will be displayed as your language name in the GNS3 Preference Dialog.
Translate Qt strings
GNS3 uses some Qt boxes like QMessageBox to show errors, QFileDialog to open a filesystem explorer etc. This boxes contain strings that cannot be marked as untranslated in GNS3 .ts files, you have to translate another .ts file.
Trolltech, the company which develop Qt, provide some translation files but not for all languages. To know if a Qt translation file for your language exists, please download this file: http://www.gns3.net/files/qt_translations/qt_CODE.ts (replace CODE with your country/language code).
If this file exist, you should check with Qt4 Linguist that all classes used by GNS3 are well translated. If not you have to download this skeleton file: http://www.gns3.net/files/qt_translations/qt_untranslated.ts you only need to translate the classes used by GNS3 not all strings.
Here is the list of the Qt classes used by GNS3: QAbstractSpinBox, QApplication, QCheckBox, QComboBox, QDialog, QDialogButtonBox, QDockWidget, QFileDialog, QLineEdit, QMenu, QMenuBar, QMessageBox, QProgressDialog, QPushButton, QScrollBar, QSpinBox, QToolButton
Compile and test the translated file
To compile your translation, use the File -> Release As option in Qt Linguist or if you want to do it manually, open a console and go to the directory where the translated file is located, then generate a Qt compiled translation file with the following command:
lrelease Lang_CODE.ts -qm Lang_CODE.qm
To test the Qt compiled translation file, you should place it under the Langs directory:
On Windows: C:\Program Files\gns3\Langs\Lang_CODE.qm
On Unix (MacOS / Linux): ~/.gns3/Langs/Lang_CODE.qm
Start gns3, your translation should appear in Edit -> Preferences menu
It is working ? Now you can send us your translation (.ts files), we will be very happy to add them in GNS3.