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 41455 - Add thousands separator to directory counts > 999
Add thousands separator to directory counts > 999
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: [obsolete] Visual Design
0.x.x [obsolete]
Other All
: Normal trivial
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2000-06-23 22:24 UTC by John Sullivan
Modified: 2008-03-06 04:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Enable thousands separators in user visible strings. (18.79 KB, patch)
2002-07-16 03:47 UTC, Gregory Merchan
needs-work Details | Review
Proposed patch against HEAD. (14.35 KB, patch)
2005-04-24 10:17 UTC, Christian Neumair
reviewed Details | Review
Localize integers in user-visible strings (17.00 KB, patch)
2008-01-07 05:41 UTC, John Millikin
none Details | Review

Description John Sullivan 2001-09-10 00:33:50 UTC
Currently huge directory counts get no "comma" separators (the quotes implying
localization). It's not terrible the way it is, but it would be nicer to do some
number-formatting on these strings. The worst case is in the deep directory
counts shown in the Properties window.



------- Additional Comments From sullivan@eazel.com 2000-06-23 18:48:10 ----

Not sure if there are canned routines available to do this nicely.



------- Additional Comments From eli@eazel.com 2000-10-16 19:38:45 ----

Batch-assigning QA ownership of remaining bugs to eli@eazel.com



------- Additional Comments From eli@eazel.com 2001-02-21 11:12:42 ----

QA Assigning to brett. Sorry for the spam.



------- Additional Comments From eli@eazel.com 2001-03-26 11:11:23 ----

QA Assigning to self.



------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 20:33 -------
Comment 1 Gregory Merchan 2002-07-07 07:38:52 UTC
According to the sprintf manual page, SUSv2 specifies that the
flag character ' (single-quote) will perform the desired grouping.

However, I am unable to produce the desired result with a simple
test program. This may be a gcc or glibc bug. gcc 2.95 yields the
potential warning indicated by the manual page. gcc versions 3.0
and 3.1 do not yield the warning. glibc is version 2.2.5. LC_NUMERIC
is en_US and should have the comma separator according to `locale`.
Comment 2 Gregory Merchan 2002-07-15 19:28:09 UTC
My simple test program apparently was incorrect. After calling
(for example) setlocale(LC_NUMERIC, ""); the printf's work according
to SUSv2.

I'll prepare a patch.
Comment 3 Gregory Merchan 2002-07-16 03:47:45 UTC
Created attachment 9889 [details] [review]
Enable thousands separators in user visible strings.
Comment 4 Matthias Clasen 2002-07-18 07:00:27 UTC
If you are worried about the portability of printf features, you might want to lobby 
for bug 79488, which proposes to include a good, feature-complete printf 
implementation in glib, for use on lacking systems.  
Comment 5 Luis Villa 2002-07-25 13:34:26 UTC
Moving to 2.2 to filter out from the far-future stuff.
Comment 6 Dave Camp 2002-07-25 13:55:45 UTC
Alex committed this patch.
Comment 7 Dave Camp 2002-07-25 13:58:07 UTC
Actually, it looks like I'm wrong, sorry.
Comment 8 Jody Goldberg 2002-08-20 03:00:21 UTC
I would not trust this to work.  The support is very locale dependent.
Most have not been set up to support it.  It is also libc dependent and I would
be surprised if there were not several that would end up rendering the '.

We have routines to handle this in gnumeric if you'd like to pilfer.
Comment 9 Luis Villa 2002-11-07 19:45:41 UTC
Apologies for the spam- I'm removing 'bugsquad' from some keywords via the web
interface. This is a one-time only thing before I re-add bugsquad via the SQL
interface, which will generate no mail. Apologies again.
Comment 10 Aschwin van der Woude 2003-05-02 19:38:26 UTC
The patch hasn't been merged yet (2.2.3).
Comment 11 alexander.winston 2004-01-21 01:59:40 UTC
Still not merged yet as of 2004-01-20.
Comment 12 alexander.winston 2004-01-21 02:41:42 UTC
The file that this patch was for,
<file:///cvs/gnome/nautilus/components/hardware/nautilus-hardware-view.c>,
no longer exists.
Comment 13 Luis Villa 2004-04-08 23:15:29 UTC
Dave, I'd recommend marking this patch obsolete, since the HW view is gone. Not
sure if you want to keep the bug open for any of the new 'computer' stuff or not.
Comment 14 Dave Camp 2004-04-09 00:18:14 UTC
Comment on attachment 9889 [details] [review]
Enable thousands separators in user visible strings.

marked needs-work, see jody's comment
Comment 15 Christian Neumair 2005-04-24 10:17:35 UTC
Created attachment 45604 [details] [review]
Proposed patch against HEAD.
Comment 16 Martin Wehner 2005-05-21 13:47:25 UTC
Comment on attachment 45604 [details] [review]
Proposed patch against HEAD.

What's the current status of the "'" support? Are Jody's comments still valid?
It works fine on my linux system with the default locale, but I guess that
doesn't mean too much. Does glib provide the support? It seemed to do at some
point with a 3rd party lib but I'm not sure it still does.
Comment 17 Jody Goldberg 2005-06-02 20:40:12 UTC
My comments are unchanged the only difference is the year.
If we can trust libc more, or are willing to assume that glibc is the only
reasonable target then it's probably safe to assume that the \' will not be
rendered.  I'm still betting there are locales where it will not work.
eg  "C"

The result would be no worse than what's already there so the patch may be
reasonable if we trust libc.
Comment 18 Martin Wehner 2005-06-02 20:46:51 UTC
Jody, could you point out the functions you use in gnumeric for this? It sounds
like we might to have to pilfer :)
Comment 19 Jody Goldberg 2005-06-02 21:01:20 UTC
The code now lives in libgoffice and is significantly more powerful that what is
needed here.

goffice/goffice/utils/format.c : go_render_number
Comment 20 John Millikin 2008-01-07 05:41:36 UTC
Created attachment 102299 [details] [review]
Localize integers in user-visible strings

Updated for latest code from trunk
Comment 21 André Klapper 2008-01-18 17:30:04 UTC
sidenote:
all these 3rd/2nd/1st strings must die from a l10n point of view, e.g.
static const char untranslated_x12th_copy_duplicate_format[] = N_("%s (%dth copy)%s");
english is the only boring language that needs such hacks. it does not work for *any* other language.
Comment 22 Alexander Larsson 2008-01-22 09:54:48 UTC
Commited.
Comment 23 paul 2008-03-06 04:23:21 UTC
(In reply to comment #17)
in my older apple libc, the ' is all i'm getting
i don't know if this is would happen with newer ones