aMule Bug Tracker - aMule
View Issue Details
0001636aMuleMessagespublic2010-11-01 18:252011-03-13 16:21
adaptee 
GonoszTopi 
normaltrivialalways
resolvedfixed 
Linux
SVN 
2.3.12.3.1 
10459
Any
0001636: one buggy message in the translation file of Chinese simplified
The translator has mistakenly put extra(and invalid?) modifier when translating %s, as listed below:


  #: src/CorruptionBlackBox.cpp:227
  #, c-format
  msgid ""
  "Banned client %s for sending %s corrupt data of %s total for the file '%s'"
  msgstr ""
  "????? %1$s?????? '%4$s' ????? %3$s ?? %2$s ??????

The corresponding line of code is :

   AddLogLineN(CFormat(_("Banned client %s for sending %s corrupt data of %s total for the file '%s'")) % clientName % CastItoXBytes(bad) % CastItoXBytes(good + bad) % m_fileName);


That buggy '%1$s' fails to be interpreted as an valid formatter, So the log message will be like this :

    2010-11-02 00:31:37: CorruptionBlackBox.cpp(228): ????? %1$s?????? '%4$s' ????? %3$s ?? %2$s ??????


The fix is really easy, just change those %1$s, %2$s, etc into plain %s




No tags attached.
Issue History
2010-11-01 18:25adapteeNew Issue
2010-11-01 18:25adapteeOperating System => Any
2010-11-07 12:55sturedmanNote Added: 0003510
2010-11-07 12:55sturedmanAssigned To => sturedman
2010-11-07 12:55sturedmanStatusnew => acknowledged
2011-03-13 16:21sturedmanFixed in Revision => 10459
2011-03-13 16:21sturedmanAssigned Tosturedman => GonoszTopi
2011-03-13 16:21sturedmanStatusacknowledged => resolved
2011-03-13 16:21sturedmanResolutionopen => fixed
2011-03-13 16:21sturedmanFixed in Version => 2.3.1
2011-03-13 16:21sturedmanTarget Version => 2.3.1

Notes
(0003510)
sturedman   
2010-11-07 12:55   
Hmm, it's not that easy.
The translation changes the sentence so that the arguments have to be passed in a different order. That's what the modifiers are supposed to do.
See http://docs.wxwidgets.org/stable/wx_wxstring.html#wxstringprintf [^]
However CFormat does not allow this feature.

We'll discuss what to do.