angular-gettext icon indicating copy to clipboard operation
angular-gettext copied to clipboard

String Extraction doesn't work when using '::' single binding notation

Open JoeFirebaugh opened this issue 8 years ago • 2 comments

When I do this: <mydirective somelabel="{{::'My Cool Label' | translate}}"></mydirective> The String Extraction part of gettext doesn't find 'My Cool Label'.

When I remove the '::' single binding 'My Cool Label' is in the bundle correctly.

My question is this, isn't it preferable to use the single binding to eliminate excessive bindings in our code? And shouldn't that be supported by gettext? OR is Angular smart enough to use single binding in this case anyway?

JoeFirebaugh avatar Feb 01 '16 12:02 JoeFirebaugh

Try adding quotes:

<mydirective somelabel="{{::'My Cool Label' | translate}}"></mydirective>

rubenv avatar Feb 01 '16 12:02 rubenv

Sorry, I do have double quotes... It was just my bad in transcribing it to the ticket. I'll edit the original.

Just to be clear, the problem still remains. If you have a small test case, you'll notice that adding single binding will cause the string to not be added to your bundle.

JoeFirebaugh avatar Feb 01 '16 13:02 JoeFirebaugh