Translator documentation: Difference between revisions

Jump to navigation Jump to search
Line 101: Line 101:


===TX Client configuration and use===
===TX Client configuration and use===
To use the command line utility "tx" you need to download and install it and create a configuration file.
The configuration file have to be named config and saved in a .tx directory in project's root.
Your directory's contents will look like that:
<code>
.
|-- 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
</code>
The project configuration file is used to store the project’s details and the file-to-resource mappings. As just said, this file is stored in .tx/config in your project’s root directory.
It has the following outline:
<code>
[main]
host =
[project_slug.resource_slug]
file_filter = htdocs/langs/<lang>/resource.lang
source_file = htdocs/langs/en/resource.lang
source_lang = en
type = MOZILLAPROPERTIES
</code>
Here is an explanation of the sections and options used in the config file:
<pre>
[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.
[project_slug.resource_slug]
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]
So if you ever need to change the language of a file or correct the file path for a specific translation, you can edit this file directly.
</pre>


== Integrate its translation into Dolibarr ==
== Integrate its translation into Dolibarr ==
83

edits

Navigation menu