-
Notifications
You must be signed in to change notification settings - Fork 71
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
Mixing plural and properties other than textContent #75
Comments
Anyone having a solution for this issue? Thanks! |
Try stepping through with a debugger to see what goes wrong. I suggest to put a breakpoint at the start of |
@Rob--W It is due to https://github.com/fabi1cazenave/webL10n/blob/master/l10n.js#L811 which bypasses evaluation for non-textual properties such as Is there any reason to have this line of code? |
@Phyks I guess that it's just not implemented due to the lack of need / time. @fabi1cazenave can give a more authorative answer to why that line of code is there. |
@Rob--W @fabi1cazenave Ok, I just removed the faulty line and it works for my use case. I guess it can break something else, and if you have feedback about it, I am interested in them. In the meantime, I guess this is just the solution for anyone experiencing the same issue :) |
Any advice on it? Interested in a PR? |
I don't see any immediate issues with allowing plurals for non-textContent properties. If @fabi1cazenave has no objections, I would accept a PR. |
Bump |
I think that you'd better shoot him a mail if you want feedback from @fabi1cazenave . |
Hi,
I am trying to mix plural and properties other than
textContent
, such asinnerHTML
.My properties file contains:
And my HTML file contains:
Which, as far as I understand the syntax and the way the code works, should be working. But it does not. It displays
{[ plural(n) ]}
, which is unexpected. If I edit the HTML file to look like this:it works.
Do you know if I am doing anything wrong or if this is a bug?
Thanks
The text was updated successfully, but these errors were encountered: