Closed anilanar closed 6 years ago
Based on failing test:
If we want <x translate="text1">text2</x>
to extract "text2" instead of "text1", the code can be modified further to disallow it. It's a simple if-else statement.
Has there been any more work on this issue? We are running into the same problem when trying to translate placeholders on nodes that have html content.
I think I fixed it here
@runn1ng Hey thanks, but repo owner has not answered yet.
It helps to include a test for the behavior you want to fix
A quick fix based on my question in the main repo: https://github.com/rubenv/angular-gettext/issues/246
Assuming we have
tooltip
attribute added into grunt configoptions.attributes
:And we can combine
attr-n
,attr-plural
,attr-context
andattr-comment
with translate, but it is not related to this fix:As you can see, I have used
$tooltipCount
instead of$count
for tooltip attribute because they use the same scope and those properties of scope would override each other's value if they had the same name. Also this example assumes someone created a custom directive fortooltip
attribute.