[glotpress-updates] [GlotPress] #518: MO File creation appends an extra \0 to singular strings

GlotPress noreply at wordpress.org
Mon Nov 16 06:52:34 UTC 2015


#518: MO File creation appends an extra \0 to singular strings
---------------------+-----------------
 Reporter:  dd32     |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  1.0
Component:  General  |    Version:
 Keywords:           |
---------------------+-----------------
 When GlotPress is used to create a MO file, the generated file contains a
 trailing null byte on non-plural translations. Due to the way the MO
 reader parses the file, it causes no issues currently with POMO, but may
 with other MO implementations.

 This is caused by what is effectively `implode( chr(0), array( 'Singular',
 null ) );` which generates `Singular\0`, Plurals correctly being converted
 from `[ 'Plural', 'Plural' ]` to `Plural\0Plural`.

--
Ticket URL: <https://glotpress.trac.wordpress.org/ticket/518>
GlotPress <https://glotpress.trac.wordpress.org>
Easy comin', easy goin'


More information about the glotpress-updates mailing list