Bug 293112

Summary: konversation: Wrong French translation for "%2 sets the channel limit to %1 nicks."
Product: [Translations] i18n Reporter: Philippe Cloutier <chealer>
Component: frAssignee: KDE Francophone <kde-francophone>
Status: RESOLVED MOVED    
Severity: normal CC: annma, renard
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Bug Depends on: 336256    
Bug Blocks:    
Attachments: French po file with Spanish strings used for the problematic translation

Description Philippe Cloutier 2012-02-02 03:56:20 UTC
The French konversation.po translates channel limit messages incorrectly:

msgid "%2 sets the channel limit to 1 nick."
msgid_plural "%2 sets the channel limit to %1 nicks."
msgstr[0] "%1 a défini la limite du canal à 1 pseudos."
msgstr[1] "%1 a défini la limite du canal à %2 pseudos."

http://websvn.kde.org/trunk/l10n-kde4/fr/messages/extragear-network/konversation.po?revision=1275397&view=markup

It must be said the order in the English version is a little odd. Both translations must be incorrect, but the plural is very visible.

On this machine, this broke between September and November 2009:

[...]
[lun sep 28 2009] [23:27:01] Mode	debhelper définit la limite du canal à 360 pseudos.
[jeudi 19 novembre 2009] [21:37:01] Mode	368 a défini la limite du canal à 1 pseudos.
[...]

Reading the source, I would expect the result would be that the nick and the number would be inverted, but for some reason the nick displays as "1".
Comment 1 Anne-Marie Mahfouf 2012-02-02 09:24:32 UTC
SVN commit 1277629 by annma:

Fix singular - I hope this is what you expect, the bug report is a bit confusing...


 M  +5 -5      konversation.po  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1277629
Comment 2 Anne-Marie Mahfouf 2012-02-02 09:48:48 UTC
SVN commit 1277630 by annma:

backport to branch


 M  +5 -5      konversation.po  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1277630
Comment 3 Anne-Marie Mahfouf 2012-02-06 08:55:17 UTC
SVN commit 1278369 by annma:

fix %1 and %2 which were reversed


 M  +4 -4      konversation.po  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1278369
Comment 4 Anne-Marie Mahfouf 2012-02-06 08:57:46 UTC
SVN commit 1278370 by annma:

forward port: fix %1 and %2 which were reversed


 M  +4 -4      konversation.po  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1278370
Comment 5 Philippe Cloutier 2014-02-28 15:08:45 UTC
Still buggy in 1.5:
[2014-02-28 05:47:01] *** debhelper a défini la limite du canal à 1 pseudo.
Comment 6 Sebastien Renard 2014-03-16 17:59:40 UTC
Hello,

It seems correct in current translations:

msgid "%2 sets the channel limit to 1 nick."
msgid_plural "%2 sets the channel limit to %1 nicks."
msgstr[0] "%2 a défini la limite du canal à 1 pseudo."
msgstr[1] "%2 a défini la limite du canal à %1 pseudos."
Comment 7 Philippe Cloutier 2014-03-17 17:52:35 UTC
The name was fixed but not the number, even if the translation looks OK. I tested in English and Spanish and the bug does not happen there. While r1277629 didn't improve, it allows to notice what's going wrong now that msgstr[0] and msgstr[1] cannot generate identical sentences. Konversation uses msgstr[0] when it should use msgstr[1]. I have no idea why this only affects French (but I'm not familiar with gettext). I tried to use the Spanish translation in French to see if the problem is with the French strings, but I still get the singular form with the Spanish strings:
[2014-03-17 12:17:01] *** debhelper establece el límite del canal a 1 apodo.

I'll attach the po file I used to do this test.
Comment 8 Philippe Cloutier 2014-03-17 17:53:52 UTC
Created attachment 85617 [details]
French po file with Spanish strings used for the problematic translation

The problem also happens with this file.
Comment 9 Philippe Cloutier 2014-03-17 17:56:28 UTC
Ah. Before doing that test, I carefully compared how the translation is done in es.po vs fr.po:
chealer@vinci:~$ msgunfmt --color=never /usr/share/locale/fr/LC_MESSAGES/konversation.mo|grep -A2 'sets the channel limit'
msgid "%2 sets the channel limit to 1 nick."
msgid_plural "%2 sets the channel limit to %1 nicks."
msgstr[0] "%2 a défini la limite du canal à 1 pseudo."
msgstr[1] "%2 a défini la limite du canal à %1 pseudos."                                                                                                                                                                                                                       
chealer@vinci:~$ msgunfmt --color=never /usr/share/locale/es/LC_MESSAGES/konversation.mo|grep -A2 'sets the channel limit'                                                                                                                                                     
msgid "%2 sets the channel limit to 1 nick."                                                                                                                                                                                                                                   
msgid_plural "%2 sets the channel limit to %1 nicks."                                                                                                                                                                                                                          
msgstr[0] "%2 establece el límite del canal a 1 apodo."                                                                                                                                                                                                                        
msgstr[1] "%2 establece el límite del canal a %1 apodos."
Comment 10 Sebastien Renard 2014-06-14 17:59:49 UTC
I don't understand your comment. Is the bug still here with last release of .po file ? Thanks for your help
Comment 11 Sebastien Renard 2014-06-14 18:09:55 UTC
Setting status to needs info
Comment 12 Philippe Cloutier 2014-06-14 19:37:12 UTC
I'm not sure I understand your question. As I said, this happens with 1.5, and I'm not aware of an ulterior Konversation release.
Comment 13 Sebastien Renard 2014-06-15 10:42:06 UTC
Same bug in english (with konversation 1.4 et 1.5-master #4303), i got : "You set the channel limit to 1 nicks."
Bug is on source code that give the parameter as a string instead of a number. It fools gettext plural stuff. 
I made a (very) dirty patch with a simple toInt() and it works.

I closed this bug and open a new one for konversation devs. See 336256.