How to translate and compile GoldenDict in other language

From GoldenDict Wiki

Jump to: navigation, search

Here you find basic instructions to translate and compile GoldenDict in your language.

Contents

Download the necessary

  • Download and install last compiled GoldenDict available from official site
  • Download and install last QT SDK available from Nokia site.

The QT SDK will install the compiler QT Creator and the translation tool QT Language.

  • Download and extract in a new folder, the sources of last GoldenDict master available.

If you extract this context in C:\GoldenDict, inside you'll find the typical source folder called goldendict-goldendict, so the full path will be C:\GoldenDict\goldendict-goldendict

Configuration of source and translation files

From the Programs files folder, copy the installed GoldenDict into the source folder and rename the new copy as "release". The resulting path will be C:\GoldenDict\goldendict-goldendict\release. The folder release will be used to compile GoldenDict and tested it with your translation.

Before continuing it's raccomanded to update any QT files on GoldenDict. From the source directory open the folder release and replace the file mingwm10.dll and any Qt*.* file here shown with the files that you'll find on C:\Qt using the Windows file searcher.

To prepare the translation, from the source path open the folder locale and duplicate one .ts file that you prefer. For example, copy the file ru_RU.ts and save it as xx_XX.ts. Replace the xx_XX with your language initial as shown on the language table; if you're translating the software in French, your file should be renamed as fr_FR.ts.

Translate software

Run QT Language and open your language file xx_XX.ts. From the Edit menu, click Translation file settings and change your target and country language.

During the translation it's a good idea to save your translation as your own glossary. This it's useful during a new translation update. To do this, click the command “New phrase book” and save your dictionary. When you'll translate any single sentence, push CTRL T and you'll save save it in your phrase book.

Now you're ready to translate GoldendDict. Save your file and start. On the left panel, you'll see the list of Context and on the right the String list of selected context. Select a string and translate it on its translation box.

NOTE: don't worry if some string could not be translated, that are just obsolete strings that will not appears on the software. If you want to correct or to delete obsolete translation (of the original language that you had copied), edit your file with text editor as “Notepad.exe”. You can recognize old translation by the initial tag <translation type="obsolete">. For example a string could be shown as: <translation type="obsolete">OLD EXISTING TRANSLATION</translation>.

When you'll finish the translation, from the File menu, Release your translation. Copy your released file xx_XX.qm into the folder goldendict-goldendict\release\locale.

NOTE: Before continuing you should Release any translation file because those should be required by GoldendDict project.

Compile software

Run QT Creator and open the project file goldendict-goldendict\goldendict.pro. On the left panel click the icon Projects and it will appears the Build Settings.

  • As Edit the build configuration choose the option Release. In the field build directory browse the folder of the goldendict.pro file. Now you'll see the folder C:\GoldenDict\goldendict-goldendict
  • As Edit the build configuration choose the option Debug. In the field build directory browse the folder of the goldendict.pro file. Now you'll see the folder C:\GoldenDict\goldendict-goldendict

Click the command Run qmake from the Build menu and then compile GoldenDict clicking Build all from the same menu. The new GoldenDict.exe will replace the existing file on release folder.

Test your translation and when you'll finish send it to the author:

NOTE: Before to start GoldenDict compile process, take in mind that the source should require some translation file. So if you encounter a mistake of this nature, come back to the previous point Translate software.

Personal tools