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

coalesce wrappers without intermediate text nodes #3

Closed
jenseng opened this issue Apr 3, 2015 · 0 comments
Closed

coalesce wrappers without intermediate text nodes #3

jenseng opened this issue Apr 3, 2015 · 0 comments

Comments

@jenseng
Copy link
Owner

jenseng commented Apr 3, 2015

This doesn't really affect functionality, but it does make for nicer translation strings... Consider:

<p translate="yes">Hello <b><i>{user}</i></b></p>

Currently that yields the translation string:

"Hello ** *%{user}* **"

The double wrappers add no value for translators, and are more likely to get screwed up. We should coalesce them so that the translators see:

"Hello *%{user}*"

i18nliner-handlebars and canvas_react_i18n both do this, we should too.

Even better would be no wrappers, if all that is contained is a placeholder, but we can save that for another ticket 😄

jenseng added a commit that referenced this issue Apr 6, 2015
refs #3, #4

ensure that leading/trailing standalone elements in wrappers and in the
top-level interpolator are preserved

also ensure that nested tags in wrappers area applied correctly
@jenseng jenseng closed this as completed in b91477c Apr 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant