I usually try to translate DrupalConsole & its book every new version comes out because i mantain the spanish translation of DrupalConsole.

First of all, the best is to synchronize new strings with the following command:

drupal translation:sync

Then you want to

drupal translation:clean

for removing not already necessary strings.

The best way to check fresh changes is doing a pull and executing:

drupal translation:pending es

(if problem, enable the mode develop: true in your config.yml of drupal console )

The .yml files live in /config/translations/

After translating those .yml files, you must know there is a way to automagically translate the DocBook :)

drupal chain --file="~/.console/chain/update-gitbook.yml" --placeholder="book_path:~/drupal-console-book" (or wherever you have your code of the book)

Executing the upper command automatically the translations will be pulled from DC over the Book.

Note that command works with the translations corresponding to your selected language in DC.


So, in short, the flow of commands is:

[drupal settings:set language es]

drupal translation:sync

drupal translation:clean

drupal translation:pending es 

[translate your language files now]

drupal @my_site.local chain --file="~/.console/chain/update-gitbook.yml" --placeholder="book_path:~/git/drupal-console-book"

Enjoy DrupalConsole in your language! ^^

PS: note that update-gitbook.yml handles all languages, if you want to update the strings only for your language, you could execute:
drupal @my_site.local generate:doc:gitbook --path ~/git/drupal-console-book/es



Añadir nuevo comentario

Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, refresh the CAPTCHA or submit the form and a new image will be generated. Not case sensitive.