JesseWebDotCom/webtrees-theme-modern

Running I18N::translate() on already composed string does not work

Closed this issue · 1 comments

tvogel commented

The code for translating the about string does not work as intended:

return (string) I18N::translate($about);

If this should work, the whole, composed string would need a corresponding entry in the translation database which of course does not make sense. So, instead, you'll need to translate the individual phrases before concatenating them.

Also, because the composed string contains links including "%" signs, I18N::translate() will justifiably complain about variables missing for these which are mistaken as sprintf-placeholders.

This theme has been completely rewritten:
https://github.com/JesseWebDotCom/webtrees-theme-modern/releases/tag/0.0.1

The feature you were using is no longer available in this release. It will return (either in the theme itself or as a separate module) after the theme is stable and I get experience with translation based projects.