Skip to content

Commit

Permalink
Switch to transifex for translations
Browse files Browse the repository at this point in the history
All strings, urls and anchors are now in a single yml files for each language
Translated html pages are generated by a jekyll plugin based on unified templates
Add a new sitemap generator plugin for the new translation structure
Update french translations
  • Loading branch information
saivann committed May 21, 2013
1 parent 0510dd8 commit f262d0e
Show file tree
Hide file tree
Showing 112 changed files with 3,526 additions and 3,983 deletions.
3 changes: 2 additions & 1 deletion 404.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
layout: base-en
layout: base
lang: en
id: index
title: Bitcoin
---
Expand Down
57 changes: 42 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,55 @@ Installing dependencies on older Ubuntu and Debian distributions

## Translation

### Guidelines
### How to translate

* Translations can be done on transifex https://www.transifex.com/projects/p/bitcoinorg/
* You must be a native speaker for the language you choose to translate.
* At least one other reviewer might be required and is highly recommanded.
* Try to avoid changing the meaning of any statements. If you need to change the meaning of anything, make a note of it and list that in the pull request.
* At least one other reviewer is required.
* Changing the meaning of any statement should be avoided. In doubt, you can open a discussion on transifex.
* Sentences and popular expressions should be adapted so that they sound native in your language.
* You must save your work with UTF-8 encoding.

### How to translate
### Add new translations

1. Begin, Add language code where required in _config.yml.
2. Import, Download the translated .yml file from transifex and put that file in _translations.
3. Images, Translate the few images that contain text with a vector image editing software like Inkscape. Translations for these images are at the end of the imported .yml translation file. Make sure to convert all texts to paths when saving final svg files.
4. Vocabulary, Add correct alphabetical order for your language in the vocabulary page.
5. Preview, Check if all pages are complete, test each links, check that texts with a limited size display nicely. For example, right side buttons and some titles have height or width restrictions.

### Update translations

You can import all translations (complete and incomplete) from transifex using the transifex client:

tx init
tx set --auto-remote https://www.transifex.com/projects/p/bitcoinorg/
tx pull -a -s --skip

Then, you can overwrite any specific translation in the _translations folder by one of these files. You might also need to make sure that each .html files (including the layout) don't serve outdated content for those languages. You should also make sure that no urls or anchor has been changed.

### Update source english strings

Any change in the english texts can be done through a pull request on github. If your changes affect the html layout of a page, you should apply fallback html code for other languages until they are updated.

{% case page.lang %}
{% when 'fr' %}
(outdated french content)
{% else %}
(up to date english content)
{% endcase %}

### Update source strings on transifex

1. Begin, Run ./_contrib/translate (ISO 639-1 language code) (language name) to create your language. Ex : ./_contrib/translate fr "Français"
2. Texts, Open .html files in the appropriate folder and in _layouts and translate all human readable english dialogs (without touching the html tags and the page id).
3. Links, Update the name of each .html file so that it reflects your language. Add translated links to your pages in _config.yml.
4. Images, Update the few images that contain text with any vector image editing software like Inkscape.
5. Languages, Make sure that the languages are listed in alphabetical order in _config.yml
6. Post, Remove pages that use _posts such as "version-history" and "news". Those are not meant to be translated yet.
7. Press, Remove "press coverage" and "interviewees" in the Press center. The rest can be translated.
8. Preview, Check that texts that are limited in size display nicely. For example, right side buttons and some titles have height or width restrictions. You can preview your work without building the website. Just visit the existing english page, open the javascript console of your browser (CTRL + SHIFT + J on Google Chrome) and copy the following command to make the page editable : document.body.contentEditable=true . This will allow you to edit and preview the page in your browser like a document.
**When translation is needed**: If you want all changes you've made to be re-translated, you can simply update the resource file (en.yml) on transifex.

### Update
**When translation is not needed**: If you are only pushing typo fixes and that you don't want translators to redo all their work again, you can use the transifex client to pull translations, update en.yml and push back all translations at once:

Each time that a commit needs to be translated in other languages, a link to this commit must be added to https://github.com/bitcoin/bitcoin.org/wiki/Translations-tracking with all current languages listed under it. When a translation is updated through a pull request, all occurences of this language can be removed from the translations tracking page.
tx init
tx set --auto-remote https://www.transifex.com/projects/p/bitcoinorg/
tx pull -a -s --skip
tx set --source -r bitcoinorg.bitcoinorg -l en translations/bitcoinorg.bitcoinorg/en.yml
(update en.yml)
tx push -s -t -f --skip --no-interactive

## Advanced Usage

Expand Down
155 changes: 0 additions & 155 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,161 +26,6 @@ langs:
fr: Français
nl: Nederlands

section:
index:
en:
es:
fr:
nl:
about:
en: about
es: acerca-de
fr: a-propos
nl: over-bitcoin
bitcoin-for-developers:
en: bitcoin-for-developers
es: bitcoin-para-desarrolladores
fr: bitcoin-pour-developpeurs
nl: bitcoin-voor-ontwikkelaars
bitcoin-for-enthusiasts:
en: bitcoin-for-enthusiasts
es: bitcoin-para-entusiastas
fr: bitcoin-pour-passionnes
nl: bitcoin-voor-liefhebbers
bitcoin-for-individuals:
en: bitcoin-for-individuals
es: bitcoin-para-personas
fr: bitcoin-pour-particuliers
nl: bitcoin-voor-particulieren
bitcoin-for-businesses:
en: bitcoin-for-businesses
es: bitcoin-para-empresas
fr: bitcoin-pour-entreprises
nl: bitcoin-voor-bedrijven
bitcoin-for-press:
en: bitcoin-for-press
choose-your-wallet:
en: choose-your-wallet
es: elige-tu-monedero
fr: choisir-votre-porte-monnaie
nl: kies-uw-portemonnee
community:
en: community
es: comunidad
fr: communaute
nl: community
development:
en: development
es: desarrollo
fr: developpement
nl: ontwikkeling
download:
en: download
es: descargar
fr: telecharger
nl: download
foundation:
en: foundation
es: fundacion
fr: fondation
nl: stichting
how-it-works:
en: how-it-works
es: como-funciona
fr: comment-ca-marche
nl: hoe-het-werkt
resources:
en: resources
es: recursos
fr: ressources
nl: hulpmiddelen
secure-your-wallet:
en: secure-your-wallet
support-bitcoin:
en: support-bitcoin
es: apoya-bitcoin
fr: supporter-bitcoin
nl: help-bitcoin
version-history:
en: version-history
vocabulary:
en: vocabulary
es: vocabulario
fr: vocabulaire
nl: woordenlijst
you-need-to-know:
en: you-need-to-know
es: debes-saber
fr: vous-devez-savoir
nl: wat-u-moet-weten

vocabulary:
address:
en: address
es: direccion
fr: adresse
nl: bitcoin-adres
block-chain:
en: blockchain
es: cadena-de-bloques
fr: chaine-de-bloc
nl: blokketen
block:
en: block
es: bloque
fr: bloc
nl: blok
btc:
en: btc
es: btc
fr: btc
nl: btc
confirmation:
en: confirmation
es: confirmacion
fr: confirmation
nl: bevestiging
cryptography:
en: cryptography
es: criptografia
fr: cryptographie
nl: cryptografie
double-spend:
en: double-spend
es: doble-gasto
fr: double-depense
nl: dubbele-uitgaven
hash-rate:
en: hash-rate
es: velocidad-de-hash
fr: taux-de-hash
nl: hashsnelheid
mining:
en: mining
es: mineria
fr: minage
nl: delven
p2p:
en: p2p
es: p2p
fr: p2p
nl: p2p
private-key:
en: private-key
es: llave-privada
fr: cle-privee
nl: geheime-sleutel
signature:
en: signature
es: firma
fr: signature
nl: digitale-handtekening
wallet:
en: wallet
es: monedero
fr: porte-monnaie
nl: portemonnee

safe: false
auto: false
server: false
Expand Down
20 changes: 0 additions & 20 deletions _contrib/translate

This file was deleted.

103 changes: 0 additions & 103 deletions _layouts/base-en.html

This file was deleted.

Loading

0 comments on commit f262d0e

Please sign in to comment.