rubenv / angular-gettext-tools

Tools for extracting/compiling angular-gettext strings.
http://angular-gettext.rocketeer.be/
MIT License
39 stars 129 forks source link

Extract the value of the attribute first if != translate #185

Closed dhoko closed 6 years ago

dhoko commented 6 years ago

Ex: when we define a custom attribute for a tooltip we can do:

<span custom-tooltip-translate="Allez la France"><i class="fa fa-flag-france"></i></span>

When we extract the translations we want to extract the key Allez la France, that's what we have via this fix. Today we have <i class="fa fa-flag-france"></i>. I added a test for this use case too.

:warning: this won't change the current behavior for translate.

rubenv commented 6 years ago

custom-tooltip-translate="Allez la France"

As a Belgian, I am incapable of merging this today :-)

But it looks good and it makes sense. Will have a further look tomorrow!

rubenv commented 6 years ago

Merged and released as v2.3.11. Thanks for the excellent pull request!

dhoko commented 6 years ago

Thx :+1: