Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use inner HTML when using attribute #146

Closed
karelbilek opened this issue Jun 6, 2016 · 2 comments · May be fixed by #147
Closed

Don't use inner HTML when using attribute #146

karelbilek opened this issue Jun 6, 2016 · 2 comments · May be fixed by #147

Comments

@karelbilek
Copy link

I want to translate custom annotation, as described here

https://angular-gettext.rocketeer.be/dev-guide/custom-annotations/

I have tooltip, I want to automatically translate it that way. HOWEVER, it is only used in pairwise tags. Like this:

<div tooltip="You have mouse on Foo!"><img src="http://example.org/foo.jpg">...</div>

However, I cannot do that. Once I add tooltip to attributes, the inner HTML is extracted.

It's probably because here - https://github.com/rubenv/angular-gettext-tools/blob/master/lib/extract.js#L345 - the logic is first take inner HTML, and only when it's falsey, take the argument.

That's very unfortunate. If you really want this behaviour, it should be documented.

@karelbilek
Copy link
Author

It might be fixed here - #147 - but I am frankly not very sure, plus it might do something unintended.

@karelbilek
Copy link
Author

....yep, my fix breaks something. It was an idea :)

n11c pushed a commit to oasiswork/angular-gettext-tools that referenced this issue Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant