[wp-trac] [WordPress Trac] #55941: Empty string wrongly translated to '0'

WordPress Trac noreply at wordpress.org
Wed Sep 14 09:49:42 UTC 2022


#55941: Empty string wrongly translated to '0'
--------------------------------------+---------------------
 Reporter:  Chouby                    |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  6.1
Component:  I18N                      |     Version:  2.8
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by lopo):

 I'm reviewing this one as part of the Yoast Contributor Day activities.
 The patch looks good to me and appears to be working as expected.

 To test the fix I:
 - changed a string in the Settings page to `''` (empty string)
 - switched my env to Italian
 - added the following to `admin-it_IT.po` and updated the .mo with
 `msgfmt` on the command line
 {{{
 msgid "0"
 msgstr "0"
 }}}
 - I could see the empty string was wrongly translated as `0`
 - applying the patch the string is correctly translated to an empty
 string.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55941#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list