readme.md in web_translate_it-2.3.4 vs readme.md in web_translate_it-2.4.0

- old
+ new

@@ -5,11 +5,11 @@ [Support](https://webtranslateit.com/support) | [WebTranslateIt.com Homepage](https://webtranslateit.com) wti lets you easily sync your language files with [WebTranslateIt.com](https://webtranslateit.com), a web-based tool to translation software. -![WebTranslateIt Synchronization Tool](http://f.cl.ly/items/2X3m0h0g0I1O1U07163o/wti_example.jpg) +<img src="https://s3.amazonaws.com/f.cl.ly/items/27192V1K263K2O433h2g/webtranslateit_com_%E2%80%94_edouard_Edouards-MacBook-Pro-2____code_webtranslateit_com_%E2%80%94___anslateit_com_%E2%80%94_zsh_%E2%80%94_80%C3%9740.png" alt="WebTranslateIt Synchronization Tool" width="500px"> ### wti... * wti is a **command-line tool**. It works on all operating systems: Windows, Linux, MacOS X... * wti is really easy to use. It was inspired by git. Use `wti push` and `wti pull` to sync your language files with WebTranslateIt.com. @@ -38,10 +38,24 @@ ``` bash $ wti -v wti version 2.2.1 ``` +On some Linux distributions you may get the following error: + +``` bash +$ wti +If 'wti' is not a typo you can use command-not-found to lookup the package that contains it, like this: + cnf wti +``` + +The reason is that the wti file is named in another way: `/usr/bin/wti.ruby2.1` so you will have to create a symlink to make wti run. + +``` bash +$ ln -s /usr/bin/wti.ruby2.1 wti +``` + ## Configuration Now that the tool is installed, you’ll have to configure your project. Basically, `wti` is to be run on a project root directory, and looks for a `.wti` file containing your project information. The command `wti init` lets your create your `.wti` file. ``` bash @@ -180,8 +194,36 @@ * `before_push` * `after_push` Check the [sample `.wti`](https://github.com/AtelierConvivialite/webtranslateit/blob/master/examples/.wti#L9..L13) file for implementation. +## Exit codes + +Since version 1.4.0 `wti` returns exit codes on failure. The exit code is `0` if the command executed successfully and `1` if the command executed but encountered at least one error. This is useful to act upon errors if you use `wti` to pull files in an automated build process. + +``` zsh +~/code/webtranslateit.com[master]% wti pull +# Pulling files on WebTranslateIt + config/locales/translation_validator/en.yml | e82e044..e82e044 Skipped + config/locales/app/en.yml | f2ca86c..f2ca86c Skipped + config/locales/defaults/en.yml | 2fcb61f..2fcb61f Skipped + config/locales/js/en.yml | ee6589d..ee6589d Skipped + config/locales/js/fr.yml | 2f8bb0e..2f8bb0e Skipped + config/locales/translation_validator/fr.yml | 534af2c..534af2c Skipped + config/locales/app/fr.yml | 29f8c9d..da39a3e OK + config/locales/defaults/fr.yml | aca123e..aca123e Skipped +Pulled 8 files at 7 files/sec, using 3 threads. +~/code/webtranslateit.com[master]% echo $! +0 +~/code/webtranslateit.com[master]% wti pull +# Pulling files on WebTranslateIt + config/locales/translation_validator/en.yml | e82e044..e82e044 Error + config/locales/app/en.yml | f2ca86c..f2ca86c Skipped + config/locales/defaults/fr.yml | aca123e..aca123e Skipped +Pulled 3 files at 3 files/sec, using 3 threads. +~/code/webtranslateit.com[master]% echo $! +1 +``` + # License -Copyright (c) 2009-2014 Atelier Convivialité, released under the MIT License. +Copyright (c) 2009-2015 Atelier Convivialité, released under the MIT License.