angular-gettext
angular-gettext copied to clipboard
Support non-breaking space
This is not obvious how to use non-breaking space with Angular and Angular-gettext. They are required in some languages, like in french before each question, exclamation mark, semicolon, thousands separator, or to help with phone number, id, ...
-
(so Angular-gettext doesn't match) -
-
in html : OK -
in js : converted by Angular into 
(and it does not work in alert & confirm box but well... ok :-) )
Solutions :
- never use non-breaking spaces (not cool)
- move all strings containing non-breaking spaces in JS controllers (crappy)
- use Angular attribute
ng-bind-html
in the html (tricky) (ex:<p ng-bind-html="'Question ?' | translate"></p>
)
(and comments doesn't work withtranslate-comment
norng-bind-html-comment
, they are removed from the.pot
) - make Angular-gettext do the job (best solution ? PR to do ? ie matching
as
I’ve been hit by this bug too, and I totally agree with you Cédric. It definitely needs to be fixed within angular-gettext.