开发者

Is it a bad idea to hack the i18n system to generate <p> tags?

开发者 https://www.devze.com 2023-02-24 06:14 出处:网络
A lot of my copy has paragraphs. It would be cumbersome to wrap each paragraph in its own i18n.translate invocation. Is it a bad idea to modify the i18n system in rails so that it generates these and

A lot of my copy has paragraphs. It would be cumbersome to wrap each paragraph in its own i18n.translate invocation. Is it a bad idea to modify the i18n system in rails so that it generates these and wraps them in <p> tags? I guess the hard part is determining when to 开发者_如何学Gogenerate them and when not to.

Are there any known solutions to this?


Very very bad idea. Do not mix translations with view code. Really, don't do it.

0

精彩评论

暂无评论...
验证码 换一张
取 消