31,003
edits
| Line 60: | Line 60: | ||
== Traduction via transifex (recommandé) == | == Traduction via transifex (recommandé) == | ||
{{ | {{ToTranslate}} | ||
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 http://transifex.com/projects/p/dolibarr/ 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 http://transifex.com/projects/p/dolibarr/, 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 the following languages: | |||
* en_US | |||
* fr_FR | |||
* es_ES | |||
* ca_ES | |||
(this languages are still maintained using git). | |||
=== 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. | |||
====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 | |||
[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''' | |||
Used to pull changes from Transifex server to your computer<br/> | |||
Additional options for the tx pull command are: | |||
<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> | |||
'''Examples''' | |||
To pull translation files, you can use: | |||
<source lang="bash"> | |||
tx -d pull -l it_IT # Get italian language only | |||
tx -d pull -a # Get all languages | |||
</source> | |||
To push source files, just type: | |||
<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> | |||
= [[File:Language.png]] Diffusion ou intégration en standard de votre traduction = | = [[File:Language.png]] Diffusion ou intégration en standard de votre traduction = | ||