#5462 NORM Never A: gettext emulation doesn't handle newline properly

Zarro Boogs per Child bugtracker at laptop.org
Tue Dec 11 23:28:54 EST 2007


#5462: gettext emulation doesn't handle newline properly
----------------------------+-----------------------------------------------
 Reporter:  korakurider     |       Owner:  etoys                            
     Type:  defect          |      Status:  new                              
 Priority:  normal          |   Milestone:  Never Assigned                   
Component:  etoys-activity  |     Version:  Development build as of this date
 Keywords:                  |    Verified:  0                                
----------------------------+-----------------------------------------------
 Newline in gettext MO is represented as LF(0x0A), while squeak uses
 CR(0x0D).

 Current implementation reads msgid/msgstr as-is into internal dictionary.
 So "'string including newline' translated" doesn't work and returned
 string is wrong for squeak if it contains newline.
 To make it work all LFs need to be converted to CR when loading MO.

 Test case:

 | o t |
 o := 'View web page as source
 Cancel'.
 t := o translated.
 inspect t.
 self assert: (o ~= t).

-- 
Ticket URL: <http://dev.laptop.org/ticket/5462>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list