php-gettext / Gettext

PHP library to collect and manipulate gettext (.po, .mo, .php, .json, etc)
MIT License
687 stars 132 forks source link

Multiline disabled translations #263

Closed lbfeenix closed 3 years ago

lbfeenix commented 3 years ago

If .po file contain multiline disbled translations like this:

~ msgid "Last agent hours-description"

~ msgstr ""

~ "How many hours in the past can system look at finding the last agent? "

~ "This parameter is only used if 'Call Last Agent' is set to 'YES'."

only the first line was taken, this fix allow mutiline disabled translations.

oscarotero commented 3 years ago

Thanks @lbfeenix I've added this test case: https://github.com/php-gettext/Gettext/commit/219a7e61b074ea2e7dc1ee3341958f4c81785a77, so please make sure it is passed. I've also leave one comment in your code.