After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 523983 - pl_PL locale contains invalid string format macros
pl_PL locale contains invalid string format macros
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.22.x
Other All
: Normal normal
: ---
Assigned To: gcalctool maintainers
gcalctool maintainers
: 525266 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-23 14:14 UTC by Patryk Zawadzki
Modified: 2009-05-14 00:30 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
pl_PL patch (393 bytes, patch)
2008-03-23 14:15 UTC, Patryk Zawadzki
none Details | Review
Patch including glade correction (1.88 KB, patch)
2008-03-24 08:53 UTC, Claude Paroz
none Details | Review

Description Patryk Zawadzki 2008-03-23 14:14:14 UTC
Steps to reproduce:
1. LC_ALL=pl_PL gcalctool
2. That's all.

Stack trace:
Dies inside glibc trying to expand 9 passed as int into a (const char *) string.

Other information:
I will attach a patch that fixes the issue with pl_PL locale. Please check other locales for similar problems.
Comment 1 Patryk Zawadzki 2008-03-23 14:15:05 UTC
Created attachment 107869 [details] [review]
pl_PL patch

Fixes the crasher.
Comment 2 Claude Paroz 2008-03-23 22:20:23 UTC
msgfmt --check don't yield because of the "#, no-c-format" line. IMHO, that's the real problem.
And xgettext add this line because the string is also found in the glade file, where a % format specifier has no sense (it is replaced in gtk.c).
The two problematic strings are:

#: ../gcalctool/gtk.c:542
#: ../glade/gcalctool.glade.h:389
#, no-c-format
msgid "_Other (%d) ..."
msgstr "_Inna (%d) ..." 

#: ../gcalctool/gtk.c:2921
#: ../glade/gcalctool.glade.h:269
#, no-c-format
msgid "Reset to _Default (%d)"
msgstr "Przywróć _domyślną (%s)"

The quick fix is to correct the pl.po file, but the problem should be fundamentally addressed by removing the format specifiers from the glade file.
Comment 3 Claude Paroz 2008-03-24 08:53:59 UTC
Created attachment 107901 [details] [review]
Patch including glade correction

One solution is to simply remove the translatable property of the affected strings in the glade file.
Comment 4 Claude Paroz 2008-03-24 09:13:59 UTC
I've also checked that currently no other locale presents this problem in trunk (after applying the patch).
$ for f in *.po; do intltool-update `basename $f .po`; msgfmt -vvc -o /dev/null $f; done
Comment 5 Artur Flinta 2008-03-30 16:34:11 UTC
Fixed on HEAD and gnome-2-22 branch :)
Comment 6 Claude Paroz 2008-03-30 21:08:32 UTC
Thanks Artur. Now there is just the glade correction left...
Lowering the severity, because there should be no more crasher right now.
Comment 7 Robert Ancell 2008-04-05 07:19:30 UTC
*** Bug 525266 has been marked as a duplicate of this bug. ***
Comment 8 Robert Ancell 2009-05-14 00:30:39 UTC
Closing as this appears to have been fixed some time ago.