Translating GCstar in other languages

GCstar could be translated in many languages. Every single text that is shown on screen is in a separate file (one for each language).

Preparation

| Top |

First, you should get the last GCstar version available (see Download and installation). It’s even better to get the last CVS version. Read the instructions on Gna! website.

Then to create a new translation, you should copy a folder from:

GENERIC PATH
                     lib/gcstar/GCLang/..

LINUX PATHS
 Ubuntu & Debian     /usr/local/lib/gcstar/GCLang/..
 ...

It has to be renamed according to the 2 letters language code. The references translations are the english and the french ones. So you should better pick one of them as a base for the new translation.

:!: You should always use UTF-8 encoding for all files.

In all the .pm files in the directory you created, you should first change the 2nd line. It contains something such as:

    package GCLang::XY::...

Just replace XY with your language code.

Translating

| Top |

The .pm files are made of lines using this structure:

    MessageIdentifier => 'Text that will be shown to the user',

You should never change the left part, because it is what GCstar uses to find the correct text. But the right part is where the translation should be performed.

Validating translation

| Top |

To test everything is correct, just launch GCstar and change the language to use (First tab of Preferences). You need then to quit and relaunch the application. Then you may try some features and check if there is no problems.

If you used GCstar sources for your test, you may test it without installing the application. Just go into the bin subdirectory and launch:

perl ./gcstar

But there is also another way to check if anything is missing. You need to download the checkLang.pl tool. It should be copied in the same directory where GCstar sources are (the directory where you could find bin, lib and share subdirectories). To check what is missing for your translation, launch from there:

perl ./checkLang.pl XY
Where XY is the language code. This will display something like this:

Lang XY
——-

Errors:

‘OptionsProgramsSystem’ ⇒ ‘Use programs defined by system’,
‘OptionsProgramsUser’ ⇒ ‘Use specified programs’,

GCModels/GCgames.pm ‘Editor’ ⇒ ‘Editor’,
GCModels/GCgames.pm ‘Developer’ ⇒ ‘Developer’,

Warnings:

‘AdvancedSearchCriteria’ ⇒ ‘Criteria’,
‘AdvancedSearchType’ ⇒ ‘Type of search’,

GCImport/GCImportAlexandria.pm ‘Default’ ⇒ ‘Default Alexandria’s directory’,
GCImport/GCImportAlexandria.pm ‘Specified’ ⇒ ‘Directory specified below’,
To determine the problems, it uses the 2 references mentioned above, english and french.

The Errors are strings that are not present in one of your language files. It should not occur if you copied another language and did not remove any line.

The Warnings are strings that are identical to the english or french version. It could be expected (because a word could be identic in 2 languages). But it could also mean that something has not been translated yet.

You may notice that there is 2 parts in the Errors and Warnings. The 1st part is for text that is in the main file (GCstar.pm). And the 2nd one is for translations in sub-directory. In the previous exemple, it means that something should be added in GCModels/GCgames.pm file and that something could have been left untranslated in GCImport/GCImportAlexandria.pm and needs to be changed.

Releasing and Maintaining translations

| Top |

To make your translation available to other users, just open a new topic in forum for developers and contributors or contact project manager. It is recommended that you do so before beginning your work to avoid duplicate translations.

Then please also specify if you wish to maintain this translation for future GCstar versions as there could be new text added. You will be then subscribed to a mailing list where messages are posted when new translations are required. You could only answer to these emails to send the new text, or you may have a direct CVS access so you will be able to directly add your changes. This is up to you to choose your prefered way. For CVS access, operations from project manager are needed.

 
en/translators.txt · Last modified: 23/01/2011 22:10 by 79.44.155.181



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.