Documentación traductores: Difference between revisions

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
 
(102 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<!-- BEGIN interlang links -->
<!-- Do NOT edit this section
    Links below are automatically managed by PolyglotBot
    You can edit links on the English source page : Translator_documentation -->
[[en:Translator_documentation]]
[[fr:Documentation_traducteur]]
[[de:Dokumentation_Uebersetzung]]
[[zh:翻译文档]]
<!-- END interlang links -->
=[[File:Language.png]] Traducir Dolibarr a otro idioma=
Dolibarr se desarrolla por defecto en inglés
Existen 3 métodos para realizar la traducción de Dolibarr:
#Automático mediante autotranslator.php
#Manualmente mediante la modificación de los archivos de idiomas
#Manualmente usando Transifex.com (oficial y recomendado).
Los describimos por orden de preferencia:
==Traducción via transifex (recomendada)==
{{ToTranslate}}
{{ToTranslate}}
== Traducir Dolibarr a otro idioma ==
Dolibarr se desarrolla por defecto en Francés e inglés


Existen 4 métodos para realizar la traducción de Dolibarr (1 automático mediante autotranslator.php, 3 manuales mediente phpLangEditor, iniTranslation o completamente manual).
Transifex is a web application that provides an online platform for translation projects. It includes teams and discussion tools, translation memory, glossary, proofreading and a lot of other features.
Los describimos a continuación por orden de preferencia de uso:
It is quite easy to use and all translations can be uploaded or downloaded through the web interface or using their TX client in a terminal.
Transifex is an open source project and the "community edition" can be freely downloaded and installed, but we will use the online hosted service.


=== Traducción automática mediante la utilidad autotranslator.php ===
===Create transifex account and choose language===
If you want to help translating Dolibarr in your own language, please refer to https://app.transifex.com/dolibarr-association/dolibarr/dashboard/ and see if language is already supported. If it exists (many teams are already working for the project), you can ask to join the team and start to translate right away; if there is not a team for your language, you should request a new translation team on Transifex. It can be done directly using transifex.com interface on the website.


* SO del traductor: Cualquiera
===Using the web interface (for translators)===
* Utilidad: autotranslator.php viene con Dolibarr 2.5.1 y superior, se encuentra en la carpeta dev/translation.
If language is already available onto page  https://app.transifex.com/dolibarr-association/dolibarr/dashboard/, just create an account and follow instruction of transifex web site to translate files.


Para traducir o actualizar todos los archivos en un nuevo idioma, símplemente ejecute el script:
Note, that this web interface must not be used to translate en_US language that is source. Any change on source language must be done by submiting code change using GitHub Pull Requests.
  autotranslator.php lang_code_source lang_code_target
 
Por ejemplo:
===Using TX command line client (for Dolibarr [[:Category:Yoda]] team)===
  autotranslator.php en_US pt_PT para realizar la traducción al portugés(pt_PT) utilizando el inglés (en_US) como origen.
This describe how to use Transifex from command line. However, this is reserved to Dolibarr admin users to synchronize Transifex with Dolibarr main sources.
 
[http://docs.transifex.com/developer/client/ Official documentation]
 
====TX Client configuration====
First install TX Client.
With Debian/Ubuntu/Mint:
<source lang="bash">
apt-get install python-pip
pip install transifex-client
</source>
Then you have to initialize your TX environment. This is done by running '''tx init''' into dolibarr project root directory.
<source lang="bash">
cd git/dolibarr
tx init
</source>
Accept to overwrite config file. Keep default value for Transifex instance, then enter your Transifex login and password.
 
After this, a .transifexrc has been created into your HOME dir and a generic config file has been created as '''.tx/config''' in project's root.
So your directory's contents will look like that:
<code><pre>
.
|-- build
|-- build.xml
|-- ChangeLog
|-- COPYING
|-- COPYRIGHT
|-- dev
|-- doc
|-- .gitignore
|-- htdocs
|-- INSTALL
|-- pom.xml
|-- quickbuild.xml
|-- README
|-- README-FR
|-- README.md
|-- robots.txt
|-- scripts
|-- test
`-- .tx
</pre></code>
 
The current config file can be downloaded from https://github.com/Dolibarr/dolibarr/tree/develop/.tx , put it into .tx directory, overwriting the one created by '''tx init'''
 
This project configuration file is used to store the project’s details and the file-to-resource mappings.
 
That is a sample of what the config file contains:
 
<source lang="ini">
[main]
host = https://www.transifex.com
lang_map = uz: uz_UZ
 
[dolibarr.admin]
file_filter = htdocs/langs/<lang>/admin.lang
source_file = htdocs/langs/en_US/admin.lang
source_lang = en_US
type = MOZILLAPROPERTIES
</source>
 
Here is an explanation of the sections and options used in the config file:
 
<nowiki>[main] section</nowiki>
 
In this section we have project-wide options, such as the default transifex host for all projects. These can be overriden by each resource, in case it is needed.
 
<nowiki>[dolibarr.resource]</nowiki>
 
source_lang: this is the source language of the resource.<br />
source_file: this points to the source file directly.<br />
file_filter: here we hold the expression used to identify translation files under the specific project. ''not mandatory''<br />
trans.<lang>: this is used for translation files that don’t follow a common naming schema and the file expression cannot be used to track them. ''not mandatory''<br />
host: in case the project doesn’t use the default Transifex server as specified in the [main] section, it can override it using this option. ''not mandatory''<br />
 
====TX Client use====
Some useful information on '''tx''' commands.
 
'''tx status'''
 
Show status of translations
 
'''tx push'''
 
Used to push changes from your computer to Transifex server<br>
Additional options for the tx push command are:
<code><pre>
-h - Shows the help screen for the command
-l <lang> - Specify which translations you want to push (defaults to all)
-r <resource> - Specify the resource for which you want to push the translations (defaults to all)
-f - Push source files without checking modification times
--skip - Don't stop on errors. Useful when pushing many files concurrently.
-s - Push the source file to the server
-t - Push the translation files to the server
--no-interactive - Don't require user input when forcing a push</pre></code>
 
'''tx pull'''


Todos los ficheros no existentes serán creados, y los existentes se actualizarán con las cadenas inexistentes. Las cadenas ya traducidas anteriormente se conservarán tal cual.
Used to pull changes from Transifex server to your computer<br />
La utilidad utiliza el servicio de traducción de Google para encontrar el valor traducido de una cadena.
Additional options for the tx pull command are:
Su PHP debe de tener permisios de escritura en la carpeta htdocs/langs y disponer de las funciones de la extensión curl disponibles.
<code><pre>
-h - Shows the help screen for the command
-l <lang> - Specify which translations you want to pull (defaults to all)
-r <resource> - Specify the resource for which you want to pull the translations (defaults to all)
-a - Fetch all translation files from server (even new ones)
-s - Force the fetching of the source file (default: False)
-f - Force download of translations files
--skip - Don't stop on errors. Useful when pushing many files concurrently.
--disable-overwrite - By default Transifex will fetch new translations files and replace existing ones. Use this flag if you want to disable this feature.
--minimum_perc=VALUE - Specify the minimum acceptable percentage of a translation in order to download it.</pre></code>


=== Traducción manual mediante el plugin de firefox phpLangEditor ===
'''Examples'''
* SO del traductor: Cualquiera
* Utilidad: phpLangEditor (plugin de Firefox)


# Instalar Firefox y la versión 2.5 o superior del plugin phpLangEditor ( http://code.google.com/p/phplangeditor/ )
To pull translation files, you can use:
# Une étape supplémentaire est requise pour finaliser l'installation. Appeler l'URL '''about:config''' puis dans le champ filtre, saisissez '''phplangeditor'''. Double cliquer sur la ligne phpLangEditor.file.typeOfLangExt et mettre '''ini''' a la place de '''php'''. phpLangEditor est maintenant prêt pour traduire Dolibarr.
# Depuis Firefox, ouvrir phpLangEditor en choisissant le menu '''Outils -> PHP lang editor'''.
# Cliquez sur "Ouvrir le fichier de référence" et choisissez votre fichier .lang d'origine (par exemple dans votre répertoire Dolibarr, htdocs/langs/en_US/bills.lang
# Cliquez sur "Ouvrir le fichier de traduction" et sélectionnez le fichier qui contiendra la traduction, si un fichier existe déjà (par exemple htdocs/langs/es_ES/bills.lang).
# Vous pouvez choisir d'afficher tous les termes à traduire ou uniquement les termes non-traduits. Cliquez sur le terme dans la colonne de gauche pour le traduire dans la case du bas. Vous pouvez aussi utiliser des raccourcis-clavier comme CTRL+N pour passer au suivant
# Enregistrer le fichier une fois la traduction terminée.
# Editer le fichier avec un éditeur de texte pour supprimer ou corriger la première ligne de commentaire. En effet, avec phpLangEditor, il n'est pas possible de traduire les lignes commentées (commençant par un #), aussi le fichier traduit contient une fois enregistré la ligne commentaire du fichier source. Une petite édition manuelle est nécessaire pour corriger ou supprimer cette ligne, bien que cela ne nuise pas au bon fonctionnement du nouveau fichier .lang.


=== Traduction manuelle avec iniTranslator ===
<source lang="bash">
* OS du traducteur: Windows
tx -d pull -l it_IT  # Get italian language only
* Outil: [http://initranslator.sf.net iniTranslator] (sous Windows).
tx -d pull -a  # Get all languages
</source>


# Lancer votre application de traduction qui vous demandera le fichier modèle (Par exemple, sous iniTranslator, faire Fichier - Ouvrir Original). Choisir le fichier source modèle dans le répertoire htdocs/langs/en_US ou htdocs/langs/fr_FR, qui sont à jour.
To push source files, just type:
# Puis choisissez éventuellement le fichier destination, dans le répertoire htdocs/langs/xx_XX ou xx est le code langue à traduire.
# Votre outils affichera les 2 fichiers face à face avec les chaines à traduire manquante.
# Compléter
# Sauvegarder le nouveau fichier destination.


Attention, iniTranslator souffre d'un grave défaut. Il ne conserve pas l'ordre d'origine des paramètres et tri le fichier généré par ordre alphabétique des clés plutot que dans l'ordre du fichier source. De plus, les zones commentaires du fichiers source ne sont pas repercutées dans le fichier destination traduit.
<source lang="bash">
tx -d push -t -l it_IT [-r dolibarr.file]  # To push only a specific translation file
tx -d push -s  # To push source file
</source>


===Other questions on transifex process===
This is short questions and answer yuo may also ask about transifex translation process:


=== Traduction manuelle complètement ===
1) Is the sync on a regular time interval ?


Pour traduire Dolibarr dans une autre langue, il faut aller dans le répertoire langs et créer un répertoire ayant pour nom le code langue à traduire (En suivant le même format que ceux déjà existant, par exemple en_US, fr_FR, es_ES, de_DE, etc...).
No. It is done where there is enough translation submited. It is also done on a beta branch just before creating the final release package.
Il faut ensuite recopier les fichiers lang depuis un répertoire déjà traduit (par exemple en_US/main.lang ou fr_FR/bills.lang), les recopier dans le répertoire de la nouvelle langue que l'on vient de créer et traduire le contenu de ces fichiers.
2) Are all the translations synced to git, or only the reviewed translations. Do I need to review before sync is done ?


Ces fichiers sont constitués de la manière suivante:
When a Sync is done, transifex files overwrites files into git, but only if there is at least on record modified for the file.
You don't have to make review before sync is done. Making review is above all to know which lines were manually reviewed and wich one were intially translated using a robot.
3) In which Dolibarr releases will translations be available ? Are transifex translations also synced to maintenance releases ?


Code1=Phrases à traduire 1
Sync is always done on develop and/or beta.
So transifex changes appear in all version whose branch is created after the transifex change (a sync is always done before creating a new branch). Once a branch is created, then new changes into transifex will be available only for next branch. Reason of this is that transifex is not able to manage branch/versions (not yet).


Code2=Phrases à traduire 2
==Traducción totalmente manual (no recomendada)==


...
Para traducir Dolibarr a otro idioma, vaya a la carpeta langs y cree una carpeta llamada con el código de idioma a traducir (Siguiendo el mismo formato de las ya existentes, por ejemplo en_US, fr_FR, es_ES, de_DE, etc...).
Deberá copiar los archivos de una carpeta lang ya traducida (por ejemplo en_US/main.lang ó fr_FR/bills.lang), y pegarlas en la carpeta del nuevo idioma que acabamos de crear y empezaremos a traducir el contenido de estos archivos.


Coden=Phrases à traduire n
Estos ficheros están constituidos de la siguiente manera:


Seules les phrases à droite du = sont à traduire, le code doit rester inchangé.
<source lang="ini">
Il est possible de traduire les fichiers un par un, sans tous les traduire d'un coup. Si un fichier n'a pas été traduit dans la nouvelle langue, Dolibarr utilisera l'Anglais.
Code1=Frase a traducir 1
Code2=Frase a traducir  2
...
Coden=Frase a traducir  n
</source>


Solamente las frases a la derecha del = se deben traducir, el código debe permanecer sin cambios.
Es posible traducir los archivos uno por uno, sin tener que traducirlos todos a la vez. Si un archivo no se ha traducido en el nuevo idioma, Dolibarr utilizará el Inglés.


Notons que, pour l'instant, il reste de nombreuses phrases en dur dans le code des pages PHP. Ces dernières doivent etre remplacées par le code suivant:
Para tener una variable de cadena para el idioma en el código PHP, todo lo que necesita hacer es cargar el archivo de idioma y utilizar el método para recuperar la variable traducida. Esto se puede hacer de la siguiente manera:


$langs->trans("CodeX")
<source lang="php">
$langs->load("nombredelarchivo"); // o $langs->load("nombredelarchivo@mimodulo") si miarchivo.lang se encuentra en el directorio htdocs/mimodulo/langs/xx_XX 


Et une entrée du type
print $langs->trans("CodeX")
</source>


Y una entrada del tipo
<source lang="ini">
CodeX=Phrase X
CodeX=Phrase X
</source>


doit etre ajoutée aux fichiers .lang
debe de ser añadida a los ficheros .lang


== Intégrer sa traduction dans Dolibarr ==
==Traducción automática mediante la utilidad autotranslator.php (no recomendada)==


'''Si vous avez complété des fichiers .lang existant déjà dans Dolibarr mais incomplets :'''
*SO del traductor: Cualquiera
*Utilidad: autotranslator.php viene con Dolibarr, se encuentra en la carpeta '''dev/translation'''.


* Vous pouvez nous soumettre vos modifications en réalisant un fichier patch suivant la méthode décrite sur la page [[FAQ_D%C3%A9veloppeur#Modification_du_code.2C_participer_au_d.C3.A9veloppement|FAQ Développeur]] dans la section "Sans accès CVS en ecriture".
Para traducir o actualizar todos los archivos en un nuevo idioma, símplemente ejecute el script:
<source lang="bash">
php autotranslator.php lang_code_source lang_code_target GOOGLEAPIKEY
</source>
Por ejemplo:
<source lang="bash">
php autotranslator.php en_US pt_PT GOOGLEAPIKEY
</source>
para realizar la traducción al portugés (pt_PT) utilizando el inglés (en_US) como origen.


Todos los ficheros no existentes serán creados, y los existentes se actualizarán con las cadenas inexistentes. Las cadenas ya traducidas anteriormente se conservarán tal cual.
La utilidad utiliza el servicio de [http://translate.google.com traducción de Google] para encontrar el valor traducido de una cadena.
Su PHP debe de tener permisios de escritura en la carpeta '''htdocs/langs''' y disponer de las funciones de la extensión curl disponibles.


'''Si vous avez créé des nouveaux fichiers .lang pour une nouvelle langue, vous pouvez :'''
=[[File:Language.png]] Difusión o inegras su idioma=


* Envoyer vos fichier par mail en pièce jointe sur la liste: dolibarr-dev@nongnu.org. Un développeur les intégrera pour vous.
Lo mejor que puede hacer, después de realizar una traducción, es incluirla incluye en la versión oficial de Dolibarr.


Si usted ha completado archivos .lang existentes en Dolibarr de forma incompleta o si ha creado nuevos archivos .lang para un nuevo idioma, puede<span> </span>:


''Remarque:'' Il y a 2 langues maitres, toutes les 2 toujours complètes:
*Incluir sus cambios o archivos en la versión oficial de Dolibarr. Es posible, si sabe usar un sistema GIT. Para ello cree una cuenta en {{TemplateUrlSCM}}, haga un fork del proyecto Dolibarr, haga sus cambios y mande un Pull Request.
* Le français (fichiers .lang du répertoire lang/fr_FR)
*o envíe sus archivos por e-mail en un adjunto a la lista inglesa: '''dolibarr-dev@nongnu.org''' (Inscripción en {{TemplateURLMLDev}}). Un desarrollador lo integrará por usted.
* L'anglais (fichiers .lang du répertoire lang/en_US)
Il est possible d'utiliser indifférement l'une ou l'autre (celle qui arrange) comme référence car les 2 sont à jour. Tous les autres fichiers langues sont susceptibles d'être incomplets.


''Nota:'' Hay un idoma principale, que siempre están completos:


== Diffusion de votre langue ==
*El inglés (ficheros .lang de la carpeta lang/en_US)


Quand vous avez créer une nouvelle langue, si elle n'est pas intégrée dans Dolibarr, elle peut être malgré tout diffuser pour d'autres utilisateurs. Vous pouvez fabriquer un package pour la distribuer en utilisant le script '''build/makepack-dolibarrlang.pl'''
Puede utilizar indistintamente tanto uno como el otro (el que prefiera) como referencia ya que los dos están actualizados. Todos los demás archivos de idioma son susceptibles de estar incompletos.


Le fichier .tgz fabriqué doit juste être dézippé dans le répertoire Dolibarr pour que la langue soit disponible.
=[[File:Language.png]] Traducción del wiki=
Ce fichier peut être envoyé sur le site web http://www.dolibarr.org dans l'espace '''téléchargement, modules/addon''' ou sur la mailing-list développeur '''dolibarr-dev@nongnu.org''' de Dolibarr.
El wiki se mantiene en 3 idiomas: Inglés, Francés y Español.
Si desea mejorar la documentación en uno de estos idiomas, simplemente debe de crear una cuenta en este wiki.
Entonces, podrá modificar una traducción incorrecta o traducir una página a la espera de traducción. La lista de estas páginas se encuentra disponible en la página [[:Category:Page_waiting_for_translation]].

Latest revision as of 08:48, 17 April 2026


Language.png Traducir Dolibarr a otro idioma

Dolibarr se desarrolla por defecto en inglés

Existen 3 métodos para realizar la traducción de Dolibarr:

  1. Automático mediante autotranslator.php
  2. Manualmente mediante la modificación de los archivos de idiomas
  3. Manualmente usando Transifex.com (oficial y recomendado).

Los describimos por orden de preferencia:

Traducción via transifex (recomendada)

En verysmall.png Page waiting for translation. To translate, create an account, go back and clic on "Modify".
Fr verysmall.png Page en attente de traduction. Pour traduire, créez un compte, revenez et cliquez sur "Modifier".
Es verysmall.png Página a traducir. Para traducirla, cree una cuenta, vuelva a la página y haga clic en "editar".
It verysmall.png Pagina da tradurre. Per tradurla, crea un utente, torna indietro e clicca su "modifica".
Pt verysmall.png Página a aguardar por tradução. Para traduzir, crie uma conta, volte atrás e clique em "Modificar".
De verysmall.png Seite wartet auf Übersetzung. Um Übersetzung zu erstellen, richte einen Account ein, geh zurück und klicke auf "bearbeiten".
Zh verysmall.png 页面等待翻译。若要翻译本页,先创建一个帐户、登录并返回本页后单击“编辑”。

Transifex is a web application that provides an online platform for translation projects. It includes teams and discussion tools, translation memory, glossary, proofreading and a lot of other features. It is quite easy to use and all translations can be uploaded or downloaded through the web interface or using their TX client in a terminal. Transifex is an open source project and the "community edition" can be freely downloaded and installed, but we will use the online hosted service.

Create transifex account and choose language

If you want to help translating Dolibarr in your own language, please refer to https://app.transifex.com/dolibarr-association/dolibarr/dashboard/ and see if language is already supported. If it exists (many teams are already working for the project), you can ask to join the team and start to translate right away; if there is not a team for your language, you should request a new translation team on Transifex. It can be done directly using transifex.com interface on the website.

Using the web interface (for translators)

If language is already available onto page https://app.transifex.com/dolibarr-association/dolibarr/dashboard/, just create an account and follow instruction of transifex web site to translate files.

Note, that this web interface must not be used to translate en_US language that is source. Any change on source language must be done by submiting code change using GitHub Pull Requests.

Using TX command line client (for Dolibarr Category:Yoda team)

This describe how to use Transifex from command line. However, this is reserved to Dolibarr admin users to synchronize Transifex with Dolibarr main sources.

Official documentation

TX Client configuration

First install TX Client. With Debian/Ubuntu/Mint:

apt-get install python-pip
pip install transifex-client

Then you have to initialize your TX environment. This is done by running tx init into dolibarr project root directory.

cd git/dolibarr
tx init

Accept to overwrite config file. Keep default value for Transifex instance, then enter your Transifex login and password.

After this, a .transifexrc has been created into your HOME dir and a generic config file has been created as .tx/config in project's root. So your directory's contents will look like that:

.
|-- build
|-- build.xml
|-- ChangeLog
|-- COPYING
|-- COPYRIGHT
|-- dev
|-- doc
|-- .gitignore
|-- htdocs
|-- INSTALL
|-- pom.xml
|-- quickbuild.xml
|-- README
|-- README-FR
|-- README.md
|-- robots.txt
|-- scripts
|-- test
`-- .tx

The current config file can be downloaded from https://github.com/Dolibarr/dolibarr/tree/develop/.tx , put it into .tx directory, overwriting the one created by tx init

This project configuration file is used to store the project’s details and the file-to-resource mappings.

That is a sample of what the config file contains:

[main]
host = https://www.transifex.com
lang_map = uz: uz_UZ

[dolibarr.admin]
file_filter = htdocs/langs/<lang>/admin.lang
source_file = htdocs/langs/en_US/admin.lang
source_lang = en_US
type = MOZILLAPROPERTIES

Here is an explanation of the sections and options used in the config file:

[main] section

In this section we have project-wide options, such as the default transifex host for all projects. These can be overriden by each resource, in case it is needed.

[dolibarr.resource]

source_lang: this is the source language of the resource.
source_file: this points to the source file directly.
file_filter: here we hold the expression used to identify translation files under the specific project. not mandatory
trans.<lang>: this is used for translation files that don’t follow a common naming schema and the file expression cannot be used to track them. not mandatory
host: in case the project doesn’t use the default Transifex server as specified in the [main] section, it can override it using this option. not mandatory

TX Client use

Some useful information on tx commands.

tx status

Show status of translations

tx push

Used to push changes from your computer to Transifex server
Additional options for the tx push command are:

-h - Shows the help screen for the command
-l <lang> - Specify which translations you want to push (defaults to all)
-r <resource> - Specify the resource for which you want to push the translations (defaults to all)
-f - Push source files without checking modification times
--skip - Don't stop on errors. Useful when pushing many files concurrently.
-s - Push the source file to the server
-t - Push the translation files to the server
--no-interactive - Don't require user input when forcing a push

tx pull

Used to pull changes from Transifex server to your computer
Additional options for the tx pull command are:

-h - Shows the help screen for the command
-l <lang> - Specify which translations you want to pull (defaults to all)
-r <resource> - Specify the resource for which you want to pull the translations (defaults to all)
-a - Fetch all translation files from server (even new ones)
-s - Force the fetching of the source file (default: False)
-f - Force download of translations files
--skip - Don't stop on errors. Useful when pushing many files concurrently.
--disable-overwrite - By default Transifex will fetch new translations files and replace existing ones. Use this flag if you want to disable this feature.
--minimum_perc=VALUE - Specify the minimum acceptable percentage of a translation in order to download it.

Examples

To pull translation files, you can use:

tx -d pull -l it_IT  # Get italian language only
tx -d pull -a   # Get all languages

To push source files, just type:

tx -d push -t -l it_IT [-r dolibarr.file]   # To push only a specific translation file
tx -d push -s  # To push source file

Other questions on transifex process

This is short questions and answer yuo may also ask about transifex translation process:

1) Is the sync on a regular time interval ?

No. It is done where there is enough translation submited. It is also done on a beta branch just before creating the final release package.

2) Are all the translations synced to git, or only the reviewed translations. Do I need to review before sync is done ?

When a Sync is done, transifex files overwrites files into git, but only if there is at least on record modified for the file. You don't have to make review before sync is done. Making review is above all to know which lines were manually reviewed and wich one were intially translated using a robot.

3) In which Dolibarr releases will translations be available ? Are transifex translations also synced to maintenance releases ?

Sync is always done on develop and/or beta. So transifex changes appear in all version whose branch is created after the transifex change (a sync is always done before creating a new branch). Once a branch is created, then new changes into transifex will be available only for next branch. Reason of this is that transifex is not able to manage branch/versions (not yet).

Traducción totalmente manual (no recomendada)

Para traducir Dolibarr a otro idioma, vaya a la carpeta langs y cree una carpeta llamada con el código de idioma a traducir (Siguiendo el mismo formato de las ya existentes, por ejemplo en_US, fr_FR, es_ES, de_DE, etc...). Deberá copiar los archivos de una carpeta lang ya traducida (por ejemplo en_US/main.lang ó fr_FR/bills.lang), y pegarlas en la carpeta del nuevo idioma que acabamos de crear y empezaremos a traducir el contenido de estos archivos.

Estos ficheros están constituidos de la siguiente manera:

Code1=Frase a traducir 1
Code2=Frase a traducir  2
...
Coden=Frase a traducir  n

Solamente las frases a la derecha del = se deben traducir, el código debe permanecer sin cambios. Es posible traducir los archivos uno por uno, sin tener que traducirlos todos a la vez. Si un archivo no se ha traducido en el nuevo idioma, Dolibarr utilizará el Inglés.

Para tener una variable de cadena para el idioma en el código PHP, todo lo que necesita hacer es cargar el archivo de idioma y utilizar el método para recuperar la variable traducida. Esto se puede hacer de la siguiente manera:

$langs->load("nombredelarchivo"); // o $langs->load("nombredelarchivo@mimodulo") si miarchivo.lang se encuentra en el directorio htdocs/mimodulo/langs/xx_XX   

print $langs->trans("CodeX")

Y una entrada del tipo

CodeX=Phrase X

debe de ser añadida a los ficheros .lang

Traducción automática mediante la utilidad autotranslator.php (no recomendada)

  • SO del traductor: Cualquiera
  • Utilidad: autotranslator.php viene con Dolibarr, se encuentra en la carpeta dev/translation.

Para traducir o actualizar todos los archivos en un nuevo idioma, símplemente ejecute el script:

php autotranslator.php lang_code_source lang_code_target GOOGLEAPIKEY

Por ejemplo:

php autotranslator.php en_US pt_PT GOOGLEAPIKEY

para realizar la traducción al portugés (pt_PT) utilizando el inglés (en_US) como origen.

Todos los ficheros no existentes serán creados, y los existentes se actualizarán con las cadenas inexistentes. Las cadenas ya traducidas anteriormente se conservarán tal cual. La utilidad utiliza el servicio de traducción de Google para encontrar el valor traducido de una cadena. Su PHP debe de tener permisios de escritura en la carpeta htdocs/langs y disponer de las funciones de la extensión curl disponibles.

Language.png Difusión o inegras su idioma

Lo mejor que puede hacer, después de realizar una traducción, es incluirla incluye en la versión oficial de Dolibarr.

Si usted ha completado archivos .lang existentes en Dolibarr de forma incompleta o si ha creado nuevos archivos .lang para un nuevo idioma, puede :

  • Incluir sus cambios o archivos en la versión oficial de Dolibarr. Es posible, si sabe usar un sistema GIT. Para ello cree una cuenta en https://github.com/Dolibarr/dolibarr, haga un fork del proyecto Dolibarr, haga sus cambios y mande un Pull Request.
  • o envíe sus archivos por e-mail en un adjunto a la lista inglesa: dolibarr-dev@nongnu.org (Inscripción en https://savannah.nongnu.org/mail/?group=dolibarr). Un desarrollador lo integrará por usted.

Nota: Hay un idoma principale, que siempre están completos:

  • El inglés (ficheros .lang de la carpeta lang/en_US)

Puede utilizar indistintamente tanto uno como el otro (el que prefiera) como referencia ya que los dos están actualizados. Todos los demás archivos de idioma son susceptibles de estar incompletos.

Language.png Traducción del wiki

El wiki se mantiene en 3 idiomas: Inglés, Francés y Español. Si desea mejorar la documentación en uno de estos idiomas, simplemente debe de crear una cuenta en este wiki. Entonces, podrá modificar una traducción incorrecta o traducir una página a la espera de traducción. La lista de estas páginas se encuentra disponible en la página Category:Page_waiting_for_translation.