... | ... | @@ -26,20 +26,16 @@ Once the new strings are added to Transifex, translators can go and translate. A |
|
|
|
|
|
# Requirements
|
|
|
|
|
|
## Stack prerequisites
|
|
|
|
|
|
* Install Git, e.g. sudo apt-get install git
|
|
|
* Install [Transifex Client](https://docs.transifex.com/client/introduction/), e.g. `sudo easy_install transifex-client` or `sudo apt-get install transifex-client`
|
|
|
* Install "moreutils" for the sponge utility, e.g. `sudo apt-get install moreutils`
|
|
|
* Install the PHP command line interface (CLI) and MySQL bindings, e.g. `sudo apt-get install php-cli php-mysql`
|
|
|
* Install [civistrings](https://github.com/civicrm/civistrings) and composer, and have them available in your $PATH.
|
|
|
|
|
|
## Get a copy of the git repositories
|
|
|
|
|
|
Clone [the Git repositories](https://github.com/civicrm/) from github:
|
|
|
You will also need to checkout the git repositories in the following way:
|
|
|
|
|
|
```
|
|
|
mkdir -p ~/repositories/
|
|
|
mkdir ~/repositories/
|
|
|
cd ~/repositories/
|
|
|
git clone https://github.com/civicrm/l10n.git
|
|
|
git clone https://github.com/civicrm/civicrm-core.git civicrm
|
... | ... | @@ -49,15 +45,17 @@ git clone https://github.com/civicrm/civicrm-wordpress.git civicrm/wordpress |
|
|
git clone https://github.com/civicrm/civicrm-packages.git civicrm/packages
|
|
|
```
|
|
|
|
|
|
NB: the ~/repositories/civicrm directory is only an example. You can use your preferred location.
|
|
|
NB: the `~/repositories/civicrm` directory is only an example. You can use your preferred location.
|
|
|
|
|
|
The l10n repository contains:
|
|
|
|
|
|
<ul><li>"bin" : scripts for automating some of the tasks</li><li>"po/<lang>": translation files for each language</li><li>"po/pot/": .pot files are the source translation files (in English, as extracted from the CiviCRM code)</li></ul>
|
|
|
* `bin : scripts for automating some of the tasks
|
|
|
* `po/<lang>`: translation files for each language
|
|
|
* `po/pot/`: .pot files are the source translation files (in English, as extracted from the CiviCRM code)
|
|
|
|
|
|
The "po" files use a different file hierarchy than the default Transifex one.
|
|
|
The `po` files use a different file hierarchy than the default Transifex one.
|
|
|
|
|
|
With Transifex, files are structured in the form of "civicrm.<component>/<lang>.po". In the l10n git repository, we use the structure "<lang>/<component>.po". It makes it easier to extract and compile only part of the translation. The magic for making this happen is in the file: l10n/.tx/config.
|
|
|
With Transifex, files are structured in the form of `civicrm.<component>/<lang>.po`. In the l10n git repository, we use the structure "<lang>/<component>.po". It makes it easier to extract and compile only part of the translation. The magic for making this happen is in the file: l10n/.tx/config.
|
|
|
|
|
|
# Refreshing POT files
|
|
|
|
... | ... | |