Conversation
|
Why not use Having two different syntaxes is really troublesome: it would given an error if you have this situation: Not the mismatching values for the plural string. There's no way we can handle that. This cannot go in unless we find a way to make this work: |
|
I just noticed that I made the mistake of putting it wrong in #104. Sorry for that. |
|
Apart from the points above: excellent work! If we can fix the things above, I see no reason not to merge this. |
|
result in parse error. I think that's why |
Ok, that is a problem. Guess we'll have to take that constraint as a given. But it's not just an option to use a new interpolation syntax as-such. Consider the case where we opt to use In combination with a different occurrence: <span translate translate-n="n" translate-plural="{{$count}} apples">1 apple</span>This would fail during message extraction since we have two different plural strings for
One option (and this might be crazy-talk) is to support
I'm inclined towards Something to think about. Adding @gabegorelick to CC, he might have input too. |
|
Yeah, |
|
We may want to do something like rubenv/angular-gettext-tools#63 (comment) instead. |
|
Nevermind. $compile parses {{}} inside string literals. |
Issue #104
This adds
translatePluralfilter with syntaxThis is a bit different with what @rubenv suggested
{}instead of$count. That's because the probability of collision of$countis higher than{}I think. Matching{}is also much easier.