stellar/stellar-client — pull request #641 by bartekn (2014-08-14 17:58:02+00:00)
Title: gettext i18n

After getting a few advices and ideas from @nullstyle I started working on i18n of stellar-client using [`angular-gettext`](http://angular-gettext.rocketeer.be/). It's just the initial commit pushed to be sure I'm going into right direction. I will continue working after confirmation.

`angular-gettext` attributes and JS functions will allow to extract strings to `.pot` files which then will be translated using tools like [Transifex](https://www.transifex.com/). Extracting strings to `.pot` files will be automated using [`gulp-angular-gettext` plugin](https://github.com/gabegorelick/gulp-angular-gettext). When translations will be ready, they will be pulled from Transifex (ideally during `dist` gulp task). @nullstyle also shared a great idea to create a gulp plugin that statically translates templates where possible, reducing the amount of work each browser does. I developed a first version of this plugin and created NPM package: [`gulp-angular-gettext-export-html`](https://github.com/bartekn/gulp-angular-gettext-export-html). I checked how it works with a few templates from stellar-client and results are promising (`npm test`). There's still much work to be done though.

When it comes to `angular-gettext`, here are my thoughts after checking templates:

* Splitting conditional bindings like:
```html
{{ showAddress ? 'Hide' : 'Show' }} your Stellar Address
{{ claimRewards.isLoading() ? 'Loading...' : 'Claim now' }}
```
to following forms:
```html
Hide your Stellar Address
Hide your Stellar Address
{{ showAddress ? 'Hide' : 'Show' }} your Stellar Address
{{ claimRewards.isLoading() ? 'Loading...' : 'Claim now' }}
```
will not make translators less confused.