... | ... | @@ -99,15 +99,19 @@ git add po/pot/something.pot |
|
|
git commit -m "new file"
|
|
|
```
|
|
|
|
|
|
<h2 id="PushingnewstringstoTransifex-PublishingPOTfilestoTransifex">Publishing POT files to Transifex</h2>
|
|
|
# Publishing POT files to Transifex
|
|
|
|
|
|
<p>Once the new files are generated, add them to the repository (<code>git add -p</code> if you want to take a look at what changed, <code>git add .</code> otherwise; <code>git commit</code> to commit and <code>git push</code> to push to the remote repository).</p><p>Transifex is nice enough to track the repository’s POT files, so the refreshed POT files do not need to be uploaded to Transifex explicitly. If needed, you can run: </p>
|
|
|
Once the new files are generated, add them to the repository (`git add -p` if you want to take a look at what changed, `git add .` otherwise; `git commit` to commit and `git push` to push to the remote repository).
|
|
|
|
|
|
Transifex is nice enough to track the repository’s POT files, so the refreshed POT files do not need to be uploaded to Transifex explicitly. If needed, you can run:
|
|
|
|
|
|
```
|
|
|
tx push -s
|
|
|
```
|
|
|
|
|
|
<p>See the <code>.tx/config</code> file for more information.</p><p>If a new component was added to CiviCRM (i.e. you have a new something.pot that was created), it needs to be added to Transifex. For example:</p>
|
|
|
See the `.tx/config` file for more information.
|
|
|
|
|
|
If a new component was added to CiviCRM (i.e. you have a new something.pot that was created), it needs to be added to Transifex. For example:
|
|
|
|
|
|
```
|
|
|
tx set --auto-local -r civicrm.pcp 'po/<lang>.po' --source-lang en --source-file po/pot/pcp.pot --execute
|
... | ... | @@ -115,15 +119,34 @@ tx push -s -r civicrm.pcp |
|
|
tx pull -a -r civicrm.pcp
|
|
|
```
|
|
|
|
|
|
<p>For more information: <a href="http://help.transifex.net/features/client/index.html#auto-local" class="external-link" rel="nofollow">http://help.transifex.net/features/client/index.html#auto-local</a></p><p>You will also have to add an entry in the .tx/config file (you can copy/adapt an entry for another file).</p><h1 id="PushingnewstringstoTransifex-PullingnewtranslationsfromTransifex">Pulling new translations from Transifex</h1><p>Before a release (or whenever we want to recompile MO files) new translations need to be pulled from Transifex. This is done with the Transifex Client; the configuration is already in the repository (in the <code>.tx</code> directory), so a simple</p><div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
|
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[tx pull -a
|
|
|
]]></script>
|
|
|
</div></div><p>should suffice. After pulling the translations they should be committed to the repository (with <code>git add po; git commit -m 'pull from Transifex'; git push</code>).</p><h1 id="PushingnewstringstoTransifex-Pushfilestothegithubrepository">Push files to the github repository</h1><p><strong>Since 2013-01-18, this is done daily from sushi.c.o (on the "l10n" user account/crontab).</strong></p><p>Once you have finished adding/reviewing the .pot files, pulled the .po translations for each language, you can do a last review and push your changes to github:</p><div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
|
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[git status
|
|
|
For more information: [http://help.transifex.net/features/client/index.html#auto-local](http://help.transifex.net/features/client/index.html#auto-local).
|
|
|
|
|
|
You will also have to add an entry in the .tx/config file (you can copy/adapt an entry for another file).
|
|
|
|
|
|
<h1 id="PushingnewstringstoTransifex-PullingnewtranslationsfromTransifex">Pulling new translations from Transifex</h1>
|
|
|
|
|
|
Before a release (or whenever we want to recompile MO files) new translations need to be pulled from Transifex. This is done with the Transifex Client; the configuration is already in the repository (in the <code>.tx</code> directory), so a simple `tx pull -a` should suffice.
|
|
|
|
|
|
After pulling the translations they should be committed to the repository (with <code>git add po; git commit -m 'pull from Transifex'; git push</code>).
|
|
|
|
|
|
# Push files to the Github repository
|
|
|
|
|
|
<strong>Since 2013-01-18, this is done daily on a test node by Jenkins.</strong>
|
|
|
|
|
|
Once you have finished adding/reviewing the .pot files, pulled the .po translations for each language, you can do a last review and push your changes to github:
|
|
|
|
|
|
```
|
|
|
git status
|
|
|
git diff
|
|
|
./bin/commit-to-git.sh
|
|
|
git push]]></script>
|
|
|
</div></div><p>The "commit-to-git.sh" script will use the "Last-Translator" as the "author" of the git commit. Although it's not very precise, it gives some idea of who is translating what.</p><h1 id="PushingnewstringstoTransifex-CompilingMOfiles">Compiling MO files</h1><p><strong>Since 2014-04-29, this is done daily (around 9h42 PST) from sushi.c.o (on the "l10n" user account/crontab).</strong> Only languages with more than 20% are added to the official civicrm-l10n.tar.gz file. You need to request to be added <a href="http://forum.civicrm.org/index.php/board,10.0.html" class="external-link" rel="nofollow">(on the forums</a>) once you reach this milestone. The .mo files are available from download.civicrm.org, although not browsable, but you can guess the URL with the fomr:</p><div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
|
git push
|
|
|
```
|
|
|
|
|
|
The "commit-to-git.sh" script will use the "Last-Translator" as the "author" of the git commit. Although it's not very precise, it gives some idea of who is translating what.
|
|
|
|
|
|
# Compiling MO files
|
|
|
|
|
|
<p><strong>Since 2014-04-29, this is done daily (around 9h42 PST) from sushi.c.o (on the "l10n" user account/crontab).</strong> Only languages with more than 20% are added to the official civicrm-l10n.tar.gz file. You need to request to be added <a href="http://forum.civicrm.org/index.php/board,10.0.html" class="external-link" rel="nofollow">(on the forums</a>) once you reach this milestone. The .mo files are available from download.civicrm.org, although not browsable, but you can guess the URL with the fomr:</p><div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
|
|
|
<script type="syntaxhighlighter" class="theme: Confluence; brush: java; gutter: false"><![CDATA[https://download.civicrm.org/civicrm-l10n-core/mo/XX/civicrm.mo
|
|
|
|
|
|
... where XX is the language code, such as "es", "fr", etc, and "fr_CA", "es_MX", etc, for regional translations.]]></script>
|
... | ... | |