#2258: [PATCH] merge looses translations
------------------------+---------------------------------------------------
 Reporter:  rejoc       |        Owner:  chrisz  
     Type:  defect      |       Status:  assigned
 Priority:  normal      |    Milestone:  1.1     
Component:  I18n        |      Version:  1.1 HEAD
 Severity:  normal      |   Resolution:          
 Keywords:  i18n merge  |  
------------------------+---------------------------------------------------
Changes (by chrisz):

  * owner:  Chris Arndt => chrisz
  * status:  new => assigned

Comment:

 I think the actual problem is caused by `tg-admin i18n merge` already
 merging duplicate messages in the .po file before merging these together
 with the messages in the .pot file.

 Trying to merge duplicate messages may be bad, as Gustavo pointed out, but
 it is already ''done'' by `tg-admin i18n merge`
 (turbogears.i18n.pygettext.catalog).

 Now `tg-admin i18n compile` (turbogears.i18n.msgfmt, copied from the
 Python i18n tool with the same name) ''also'' merges the duplicates in the
 .po file.

 The problem is, as rejoc rightly points out, that `tg-admin i18n merge`
 always takes the last translation, while `tg-admin i18n compile` takes the
 last ''nonempty'' translation (just like the original Python i18n tool
 msgfmt does). Btw, all of them only regard non-fuzzy translations, so this
 is consistent.

 To avoid the loss of translations mentioned by rejoc we could ''either''
 avoid the merging of duplicates inside the .po file in the first step of
 `tg-admin i18n merge`, ''or'' at least we should do it reasonably and
 consistently by regarding only *nonempty* translations, as done by rejoc's
 simple patch.

 To have this issue solved in TG 1.1rc1 which will be released today, I'll
 go with the second option and check in the patch.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2258#comment:6>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to