Why Spring MessageSource arguments are not filled correctly in some locales?

后端 未结 4 1470
陌清茗
陌清茗 2020-12-29 03:05
mailconfirm.mail.body=

Hi, {0}!

\\ To confirm your email address click on the confirmation
4条回答
  •  孤城傲影
    2020-12-29 03:29

    Issue solved! It appears that the problem was because the message mailconfirm.mail.body contained an apostrophe somewhere after {0} and between {1}. After replaced doesn't with does not it fixed the problem. I didn't know apostrophes can't be used in there. P.S. Is it a bug or just my mistake and apostrophes should be escaped?

    mailconfirm.mail.body=

    Hi, {0}!

    \ To confirm your email address, click on the confirmation link given bellow. If clicking on the link doesn't work, copy and paste the link in a new browser tab.

    \ http://www.domain.com/confirm_email.html?action=activate&hash={1}

    \ Kind regards,
    \ Your Something

    One doesn't took me about an hour to figure it out and push a fix. Hahaha.. From now on I consider apostrophes being evil!

提交回复
热议问题