humhub / translation

Internal translation tool
https://translate.humhub.org
Apache License 2.0
17 stars 15 forks source link

Variable within HTML tag is not recognized #44

Closed raffitz closed 3 years ago

raffitz commented 3 years ago

What steps will reproduce the problem?

In attempting to translate a message from the "modules_template_views_admin_info" file of the custom_pages module, it is impossible to include the URL anchor with a similar formatting to the original string.

The string in question is More infos about the twig syntax is available <strong><a href="{twig_tmpl_url}">here</a></strong>.

The following translations were attempted:

Podes consultar mais informações sobre a sintaxe twig <strong><a href="{twig_tmpl_url}">aqui</a></strong>

Podes consultar mais informações sobre a sintaxe twig <strong><a href=\"{twig_tmpl_url}\">aqui</a></strong>

Podes consultar mais informações sobre a sintaxe twig <strong>\<a href=\"{twig_tmpl_url}\"\>aqui</a></strong>

Podes consultar mais informações sobre a sintaxe twig <strong>\<a href=\"\{twig_tmpl_url\}\"\>aqui</a></strong>

What is the expected result?

At least one of the above translations would be accepted.

What do you get instead?

The translation is missing a parameter "twig_tmpl_url"

Additional info

There are some languages that achieved this, for instance Italian. Maybe those changes were made before the input sanitization/purification became so strict?

yurabakhtin commented 3 years ago

@luke- PR https://github.com/humhub/humhub-modules-translation/pull/45, the problem was in snake case variable {twig_tmpl_url} because only camel and pascal cases {twigTmplUrl} were supported before.

luke- commented 3 years ago

@yurabakhtin Thanks!