Difference between revisions of "Translating"

From Gestinux Wiki
Jump to navigation Jump to search
(Links)
(remove gestinux.net)
 
(29 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#CustomTitle:How to translate Gestinux}}
+
{{DISPLAYTITLE:How to translate Gestinux}}
  
 
This page explains how to translate Gestinux without knowing much about Pascal or other programming languages or the Lazarus IDE.
 
This page explains how to translate Gestinux without knowing much about Pascal or other programming languages or the Lazarus IDE.
Line 7: Line 7:
 
== Where do you start translating, and what should you then move on to translate thereafter? ==
 
== Where do you start translating, and what should you then move on to translate thereafter? ==
  
Ideally, you should start [[Translating#Translating the software|to translate the software]] itself, before starting to translate any documentation.
+
You should start [[Translating#Translating the software|to translate the software]] itself, before starting to translate any documentation.
  
 
The translated software will be used to [[Translating#Providing translation data|create a set of test data]] and make fresh screenshots showing the newly translated language.
 
The translated software will be used to [[Translating#Providing translation data|create a set of test data]] and make fresh screenshots showing the newly translated language.
Line 15: Line 15:
 
== Translating the software ==
 
== Translating the software ==
  
Only version 1.0 of Gestinux needs to be translated. The following paragraphs cover the various steps involved in completing your translation task.
+
The following paragraphs cover the various steps involved in completing your translation task.
  
If you understand English, you can consult the [[Internationalisation_programmation|internal translation mechanism]] for more information.
+
You can consult the [[Internationalisation_programmation|internal translation mechanism]] for more information.
  
 
=== The code for your language ===
 
=== The code for your language ===
Line 23: Line 23:
 
Before starting a new translation, you must discover what code applies to the language you are translating.
 
Before starting a new translation, you must discover what code applies to the language you are translating.
  
Languages ​​are identified in accordance with standard Gestinux [http://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html POSIX] codes, which all have the double xx_YY format.
+
Languages ​​are identified in accordance with standard [http://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html POSIX] codes, which all have the double xx_YY format.
  
 
The lowercase xx part of the code identifies the primary language, according to the  [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO-639-1] standard.
 
The lowercase xx part of the code identifies the primary language, according to the  [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO-639-1] standard.
The uppercase YY part identifies any possible language variant (usually with a country code), according to the [http://en.wikipedia.org/wiki/ISO_3166-1 ISO-3166-1] standard.
+
The uppercase YY part identifies any possible language variant (usually with a country code), according to the [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements ISO-3166-1] standard.
  
 
You should use the referenced ISO codes. If you invent a new code, the risk is that they may be formalized differently later.
 
You should use the referenced ISO codes. If you invent a new code, the risk is that they may be formalized differently later.
Line 32: Line 32:
 
Language code examples:
 
Language code examples:
  
* Fr_FR: French "de France"
+
* fr_FR: French "from France"
* Fr_CA: Quebec
+
* fr_CA: Quebec
* En_US: English (United States of America)
+
* en_US: English (United States of America)
* Sv_SE: Sweden "Sweden"
+
* sv_SE: Swedish "from Sweden"
  
If you are in any doubt, ask for confirmation on the [http://gestinux.net/forum/viewforum.php?f=8 forum].
+
If you are in any doubt, ask for confirmation on the [https://mrit.com/gestinux/forum/viewforum.php?f=8 forum].
  
=== The source file to translate ===
+
=== The source files to translate ===
  
Gestinux 1.0 supports translations in a "text" xx_YY.ini file.
+
Gestinux read translations in two "text file" : xx_YY.ini and xx_YY_util.ini
  
In general, these files are in a folder named ''languages'' ​​at the same level as the executable Gestinux.
+
In general, these files are installed in folders named ''languages'' and ''util/languages'' ​​at the same level as the executable Gestinux.
However, to comply with Debian Linux rules (including Ubuntu), the files for these distributions are in / usr / share / gestinux / languages
+
However, to comply with Debian Linux rules (including Ubuntu), the files for these distributions are in /usr/share/gestinux/languages
  
These files are installed as write-only. Do not try to modify or unprotect them at this location. If you want to improve an existing (perhaps partial) translation, you should copy that file to a folder you choose, where you have write permissions.
+
These files are installed there read-only. Do not attempt to modify or set them read-write at this location. If you want to improve an existing (perhaps partial) translation, you should copy that file to your personal documents or else, if you can use svn, get all the sources (''svn checkout'') and open the files in the local copy.
  
You can also create a file within your personal documents. The first three lines must read:
+
For a new language, create a new file within your personal documents. The first lines must read:
  
[General]
+
[General]
 +
LanguageCode ='''xx_YY'''
 +
LanguageName ='''name of language'''  (in this language)
 +
LanguageOrientation=LTR|RTL
  
LanguageCode ='''xx_YY'''
+
LTR is for languages written from left to right, RTL for those written from right to left, which are supported by Gestinux from version 1.5.
  
LanguageName ='''name of language (in English)'''
+
Example :
  
 +
[General]
 +
LanguageCode=he_IS
 +
LanguageName=עיברית (ישראל)
 +
LanguageOrientation=RTL
  
Once you have created this file, you should put it in the Gestinux directory sources (managed by SVN) and lock it to prevent anyone else editing the same file simultaneously.
+
If you are using '''svn''', save the translation files in the folders ''trunk/languages'' and ''trunk/util/languages'' and add them (''svn add'' and ''svn commit''). Always lock them (''svn lock'') to prevent anyone else editing the same file simultaneously.
This must be done before you complete the translation, and the earlier the better.
 
  
If you know how to use SVN, ask to be given a "developer" profile, otherwise explain what you are doing on the forum and attach the file to your message translation. Other developers will use SVN directly. In either case, use the [http://gestinux.net/forum/viewforum.php?f=10 forum] to communicate with the other developers.
+
The file encoding must be UTF-8.
 +
 
 +
Otherwise explain what you are doing on the forum and attach the file to your message translation. Other developers will use svn for you. In either case, use the [https://mrit.com/gestinux/forum/viewforum.php?f=10 forum] to communicate with the other developers.
  
 
=== Initial Setup ===
 
=== Initial Setup ===
  
From the Gestinux menu choose '''Settings''' '''Languages''' tab and '''Add a translation:'''
+
From the Gestinux menu choose '''Settings''', '''Languages''' tab, and '''Write a translation:'''
  
[[File: Languages-logo.png]]
+
[[File:Translating_1.png]]
  
 
* The language reference is necessarily one of the languages ​​installed with gestinux. It will be your source. If possible, choose French, since the English pages are currently not complete.
 
* The language reference is necessarily one of the languages ​​installed with gestinux. It will be your source. If possible, choose French, since the English pages are currently not complete.
Line 72: Line 80:
 
* Check the box "Use translation" for translations of this file to be used. Otherwise the reference language will be used.
 
* Check the box "Use translation" for translations of this file to be used. Otherwise the reference language will be used.
  
=== Entering a new translation ===
+
There are 2 language files, one for the main application, and another for utilities common to several applications.
  
You can translate globally by clicking the '''Translate''' button. In this case, you will have a list (to the left) of the various application windows, as well as some sections unrelated to a window. Global translation is required for sections that do not correspond to a window, and to check you have not overlooked any section. You can use the '''Next Missing''' button to find the first missing translation.
+
=== Creating or improving a translation ===
  
It is also possible to press CTRL+F4 from any application window to view and translate the section corresponding to that window. In this case, you will see only that window listed at the left. This method has the advantage that once the translation you can use the F4 key to toggle between viewing the base language and your language translation (and vice versa).
+
You can translate globally by clicking one of the '''Translate''' button. In this case, you will have a list (to the left) of the various application windows, as well as some sections unrelated to a window. Global translation is required for sections that do not correspond to a window, and to check you have not overlooked any section. You can use the '''Next Missing''' button to find the first missing translation.
 +
 
 +
It is also possible to press CTRL+F4 from any Gestinux window to view and translate the section corresponding to that window. In this case, you will see only that window listed at the left. This method has the advantage that once the translation you can use the F4 key to toggle between viewing the base language and your language translation (and vice versa).
  
 
[[File: GTranslator.png]]
 
[[File: GTranslator.png]]
Line 82: Line 92:
 
Anyway, for the selected section, a list of key translation is displayed. The reference translation (which cannot be changed) is displayed below, and you can enter or edit the translation in your language. Registration is automatic when you change key.
 
Anyway, for the selected section, a list of key translation is displayed. The reference translation (which cannot be changed) is displayed below, and you can enter or edit the translation in your language. Registration is automatic when you change key.
  
The symbol <CR> skips a line, and should be used for messages.
+
The symbol <CR> skips a line, and should be used in long messages.
  
 
=== Installing new translations ===
 
=== Installing new translations ===
  
If possible, get another native speaker to read and check your work. Once the translation is complete, unlock the file in SVN if you know how, or ask via the [http://gestinux.net/forum/viewforum.php?f=10 forum] for another developer to do this for you.
+
If possible, get another native speaker to read and check your work. Once the translation is complete, commit the file with svn or ask via the [https://mrit.com/gestinux/forum/viewforum.php?f=10 forum] for another developer to do this for you.
  
 
If you contribute a commonly used language, your translation will be added to the next version of Gestinux.
 
If you contribute a commonly used language, your translation will be added to the next version of Gestinux.
Line 98: Line 108:
 
A country list has to be created for each language available in Gestinux. This is contained in the xx_YY_countries.txt file that Gestinux loads automatically when its database is created (or audited) provided that you have earlier selected the appropriate language.
 
A country list has to be created for each language available in Gestinux. This is contained in the xx_YY_countries.txt file that Gestinux loads automatically when its database is created (or audited) provided that you have earlier selected the appropriate language.
  
It is also helpful if you can create test cases in the language translated for the country (or countries) that use that language. You can export the database so that it can be hosted on gestinux.net and so become accessible to anyone worldwide.
+
It is also helpful if you can create test cases in the language translated for the country (or countries) that use that language.
 
 
If your country has state-specific tax(es), these can also be integrated into the software. If you do not make a [[Customized_Reports / en | about editing]], ask a developer on the forum, sending examples.
 
  
 +
If your country has state-specific reports these can also be integrated into the software. If you do not know how make a [[Customized_Reports|Customized report]], ask a developer on the forum, sending examples.
  
 
== Translating the documentation ==
 
== Translating the documentation ==
Line 111: Line 120:
 
See [[Help:Contents|how to create or edit pages]] of this wiki.
 
See [[Help:Contents|how to create or edit pages]] of this wiki.
  
There is a way to list the remaining untranslated pages (or those whose original has been modified after translation). For now, this method is not available online, so if you would value this facility, ask on the [http://gestinux.net/forum/viewforum.php?f=8 forum].
+
There is a way to list the remaining untranslated pages (or those whose original has been modified after translation). For now, this method is not available online, so if you would value this facility, ask on the [https://mrit.com/gestinux/forum/viewforum.php?f=8 forum].

Latest revision as of 13:27, 27 August 2024

 Français Español


This page explains how to translate Gestinux without knowing much about Pascal or other programming languages or the Lazarus IDE.

We ask that you translate only into your native language. Ideally, you should understand French because Gestinux was originally written in French.

Where do you start translating, and what should you then move on to translate thereafter?

You should start to translate the software itself, before starting to translate any documentation.

The translated software will be used to create a set of test data and make fresh screenshots showing the newly translated language.

Then you can gradually translate the documentation.

Translating the software

The following paragraphs cover the various steps involved in completing your translation task.

You can consult the internal translation mechanism for more information.

The code for your language

Before starting a new translation, you must discover what code applies to the language you are translating.

Languages ​​are identified in accordance with standard POSIX codes, which all have the double xx_YY format.

The lowercase xx part of the code identifies the primary language, according to the ISO-639-1 standard. The uppercase YY part identifies any possible language variant (usually with a country code), according to the ISO-3166-1 standard.

You should use the referenced ISO codes. If you invent a new code, the risk is that they may be formalized differently later.

Language code examples:

  • fr_FR: French "from France"
  • fr_CA: Quebec
  • en_US: English (United States of America)
  • sv_SE: Swedish "from Sweden"

If you are in any doubt, ask for confirmation on the forum.

The source files to translate

Gestinux read translations in two "text file" : xx_YY.ini and xx_YY_util.ini

In general, these files are installed in folders named languages and util/languages ​​at the same level as the executable Gestinux. However, to comply with Debian Linux rules (including Ubuntu), the files for these distributions are in /usr/share/gestinux/languages

These files are installed there read-only. Do not attempt to modify or set them read-write at this location. If you want to improve an existing (perhaps partial) translation, you should copy that file to your personal documents or else, if you can use svn, get all the sources (svn checkout) and open the files in the local copy.

For a new language, create a new file within your personal documents. The first lines must read:

[General]
LanguageCode =xx_YY
LanguageName =name of language  (in this language)
LanguageOrientation=LTR|RTL

LTR is for languages written from left to right, RTL for those written from right to left, which are supported by Gestinux from version 1.5.

Example :

[General]
LanguageCode=he_IS
LanguageName=עיברית (ישראל)
LanguageOrientation=RTL

If you are using svn, save the translation files in the folders trunk/languages and trunk/util/languages and add them (svn add and svn commit). Always lock them (svn lock) to prevent anyone else editing the same file simultaneously.

The file encoding must be UTF-8.

Otherwise explain what you are doing on the forum and attach the file to your message translation. Other developers will use svn for you. In either case, use the forum to communicate with the other developers.

Initial Setup

From the Gestinux menu choose Settings, Languages tab, and Write a translation:

Translating 1.png

  • The language reference is necessarily one of the languages ​​installed with gestinux. It will be your source. If possible, choose French, since the English pages are currently not complete.
  • Find your translation file (created as described in the previous section) by clicking the selection button.
  • Check the box "Use translation" for translations of this file to be used. Otherwise the reference language will be used.

There are 2 language files, one for the main application, and another for utilities common to several applications.

Creating or improving a translation

You can translate globally by clicking one of the Translate button. In this case, you will have a list (to the left) of the various application windows, as well as some sections unrelated to a window. Global translation is required for sections that do not correspond to a window, and to check you have not overlooked any section. You can use the Next Missing button to find the first missing translation.

It is also possible to press CTRL+F4 from any Gestinux window to view and translate the section corresponding to that window. In this case, you will see only that window listed at the left. This method has the advantage that once the translation you can use the F4 key to toggle between viewing the base language and your language translation (and vice versa).

GTranslator.png

Anyway, for the selected section, a list of key translation is displayed. The reference translation (which cannot be changed) is displayed below, and you can enter or edit the translation in your language. Registration is automatic when you change key.

The symbol <CR> skips a line, and should be used in long messages.

Installing new translations

If possible, get another native speaker to read and check your work. Once the translation is complete, commit the file with svn or ask via the forum for another developer to do this for you.

If you contribute a commonly used language, your translation will be added to the next version of Gestinux.

If you contribute a rare language translation, or you don't want to wait for the next Gestinux version, it is possible to make a package that includes an additional language for various target systems (Windows, Debian, ...). You can figure out how to do this yourself or ask a developer.

When you run it for the first time on a workstation, Gestinux tries to activate the correct translation automatically, depending on the computer's language. Unfortunately, Windows does not know the POSIX language codes, and there are cases where this is not automatic. A slight software modification is required that can be obtained from the developers. This problem does not exist on Linux systems.

Providing translation data

A country list has to be created for each language available in Gestinux. This is contained in the xx_YY_countries.txt file that Gestinux loads automatically when its database is created (or audited) provided that you have earlier selected the appropriate language.

It is also helpful if you can create test cases in the language translated for the country (or countries) that use that language.

If your country has state-specific reports these can also be integrated into the software. If you do not know how make a Customized report, ask a developer on the forum, sending examples.

Translating the documentation

Having translated the program software (or possibly before) it will also be helpful if you can translate the documentation (which is in the form of a wiki).

Currently there are about 100 pages to translate, but some are more important than others.

See how to create or edit pages of this wiki.

There is a way to list the remaining untranslated pages (or those whose original has been modified after translation). For now, this method is not available online, so if you would value this facility, ask on the forum.