Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Owen Taylor
On Mon, 2008-06-16 at 15:18 -0500, Shaun McCance wrote:
> On Mon, 2008-06-16 at 20:48 +0100, Alan Cox wrote:
> > > Well, as I said, in this case:
> > > 
> > > gtk_label_new(_(some_string));
> > > 
> > > The output of gettext can (and often will) be UTF-8,
> > > so gtk_label_new is going to receive UTF-8 whether
> > > some_string is ASCII or not.  If it's not UTF-8-safe,
> > > we're pretty much screwed already.
> > 
> > No no no
> > 
> > The output of _("blah") is "blah" for C locale, and "blah" should be
> > ASCII. You should only receive UTF-8 as the return from _("foo") in a
> > UTF-8 locale.
> > 
> > It isn't about being "UTF-8 safe" it is about "expecting UTF-8 in this
> > locale".
> 
> If gettext is returning anything but UTF-8, we have
> a lot of bugs in our application code.  Because all
> of us just pass that stuff off to GTK+, and GTK+
> always expects UTF-8, regardless of the locale.

For how this is handled by glib and gtk+, see the man page for
bind_textdomain_codeset.

Not that there is any excuse to use something other than a UTF-8 local
these days.

- Owen


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Owen Taylor
On Mon, 2008-06-16 at 19:51 +0100, Alan Cox wrote:
> > All of that means that there are no run-time problems.
> > The only actual concern is whether compilers will choke
> > on UTF-8 source files.  Alan says that, according to the
> > standard, a compiler would be perfectly right to choke.
> > I believe him.  I also don't care.
> 
> I don't think that one is a show stopper because if you can guarantee the
> rest will not break C provides you with \ escapes so you can paste the
> string in that way. So the question is the one about feeding utf-8 to
> glibc functions and internal cleanness of gtk/glib (eg what C library
> dependancies does it have). Having to use \ escapes for the quotes is a
> trivial inconvenience.

One place that we have seen compilers choke is on Windows ... we used
to have literal UTF-8 strings in the GTK+ sources, and on Chinese localized
windows, that caused MSVC problems. So we switched to octal escapes.

But it should be noted these problems were 4-5 years ago, and the versions 
of Windows and MSVC may have been much older. 

- Owen


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Shaun McCance
On Mon, 2008-06-16 at 20:48 +0100, Alan Cox wrote:
> > Well, as I said, in this case:
> > 
> > gtk_label_new(_(some_string));
> > 
> > The output of gettext can (and often will) be UTF-8,
> > so gtk_label_new is going to receive UTF-8 whether
> > some_string is ASCII or not.  If it's not UTF-8-safe,
> > we're pretty much screwed already.
> 
> No no no
> 
> The output of _("blah") is "blah" for C locale, and "blah" should be
> ASCII. You should only receive UTF-8 as the return from _("foo") in a
> UTF-8 locale.
> 
> It isn't about being "UTF-8 safe" it is about "expecting UTF-8 in this
> locale".

If gettext is returning anything but UTF-8, we have
a lot of bugs in our application code.  Because all
of us just pass that stuff off to GTK+, and GTK+
always expects UTF-8, regardless of the locale.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Alan Cox
> > They work perfectly when you pass them UTF-8 data no matter what your 
> > locale.
> 
> Just to back this up:
> 
> http://library.gnome.org/devel/gtk/stable/gtk-question-index.html#id2776084

Cool - so for anything which doesn't touch the C library directly you can
write _("\xABCD") type stuff for smart quotes and be in spec (except for
the po tools which actually all seem entirely happy with utf-8 msgid).

That makes most of it much easier to do.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Alan Cox
> Well, as I said, in this case:
> 
> gtk_label_new(_(some_string));
> 
> The output of gettext can (and often will) be UTF-8,
> so gtk_label_new is going to receive UTF-8 whether
> some_string is ASCII or not.  If it's not UTF-8-safe,
> we're pretty much screwed already.

No no no

The output of _("blah") is "blah" for C locale, and "blah" should be
ASCII. You should only receive UTF-8 as the return from _("foo") in a
UTF-8 locale.

It isn't about being "UTF-8 safe" it is about "expecting UTF-8 in this
locale".

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Shaun McCance
On Mon, 2008-06-16 at 19:41 +0100, Iain * wrote:
> On Mon, Jun 16, 2008 at 7:11 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
> > On Mon, 16 Jun 2008 17:48:31 +0100
> > "Iain *" <[EMAIL PROTECTED]> wrote:
> >
> >> On Mon, Jun 16, 2008 at 11:20 AM, Alan Cox <[EMAIL PROTECTED]> wrote:
> >> > In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
> >> > point depends if gtk_label_new ever calls a single C library function
> >> > that is locale dependant (eg strcasecmp).
> >>
> >> All of GTK is utf-8 compatible.
> >> This is the point we're trying to make.
> >
> > UTF-8 compatible is not the same thing as 'can feed utf-8 to the code
> > when in a non UTF-8 locale'
> >
> > Glibc is UTF-8 compatible but it will give you the wrong answers if you
> > feed UTF-8 data to it in a non-utf8 locale.
> 
> Alan, seriously. You know exactly what I mean. GTK functions only
> accept UTF-8 data.
> They work perfectly when you pass them UTF-8 data no matter what your locale.

Just to back this up:

http://library.gnome.org/devel/gtk/stable/gtk-question-index.html#id2776084

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Shaun McCance
On Mon, 2008-06-16 at 19:51 +0100, Alan Cox wrote:
> > All of that means that there are no run-time problems.
> > The only actual concern is whether compilers will choke
> > on UTF-8 source files.  Alan says that, according to the
> > standard, a compiler would be perfectly right to choke.
> > I believe him.  I also don't care.
> 
> I don't think that one is a show stopper because if you can guarantee the
> rest will not break C provides you with \ escapes so you can paste the
> string in that way. So the question is the one about feeding utf-8 to
> glibc functions and internal cleanness of gtk/glib (eg what C library
> dependancies does it have). Having to use \ escapes for the quotes is a
> trivial inconvenience.

Well, as I said, in this case:

gtk_label_new(_(some_string));

The output of gettext can (and often will) be UTF-8,
so gtk_label_new is going to receive UTF-8 whether
some_string is ASCII or not.  If it's not UTF-8-safe,
we're pretty much screwed already.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Mathias Hasselmann
Am Montag, den 16.06.2008, 18:59 +0200 schrieb Dave Neary:
> Iain * wrote:
> > On Mon, Jun 16, 2008 at 11:20 AM, Alan Cox <[EMAIL PROTECTED]> wrote:
> >> In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
> >> point depends if gtk_label_new ever calls a single C library function
> >> that is locale dependant (eg strcasecmp).
> > 
> > All of GTK is utf-8 compatible.
> > This is the point we're trying to make.
> 
> I"m increasingly mystified by this discussion.
> 
> Lots of people use non-UTF8 locales - most of the people I know send
> iso-8859-15 emails and when I send UTF8 emails they end up seeing €¥ or
> whatever instead of é. I can imagine that lots of Linux users use
> non-UTF8 locales for their UI. I don't know if there are any stats for
> this, but a couple of people working with distributions have said so.
> 
> Alan's made a reasonable argument that we shouldn't be using non-ascii
> in C source files. It's not standard. He's made a reasonable argument
> that in the case where a string is untranslated, or the user chooses the
> C locale, the output string will be the input string, and if the input
> string is non-ASCII UTF-8, then strange and unexpected things will happen.
> 
> This is starting to sound to me like change for change's sake. I don't
> see any decent reason to make the change (other than the "proper" quotes
> look better, even if they're harder to type), and credible people have
> pointed out a significant potential for breakage in a change like this.
> 
> Prudence suggests backing down and letting the subject drop would be the
> best course of action. If there are UTF8 strings being passed to gettext
> currently, perhaps that's the problem that needs to be fixed.

Also to consider: It should be trivial to modify intltool to
automatically generate en_* message catalogs which use the proper
quotation marks. This approach is much more compatible, requires less
change and has a much greater chance for success, wide adoption and
consistency.

Just a little story to support my consistency claim: I once did a
program targeting mainly German users, so I decide to use German as
message-id language. Well, and I had serious problems to consistently
use proper quotation marks: You always have to use those primitive
ASCII quotation marks in the C code, and they are more trivial to type.
So in the end quotation mark usage was rather random.

Also when taking the approach of tool support further it is easy to
imagine, to use that code to verify consistent quotation mark usage in
message catalogs.

So I'd say: Keep the source code ASCII clean - love it or hate it, but C
is specified to be ASCII only (despite the fact, that gcc seems to be
8-bit safe).

Ciao,
Mathias
-- 
Mathias Hasselmann <[EMAIL PROTECTED]>
Openismus GmbH: http://www.openismus.com/
Personal Site: http://taschenorakel.de/


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Alan Cox
> All of that means that there are no run-time problems.
> The only actual concern is whether compilers will choke
> on UTF-8 source files.  Alan says that, according to the
> standard, a compiler would be perfectly right to choke.
> I believe him.  I also don't care.

I don't think that one is a show stopper because if you can guarantee the
rest will not break C provides you with \ escapes so you can paste the
string in that way. So the question is the one about feeding utf-8 to
glibc functions and internal cleanness of gtk/glib (eg what C library
dependancies does it have). Having to use \ escapes for the quotes is a
trivial inconvenience.

> They don't just look better.  They're easier to read.
> What's more, they're correct.  And if we could get over
> this barrier, maybe we could start using proper dashes.
> Good typography makes text more legible.

Agreed - my concerns are to do it right, not whether it should be done.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Iain *
On Mon, Jun 16, 2008 at 7:11 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
> On Mon, 16 Jun 2008 17:48:31 +0100
> "Iain *" <[EMAIL PROTECTED]> wrote:
>
>> On Mon, Jun 16, 2008 at 11:20 AM, Alan Cox <[EMAIL PROTECTED]> wrote:
>> > In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
>> > point depends if gtk_label_new ever calls a single C library function
>> > that is locale dependant (eg strcasecmp).
>>
>> All of GTK is utf-8 compatible.
>> This is the point we're trying to make.
>
> UTF-8 compatible is not the same thing as 'can feed utf-8 to the code
> when in a non UTF-8 locale'
>
> Glibc is UTF-8 compatible but it will give you the wrong answers if you
> feed UTF-8 data to it in a non-utf8 locale.

Alan, seriously. You know exactly what I mean. GTK functions only
accept UTF-8 data.
They work perfectly when you pass them UTF-8 data no matter what your locale.

iain
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Alan Cox
On Mon, 16 Jun 2008 17:48:31 +0100
"Iain *" <[EMAIL PROTECTED]> wrote:

> On Mon, Jun 16, 2008 at 11:20 AM, Alan Cox <[EMAIL PROTECTED]> wrote:
> > In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
> > point depends if gtk_label_new ever calls a single C library function
> > that is locale dependant (eg strcasecmp).
> 
> All of GTK is utf-8 compatible.
> This is the point we're trying to make.

UTF-8 compatible is not the same thing as 'can feed utf-8 to the code
when in a non UTF-8 locale'

Glibc is UTF-8 compatible but it will give you the wrong answers if you
feed UTF-8 data to it in a non-utf8 locale.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Shaun McCance
On Mon, 2008-06-16 at 18:59 +0200, Dave Neary wrote:
> Iain * wrote:
> > On Mon, Jun 16, 2008 at 11:20 AM, Alan Cox <[EMAIL PROTECTED]> wrote:
> >> In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
> >> point depends if gtk_label_new ever calls a single C library function
> >> that is locale dependant (eg strcasecmp).
> > 
> > All of GTK is utf-8 compatible.
> > This is the point we're trying to make.
> 
> I"m increasingly mystified by this discussion.
> 
> Lots of people use non-UTF8 locales - most of the people I know send
> iso-8859-15 emails and when I send UTF8 emails they end up seeing €¥ or
> whatever instead of é.

The header for the email you just sent has this:

Content-Type: text/plain; charset="utf-8"

Any mail client that tries to interpret your email as ISO-8859-1
is simply broken.  Things like web sites and email specify their
character encoding, precisely because not everybody is using the
same one.  When you get an email from me, regardless of your
character encoding, the email is to be interpreted as UTF-8.

This, of course, has nothing to do with UTF-8 strings being
passed to GTK+.

>  I can imagine that lots of Linux users use
> non-UTF8 locales for their UI. I don't know if there are any stats for
> this, but a couple of people working with distributions have said so.
> 
> Alan's made a reasonable argument that we shouldn't be using non-ascii
> in C source files. It's not standard. He's made a reasonable argument
> that in the case where a string is untranslated, or the user chooses the
> C locale, the output string will be the input string, and if the input
> string is non-ASCII UTF-8, then strange and unexpected things will happen.

Input to GTK+ functions is defined to be UTF-8.  Always,
regardless of a user's character encoding.  That's the
point Iain has been making.  When you have this:

gtk_label_new (_("foo"));

The output of the _ function had better be UTF-8, because
that's what GTK+ is going to treat it as.  If the input
is non-ASCII, the worst case scenario is that _ returns
the input, because it's untranslated.  If that non-ASCII
input is UTF-8, we're golden, because that's what GTK+
wants.

Again, *regardless of the user's locale*, the input to
gtk_label_new is UTF-8.  There is *never* any confusion
about what gets passed to gtk_label_new.

I very much doubt any of us are taking these strings
and passing them anywhere they don't belong.  They're
being used as simple keys.  If we do anything with the
strings, we do it with the translated strings, which
means we have to use UTF-8-capable functions anyway.

All of that means that there are no run-time problems.
The only actual concern is whether compilers will choke
on UTF-8 source files.  Alan says that, according to the
standard, a compiler would be perfectly right to choke.
I believe him.  I also don't care.

> This is starting to sound to me like change for change's sake. I don't
> see any decent reason to make the change (other than the "proper" quotes
> look better, even if they're harder to type), and credible people have
> pointed out a significant potential for breakage in a change like this.

They don't just look better.  They're easier to read.
What's more, they're correct.  And if we could get over
this barrier, maybe we could start using proper dashes.
Good typography makes text more legible.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Dave Neary
Iain * wrote:
> On Mon, Jun 16, 2008 at 11:20 AM, Alan Cox <[EMAIL PROTECTED]> wrote:
>> In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
>> point depends if gtk_label_new ever calls a single C library function
>> that is locale dependant (eg strcasecmp).
> 
> All of GTK is utf-8 compatible.
> This is the point we're trying to make.

I"m increasingly mystified by this discussion.

Lots of people use non-UTF8 locales - most of the people I know send
iso-8859-15 emails and when I send UTF8 emails they end up seeing €¥ or
whatever instead of é. I can imagine that lots of Linux users use
non-UTF8 locales for their UI. I don't know if there are any stats for
this, but a couple of people working with distributions have said so.

Alan's made a reasonable argument that we shouldn't be using non-ascii
in C source files. It's not standard. He's made a reasonable argument
that in the case where a string is untranslated, or the user chooses the
C locale, the output string will be the input string, and if the input
string is non-ASCII UTF-8, then strange and unexpected things will happen.

This is starting to sound to me like change for change's sake. I don't
see any decent reason to make the change (other than the "proper" quotes
look better, even if they're harder to type), and credible people have
pointed out a significant potential for breakage in a change like this.

Prudence suggests backing down and letting the subject drop would be the
best course of action. If there are UTF8 strings being passed to gettext
currently, perhaps that's the problem that needs to be fixed.

Cheers,
Dave.

-- 
Dave Neary
GNOME Foundation member
[EMAIL PROTECTED]
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Iain *
On Mon, Jun 16, 2008 at 11:20 AM, Alan Cox <[EMAIL PROTECTED]> wrote:
> In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
> point depends if gtk_label_new ever calls a single C library function
> that is locale dependant (eg strcasecmp).

All of GTK is utf-8 compatible.
This is the point we're trying to make.
iain
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Shaun McCance
On Sun, 2008-06-15 at 01:24 +0200, Patryk Zawadzki wrote:
> On Sat, Jun 14, 2008 at 1:14 PM, Alexander Jones <[EMAIL PROTECTED]> wrote:
> > 2008/6/14 Alan Cox <[EMAIL PROTECTED]>:
> >> Note; I am all for the US locale using pretty quotes. I'm just strongly
> >> opposed to doing it against the specifications and praying it works out.
> >> Particularly when its probably a perl one liner to generate en_US.utf-8
> >> locale files.
> > Wrong. "Pretty quotes" cannot be distinguished from straight quotes
> > without language context. Consider some code that, e.g., generates XML
> > output and requires straight quotes. Such a script would break that.
> > (We see it already with Wordpress butchering people's pasted code.)
> 
> Not that it has anything to do with GNOME but putting structural
> markup (XML code) into translatable strings should seriously be
> considered a bug. One mistranslation could easily make the application
> unusable.

We make extensive use of XML markup in the strings in
gnome-doc-utils.  While I agree this is less than ideal,
it's currently the only way we can do the things we do.

If an en_US locale automatically changed all the quotes,
gnome-doc-utils would break pretty badly.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Alan Cox
> > (you could extract the translations from the converted file to
> > save having to mend all the translations but that might actually be long
> > term worse)
> 
> This would result in a thousand .c.in files or a large header .h.in
> file with all the strings ;)

Not really. You just generate a temporary file in the CC=fix-and-gcc
script or use a pipeline - conveniently enough the line numbers don't
change so you don't need to keep the temporary file around.

Anyway - disk is cheap 8)
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Patryk Zawadzki
On Mon, Jun 16, 2008 at 12:24 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
> BTW: I realised last night there is another way to tackle this which lets
> you turn the problem on its head
>
> Given smart quotes directly in code are not valid C and that you need to
> distinguish different quotes so can't do a perl 1 liner turn the problem
> the other way up
>
> Source - with smart quotes
>
>String generation
>Extract with po file tools
>Rewrite this with a simple script
>Extracted string is en_US translation
>Base string has quotes substituted back
>
>Compile
>Remove smart quotes and replace with ordinary ones
>Compile with gcc
>
> (you could extract the translations from the converted file to
> save having to mend all the translations but that might actually be long
> term worse)

This would result in a thousand .c.in files or a large header .h.in
file with all the strings ;)

-- 
Patryk Zawadzki
PLD Linux Distribution
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Alan Cox
BTW: I realised last night there is another way to tackle this which lets
you turn the problem on its head

Given smart quotes directly in code are not valid C and that you need to
distinguish different quotes so can't do a perl 1 liner turn the problem
the other way up

Source - with smart quotes

String generation
Extract with po file tools
Rewrite this with a simple script
Extracted string is en_US translation
Base string has quotes substituted back

Compile
Remove smart quotes and replace with ordinary ones
Compile with gcc

(you could extract the translations from the converted file to
save having to mend all the translations but that might actually be long
term worse)

Alan

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Alan Cox
On Sun, 15 Jun 2008 00:32:05 +0100
> gtk_label_new (_("this is a string with "" in it"));

Well firstly it is no longer C. You should be using \2xx\0xx or \xblah
encoding but that is a trivial side item to fix. Assuming you fix that it
obviously compiles and probably comes out ok in a .po file.

In LANG=C you call gtk_label_new with UTF-8 strings. What happens at that
point depends if gtk_label_new ever calls a single C library function
that is locale dependant (eg strcasecmp).

> Now explain how those problems are not caused by this
> 
> gtk_label_new (_("this is a string with \"\" in it"));
> 
> in the en_GB locale where gettext returns "this is a string with "" in it"

In the en_GB.utf-8 locale (there isn't a meaningful non UTF-8 GB locale)
you get gtk_label_new passing UTF-8 to the C library *but* unlike LANG=C
the library *expects* UTF-8 so will give correct answers for the locale.
Ditto en_US.utf-8.

Perhaps Havoc can definitively state whether than gtk function calls a
locale dependant C function at any point ?

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-16 Thread Frederic Crozat
Le samedi 14 juin 2008 à 01:06 +0100, Bastien Nocera a écrit :
> On Fri, 2008-06-13 at 18:01 -0400, Dan Winship wrote:
> > Alan Cox wrote:
> > > GTK/Glib are not the biggest problem here. You also use C library
> > > functions in Gnome applications. Glib/Gtk+ works with the C library in C
> > > locale simply because ASCII is a subset of UTF-8. That ceases to work the
> > > moment you introduce UTF-8 bytesequences into non utf-8 locales.
> > 
> > Are there actually legitimate reasons for anyone to ever use a non-UTF-8
> > locale these days?
> 
> Other than legacy, and wanting to find bugs in programs? Probably not...

Well, you need to discuss that with Chinese / Japanese and some Russian
people ;)

Non-UTF8 locales are still pretty common there.

And I'm also thinking to people who upgraded their system from non-UTF8
locale system and don't want to see their file names become scrambled,
because of the locale changes..

-- 
Frederic Crozat <[EMAIL PROTECTED]>
Mandriva

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Iain *
On Sat, Jun 14, 2008 at 7:40 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
> On Sat, 14 Jun 2008 18:42:24 +0100
> "Iain *" <[EMAIL PROTECTED]> wrote:
>
>> On Sat, Jun 14, 2008 at 3:35 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
>>
>> > Thats because you have your fingers in your ears and don't want to
>> > listen. Consider a career in politics instead.
>>
>> Well, no, you have brought up irrelevant points (to the question at
>> hand) and straw manned any rebuttal of them.
>
> Oh dear.

Ok Alan, explain the problems that this will cause

gtk_label_new (_("this is a string with "" in it"));

Now explain how those problems are not caused by this

gtk_label_new (_("this is a string with \"\" in it"));

in the en_GB locale where gettext returns "this is a string with "" in it"

This is what we are talking about.

Shaun said that Yelp has been doing this for a while and I dont think
any bugs have ever been found with it
I know that my various pieces of software have been doing things like
this and I've never had anyone complaining.
Like I said before, your concerns are certainly very valid in a specific domain
But we aren't talking about that domain and so I don't think they are relevant.

iain
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Patryk Zawadzki
On Sat, Jun 14, 2008 at 1:14 PM, Alexander Jones <[EMAIL PROTECTED]> wrote:
> 2008/6/14 Alan Cox <[EMAIL PROTECTED]>:
>> Note; I am all for the US locale using pretty quotes. I'm just strongly
>> opposed to doing it against the specifications and praying it works out.
>> Particularly when its probably a perl one liner to generate en_US.utf-8
>> locale files.
> Wrong. "Pretty quotes" cannot be distinguished from straight quotes
> without language context. Consider some code that, e.g., generates XML
> output and requires straight quotes. Such a script would break that.
> (We see it already with Wordpress butchering people's pasted code.)

Not that it has anything to do with GNOME but putting structural
markup (XML code) into translatable strings should seriously be
considered a bug. One mistranslation could easily make the application
unusable.

-- 
Patryk Zawadzki
PLD Linux Distribution
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Alan Cox
On Sat, 14 Jun 2008 18:42:24 +0100
"Iain *" <[EMAIL PROTECTED]> wrote:

> On Sat, Jun 14, 2008 at 3:35 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
> 
> > Thats because you have your fingers in your ears and don't want to
> > listen. Consider a career in politics instead.
> 
> Well, no, you have brought up irrelevant points (to the question at
> hand) and straw manned any rebuttal of them.

Oh dear.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Iain *
On Sat, Jun 14, 2008 at 3:35 PM, Alan Cox <[EMAIL PROTECTED]> wrote:

> Thats because you have your fingers in your ears and don't want to
> listen. Consider a career in politics instead.

Well, no, you have brought up irrelevant points (to the question at
hand) and straw manned any rebuttal of them.
Have you considered the politicial sphere yourself by any chance?

iain
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Alan Cox
> Sarcasm aside, if people are using Shift-JIS/KOI8R/RU in translations,
> those strings WILL get fed into UTF-8 string functions and stuff will
> break. We use UTF-8 here, in GNOME-land, right?

If the gnome libraries have built in UTF-8 assumptions yes. But the rest
of the system will work just fine. No idea what other desktops would do
but I guess they'd be fine too except XFce

> (i.e. the other way) is doable though. But I don't see the point other
> than to satisfy your obsession with obsolete character sets from the
> 60's.

I think mean "current standards from the 21st century". That being ANSI
C, Single Unix Specification, and the like. I see your point about the
need to have both kinds of quoting, so the translation work is indeed a
tiny bit harder

> If someone could actually speak out and say what it breaks, we could
> actually get somewhere with this debate. So far I hear no credible
> opposition.

Thats because you have your fingers in your ears and don't want to
listen. Consider a career in politics instead.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Alexander Jones
2008/6/14 Alan Cox <[EMAIL PROTECTED]>:
> I don't know if the use of KOI8R/RU and shift-jis is still "legitimate".
> I guess you would have to ask the users. I also don't know what the
> situation is for usage patterns on non-Linux systems. Sun have always been
> on the ball with unicode but some other vendors are a bit more
> conservative.
Sarcasm aside, if people are using Shift-JIS/KOI8R/RU in translations,
those strings WILL get fed into UTF-8 string functions and stuff will
break. We use UTF-8 here, in GNOME-land, right?

> Note; I am all for the US locale using pretty quotes. I'm just strongly
> opposed to doing it against the specifications and praying it works out.
> Particularly when its probably a perl one liner to generate en_US.utf-8
> locale files.
Wrong. "Pretty quotes" cannot be distinguished from straight quotes
without language context. Consider some code that, e.g., generates XML
output and requires straight quotes. Such a script would break that.
(We see it already with Wordpress butchering people's pasted code.)
Writing a PERL one-liner to convert pretty quotes to straight quotes
(i.e. the other way) is doable though. But I don't see the point other
than to satisfy your obsession with obsolete character sets from the
60's.

If someone could actually speak out and say what it breaks, we could
actually get somewhere with this debate. So far I hear no credible
opposition.
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Iain *
On Fri, Jun 13, 2008 at 8:25 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
>
>> Surely as programmers we can be trusted to know the difference between
>> the cases where a string is destined for the UI and where it is
>> destined for something that is non-UTF8 compatible?
>
> You have an encylopædic knowledge of the internals of every library you
> use ? I thought not.

No, but I'm almost 100% certain that if I put a string with fancy
quotes in a label in glade its not going to be passed to any utf8
incompatible functions.
Which really, is all we're talking about here. Your concerns, while
certainly perfectly valid for a certain domain, do not seem valid to
me at all in the context of what we're discussing and seem to be
somewhat luddite and unhelpful.

iain
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Alan Cox
> > Are there actually legitimate reasons for anyone to ever use a non-UTF-8
> > locale these days?
> 
> Other than legacy, and wanting to find bugs in programs? Probably not...
> Maybe somebody should break the compatibility view and make the C locale
> UTF-8.

Well you can certainly submit a proposal to the C language standards
committee and the POSIX standards committee. We don't control C locale
definitions - they do, and the tool writers work to their definitions.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Alan Cox
On Sat, 14 Jun 2008 01:43:05 +0100
"Alexander Jones" <[EMAIL PROTECTED]> wrote:

> Alan, you seem to be missing the point.

No I'm afraid you are the one who is missing the point here:

> The only places where I am suggesting replacing "" with "" are in existing
> gettext calls, which *are* UTF-8 whether they need to be or not, and are
> always used with UTF-8 string functions.

The output of a locale C or untranslated string from _("") is the input.
The output in those locales must be ASCII for some things. The input must
therefore be ASCII.

> The issue is whether the compiler will bork when it sees bytes with
> MSB set. So far nobody has been able to say with any conviction
> whether it will.

The C standard answers this. Previous mails answer this. You apparently
don't want to hear the answer.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Alan Cox
On Sat, 14 Jun 2008 01:44:09 +0100
"Alexander Jones" <[EMAIL PROTECTED]> wrote:

> So how do we go about coming up with an official position for this? If
> I start cooking patches here and there I don't want to have to make
> the same argument with every maintainer... :)

It seems the standards documents already have an official position on
this if you would actually read them or listen to what they say.

Use nice quotes sure - but generate an en_US.utf-8 po file for it as you
are supposed to do. Perl one liner contest opened...
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-14 Thread Alan Cox
On Fri, 13 Jun 2008 18:01:22 -0400
Dan Winship <[EMAIL PROTECTED]> wrote:

> Alan Cox wrote:
> > GTK/Glib are not the biggest problem here. You also use C library
> > functions in Gnome applications. Glib/Gtk+ works with the C library in C
> > locale simply because ASCII is a subset of UTF-8. That ceases to work the
> > moment you introduce UTF-8 bytesequences into non utf-8 locales.
> 
> Are there actually legitimate reasons for anyone to ever use a non-UTF-8
> locale these days?

The standards say the default locale (ie if you haven't set one) is ASCII
(Locale "C"). So yes people do.

I don't know if the use of KOI8R/RU and shift-jis is still "legitimate".
I guess you would have to ask the users. I also don't know what the
situation is for usage patterns on non-Linux systems. Sun have always been
on the ball with unicode but some other vendors are a bit more
conservative.

Note; I am all for the US locale using pretty quotes. I'm just strongly
opposed to doing it against the specifications and praying it works out.
Particularly when its probably a perl one liner to generate en_US.utf-8
locale files.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Alexander Jones
So how do we go about coming up with an official position for this? If
I start cooking patches here and there I don't want to have to make
the same argument with every maintainer... :)
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Alexander Jones
Alan, you seem to be missing the point. The only places where I am
suggesting replacing "" with "" are in existing gettext calls, which
*are* UTF-8 whether they need to be or not, and are always used with
UTF-8 string functions.

The issue is whether the compiler will bork when it sees bytes with
MSB set. So far nobody has been able to say with any conviction
whether it will.
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Bastien Nocera
On Fri, 2008-06-13 at 18:01 -0400, Dan Winship wrote:
> Alan Cox wrote:
> > GTK/Glib are not the biggest problem here. You also use C library
> > functions in Gnome applications. Glib/Gtk+ works with the C library in C
> > locale simply because ASCII is a subset of UTF-8. That ceases to work the
> > moment you introduce UTF-8 bytesequences into non utf-8 locales.
> 
> Are there actually legitimate reasons for anyone to ever use a non-UTF-8
> locale these days?

Other than legacy, and wanting to find bugs in programs? Probably not...
Maybe somebody should break the compatibility view and make the C locale
UTF-8.

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Alan Cox
On Fri, 13 Jun 2008 19:41:15 +0100
"Iain *" <[EMAIL PROTECTED]> wrote:

> On Fri, Jun 13, 2008 at 4:12 PM, Alan Cox <[EMAIL PROTECTED]> wrote:
> 
> > What about printing to files ? An "nm" also rather suggests that gnome
> > apps do use printf and fprintf somewhat and many of the other functions
> > mentioned. syslog() is another that is used.
> 
> I don't know what your use cases are, but I don't find myself passing
> UI strings to syslog very often.

syslog is just one of a list of functions a quick nm check found that
showed gnome apps use the C libraries not just glib/gtk. I suspect stuff
like string sort ordering and strigth lengths are more of an issue.

> Surely your hypothetical case of syslog
> (_("string_containing_normal_quotes")) is going to fail in the same
> way if the translation has any utf8 in it.

Who knows. You'd have to know precisely what functions syslog called that
were locale sensitive...

> Surely as programmers we can be trusted to know the difference between
> the cases where a string is destined for the UI and where it is
> destined for something that is non-UTF8 compatible?

You have an encylopædic knowledge of the internals of every library you
use ? I thought not.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Iain *
On Fri, Jun 13, 2008 at 4:12 PM, Alan Cox <[EMAIL PROTECTED]> wrote:

> What about printing to files ? An "nm" also rather suggests that gnome
> apps do use printf and fprintf somewhat and many of the other functions
> mentioned. syslog() is another that is used.

I don't know what your use cases are, but I don't find myself passing
UI strings to syslog very often.
Surely your hypothetical case of syslog
(_("string_containing_normal_quotes")) is going to fail in the same
way if the translation has any utf8 in it.

Surely as programmers we can be trusted to know the difference between
the cases where a string is destined for the UI and where it is
destined for something that is non-UTF8 compatible?
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Alan Cox
> Since you don't know whether the result of _("foo") will be strict ASCII,
> you must always treat it as if it were not. GLib/GTK+ *requires* UTF-8
> strings for all (most?) of its string handling functions...

GTK/Glib are not the biggest problem here. You also use C library
functions in Gnome applications. Glib/Gtk+ works with the C library in C
locale simply because ASCII is a subset of UTF-8. That ceases to work the
moment you introduce UTF-8 bytesequences into non utf-8 locales.

> ...so afaics calling these non-UTF8 aware functions is a bug regardless of
> the current locale.

You are completely wrong. These functions are *locale* aware. In a non
utf-8 locale they take non-utf8 input. In a utf-8 locale they take utf-8
input. Feeding them the wrong thing is broken and will give wrong answers.

> > You've also ignored the fact that output of utf-8 bytes in a non utf-8
> > mode is going to have undefined results as well.
> 
> All output must be handled by g_print, not by printf so this is also a
> non-issue I think.

What about printing to files ? An "nm" also rather suggests that gnome
apps do use printf and fprintf somewhat and many of the other functions
mentioned. syslog() is another that is used.
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “ ” instead of ""

2008-06-13 Thread Wouter Bolsterlee
2008-06-13 klockan 16:44 skrev Alan Cox:
> If your string is untranslated then _("foo") -> "foo". If your locale is
> not unicode then this places utf8 symbols into non-utf8 locales.

Since you don't know whether the result of _("foo") will be strict ASCII,
you must always treat it as if it were not. GLib/GTK+ *requires* UTF-8
strings for all (most?) of its string handling functions...

> [snip]
> If your input string is not ASCII then functions like:
>   strcoll, strxfrm, strcasecmp, isupper, islower, isalpha, ... etc
> all start giving undefined answers.

...so afaics calling these non-UTF8 aware functions is a bug regardless of
the current locale.

> You've also ignored the fact that output of utf-8 bytes in a non utf-8
> mode is going to have undefined results as well.

All output must be handled by g_print, not by printf so this is also a
non-issue I think.

  mvrgr, Wouter

-- 
:wq   mail [EMAIL PROTECTED]
  web http://uwstopia.nl

i was alone :: falling free :: trying my best not to forget   -- placebo


signature.asc
Description: Digital signature
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Alan Cox
> Some people are worried about string functions breaking. I really
> don't see how this is the case, seeing as we're doing g_some_function
> (_("Some ASCII string")) which is replaced with a UTF-8 string at
> runtime anyway.
> 
> Does anyone have any actual proof of UTF-8 in our translatable strings
> breaking C?

Your reasoning is completely wrong. Please take a bit of time to
understand how internationalisation and localisation logic actually work.
Your model for making the decision is also wrong. The question is not
"have we made it break yet" it is "is the action we propose to take one
which has defined correct behaviour". It's as wrong to say "oh it'll
work" about this as to say "gcc happens to do this in the right order,
who cares about correctness" or "I've never seen a NULL pointer here so
why check".

In the kernel world we have made those assumptions now and then (usually
as an oversight) and when gcc or tools updates broke them the tools
people were quite definitely *not* going to make their compiler work
around our problem. So you can get burned badly in the future even if not
today.

If your string is untranslated then _("foo") -> "foo". If your locale is
not unicode then this places utf8 symbols into non-utf8 locales.
Similarly if you are in the default locale (which is where you end up if
you don't set one or the environment variable gets lost etc) you end up
with ("foo")->foo.

Now if the resulting translation is ASCII all is well because ASCII is a
strict subset of the locales we support. If your input string is not
ASCII then functions like:

strcoll, strxfrm, strcasecmp, isupper, islower, isalpha, ... etc

all start giving undefined answers.

You've also ignored the fact that output of utf-8 bytes in a non utf-8
mode is going to have undefined results as well.

Keep the "nice" quoting in the translations. If need be generate
en_US.utf-8 from the Makefile using a script. en_GB.utf-8 is already
mostly done this way so teaching en_GB.utf-8 to use nice quoting is
trivial. For French and German the rules are different anyway so will
need to be done in those translations separately.

The po system is designed to let you do smart quoting, it is also
designed so you can do this in a defined correct and proper manner rather
than trying to cheat and digging a huge hole to fall down later.

> Somebody said that any byte with a the MSB set (i.e. 0x80-0xFF) will
> cause some compilers to break. Is this true? 

You are out of the C language spec at that point. It is entitled to play
cribbage if it wants. That of itself is not a problem as you can use
slash notation for unprintable symbols anyway - it just looks uly.
Also don't forget Gnome supports multiple languages not just C, and many
use po files. Whatever is chosen must work for all of these.

If you want to embed those bytes in a C program use \xxx notation for
them .. ie  _("\2??\0??hello\2??\0?? said the dog")

Far cleaner to generate an en_US po file really isn't it 8)

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-06-13 Thread Alexander Jones
Hi list

To reignite this discussion now that I've finished my exams...

I posted this on Simos' blog a while back, but the discussion there
had died off it seems, so I'll repost here.

UTF-8 is designed so that subsequences are unambiguous. You won't get
a byte less than 0x80 in any part of a multi-byte sequence. bytes
0x00-0x7F map directly to 7-bit ASCII.

Some people are worried about string functions breaking. I really
don't see how this is the case, seeing as we're doing g_some_function
(_("Some ASCII string")) which is replaced with a UTF-8 string at
runtime anyway.

Does anyone have any actual proof of UTF-8 in our translatable strings
breaking C?

Somebody said that any byte with a the MSB set (i.e. 0x80-0xFF) will
cause some compilers to break. Is this true? Can they be fixed? And if
not, do we have to support them?

If we can come to an agreement, I will write a Live page giving
guidelines on how to use directional quotation marks, for those who
may be unfamiliar with typing them, etc.

Alex
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-19 Thread Alan Cox
On Wed, 14 May 2008 04:17:09 -0400
"Havoc Pennington" <[EMAIL PROTECTED]> wrote:

> As James says on Simos's blog post, all strings inside GTK apps are
> defined to be UTF-8 regardless of locale. GLib and GTK will convert on
> the fly to locale encoding if they print to a terminal.

gtk may do, but what will glibc do with them  ?
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-19 Thread Havoc Pennington
As James says on Simos's blog post, all strings inside GTK apps are
defined to be UTF-8 regardless of locale. GLib and GTK will convert on
the fly to locale encoding if they print to a terminal. So there
should be no issue with "C" locale other than possibly some odd
escaping. (Which could in theory be cured by modifying the charset
converter.)

(Though of course the C locale is completely broken and always wrong
to use for messages, but ignoring that for a moment.)

Additionally, there's no rule that a given translation can only
contain strings in the language in question. For example, in the
English translation, I could spell a French or Japanese word correctly
in its native character set, if I wanted to refer to that word. That's
one of the reasons Unicode is used rather than the old
language-specific encodings.

Havoc
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-15 Thread Tom Tromey
> "Shaun" == Shaun McCance <[EMAIL PROTECTED]> writes:

Shaun> But plenty of people have been putting UTF-8 string
Shaun> literals in C code for some time, seemingly without
Shaun> problems.

Yes, it works fine with gcc.  You have to make sure you set the
execution character set properly, but the default on most platforms is
UTF-8.

The remaining thing that really does not work in gcc in this area is
UCNs.  You're unlikely to ever want those, though, IMNSHO.

I don't know what other compilers do or don't do.

Tom
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-15 Thread Shaun McCance
On Thu, 2008-05-15 at 11:19 -0500, Federico Mena Quintero wrote: 
> On Tue, 2008-05-13 at 12:20 -0500, Shaun McCance wrote:
> 
> > If I have to use the en translation, then I have to put
> > this string in the source code:
> > 
> >   The file "%s" could not be found.
> > 
> > Then I have to run 'intltool-update en', open en.po,
> > and add the translation.  That's more steps, none of
> > which involve make.  How does make help me?
> 
> C is hard.  Unicode didn't exist in the 1970s.  Get over it.
> 
> If you want UTF-8 strings in your source code without escaping non-ASCII
> chars, use C# or another modern language which supports that.

But plenty of people have been putting UTF-8 string
literals in C code for some time, seemingly without
problems.

Regardless, the discussion seems to be more about
C-the-locale, not C-the-programming-language, and
whether or not it's OK to have UTF-8 in the C locale.
I had mentioned that gnome-doc-utils has UTF-8 in its
POT file, which Alan called a bug.  All the messages
in gnome-doc-utils are in XML files.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-15 Thread Tor Lillqvist
> utf-8 encoded litteral DO work in C, without glitch.

Assuming the functions in any library (including the C library) you
pass such UTF-8 encoded strings to expects them to be UTF-8...

And UTF-8-encoded wide string literals hardly work correctly unless
you explicitly tell the compiler that the codeset of the source file
is UTF-8, so that it knows how to convert from UTF-8 in the file to
the correct wchar_t sequence.

--tml
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-15 Thread Hubert Figuiere

On Thu, 2008-05-15 at 11:19 -0500, Federico Mena Quintero wrote:
> C is hard.  Unicode didn't exist in the 1970s.  Get over it.
> 
> If you want UTF-8 strings in your source code without escaping
> non-ASCII
> chars, use C# or another modern language which supports that.

utf-8 encoded litteral DO work in C, without glitch. The problem is
mostly the editors screwing this up.


Hub

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-15 Thread Simos Xenitellis
O/H Shaun McCance έγραψε:
> On Tue, 2008-05-13 at 17:36 +0100, Alan Cox wrote:
>   
>>> Honestly, other than being pedantic, I don't see the
>>> problem with UTF-8 in the C locale.  Does it cause
>>> any *actual* problems?  I've never once gotten a bug
>>> report against g-d-u about this.
>>>   
>> Sort order, comparisons, printing, string lengths when using locale aware
>> functions, and no doubt a few more that for the moment have escaped me.
>>
>> Use the tools to spec and you get reliable predictable results, do
>> otherwise and it all gets sloppy and buggy. Would you rely on undefined C
>> behaviour in Gnome code ?
>>
>> The discussions about it being work are also bollocks (to use a fine bit
>> of en_GB). Make was invented to handle such trivial tasks for you.
>> 
>
> OK, time for a concrete example.  I'm writing a dialog
> with the following message:
>
>   The file “%s” could not be found.
>
> This is a message that gets put onto a gray box on the
> screen.  It's not put into any sort of list that gets
> sorted.  I'm not comparing it to anything or taking its
> length (and if I were, I'd use the GLib functions which
> Do The Right Thing).
>
> If I have to use the en translation, then I have to put
> this string in the source code:
>
>   The file "%s" could not be found.
>
> Then I have to run 'intltool-update en', open en.po,
> and add the translation.  That's more steps, none of
> which involve make.  How does make help me?
>   
I suppose make would invoke the script that would do the menial task for 
the en translations.
You normally would not edit by hand the en/en_US translations.

Simos
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-15 Thread Federico Mena Quintero
On Tue, 2008-05-13 at 12:20 -0500, Shaun McCance wrote:

> If I have to use the en translation, then I have to put
> this string in the source code:
> 
>   The file "%s" could not be found.
> 
> Then I have to run 'intltool-update en', open en.po,
> and add the translation.  That's more steps, none of
> which involve make.  How does make help me?

C is hard.  Unicode didn't exist in the 1970s.  Get over it.

If you want UTF-8 strings in your source code without escaping non-ASCII
chars, use C# or another modern language which supports that.

  Federico

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-15 Thread Simos Xenitellis
O/H Thomas Thurman έγραψε:
> Ysgrifennodd Alan Cox <[EMAIL PROTECTED]>:
>   
>> Sort order, comparisons, printing, string lengths when using locale aware
>> functions, and no doubt a few more that for the moment have escaped me.
>>
>> Use the tools to spec and you get reliable predictable results, do
>> otherwise and it all gets sloppy and buggy. Would you rely on undefined C
>> behaviour in Gnome code ?
>> 
>
> I'm surprised that it's been a whole day and nobody's jumped out
> saying "Non-ASCII encodings for source strings in gettext files are
> broken?  Why, what a perfect opportunity to switch to xliff!"
>   
xliff support to the gettext level could require a gyoc program (google 
year of code).

I made a blog post on the non-ascii issue which received a few comments,
http://blogs.gnome.org/simos/2008/05/14/should-ui-strings-in-source-code-have-non-ascii-characters/

My view from all comments goes like this,

a. The canonical way to deal with UI messages in the source code is to 
keep them simple (ASCII), and put any variations in the appropriate 
locale. For en_US, use the translation files for en_US.

In localisation terms, a single change in a message in the source code 
affects over 60 languages, so UI messages in the source code should stay 
simple and not change.

b. Going for (a) would entail quite some work that we do not appear to 
have people to do. Any en_US translators? Probably not.

c. It appears that the GNOME apps do not fail miserably if there are 
UTF-8 strings in the source files. Such strings have been there since 
GNOME 2.20, and possibly earlier. However, these were high level 
applications (evince, epiphany, etc), which means that we do not know 
for sure yet if someone who works directly with glib, gtk+ user would be 
affected (for example, in embedded systems).
The easy way to figure out if they are affected is to add a UTF-8 
character in some message in glib, then wait and see ;-).

Simos

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-14 Thread Thomas Thurman
Ysgrifennodd Alan Cox <[EMAIL PROTECTED]>:
> Sort order, comparisons, printing, string lengths when using locale aware
> functions, and no doubt a few more that for the moment have escaped me.
>
> Use the tools to spec and you get reliable predictable results, do
> otherwise and it all gets sloppy and buggy. Would you rely on undefined C
> behaviour in Gnome code ?

I'm surprised that it's been a whole day and nobody's jumped out
saying "Non-ASCII encodings for source strings in gettext files are
broken?  Why, what a perfect opportunity to switch to xliff!"

T
-- 
Thomas Thurman, tthurman at gnome, http://blogs.gnome.org/tthurman
You'll be lucky.
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Simos Xenitellis
O/H BJörn Lindqvist έγραψε:
> On Tue, May 13, 2008 at 2:19 PM, Christian Neumair <[EMAIL PROTECTED]> wrote:
>   
>> Alex Jones proposed [1] to change the quotation marks in Nautilus
>>  strings from the ASCII representation "..." to the unicode variant
>>  "...".
>>
>>  I think the proposed quotation marks are aesthetically more pleasing,
>>  but I don't want to change this unless there is a GNOME-wide policy.
>>
>>  I hereby propose to establish a GNOME policy of using "..." for
>>  quotations. Comments, objections?
>> 
>
> Great idea!
>   
I blogged about it at
http://blogs.gnome.org/simos/2008/05/14/should-ui-strings-in-source-code-have-non-ascii-characters/
There might be some further input.

My main concern is how systems such as FreeBSD with GNOME behave 
(apparently they use non-UTF8 encodings). I did not manage to duplicate 
the behaviour on Ubuntu, so if someone has a system with legacy 8-bit 
encoding, could you please check?

Simos

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Matej Cepl
On 2008-05-13, 14:45 GMT, Pat Suwalski wrote:
> My objection may seem silly, but since there is no way to type it on any 
> keyboard out there, that's a bit of a hindrance. Short of using the 
> character map and searching, one has to resolve to using "smart 
> substitution" editors like OpenOffice to get the characters.

http://en.wikipedia.org/wiki/Compose_key

Matěj

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread BJörn Lindqvist
On Tue, May 13, 2008 at 2:19 PM, Christian Neumair <[EMAIL PROTECTED]> wrote:
> Alex Jones proposed [1] to change the quotation marks in Nautilus
>  strings from the ASCII representation "..." to the unicode variant
>  "...".
>
>  I think the proposed quotation marks are aesthetically more pleasing,
>  but I don't want to change this unless there is a GNOME-wide policy.
>
>  I hereby propose to establish a GNOME policy of using "..." for
>  quotations. Comments, objections?

Great idea!

-- 
mvh Björn
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Matthew Paul Thomas
Wouter Bolsterlee wrote on 13/05/08 17:19:
> 
> 2008-05-13 klockan 16:19 skrev Christian Neumair:
>...
>> I hereby propose to establish a GNOME policy of using “...” for
>> quotations. Comments, objections?

There is a test case for this: Epiphany uses typographical quote marks
throughout its interface. (Bravo to the Epiphany developers.) So if this
was going to cause trouble, it would have done so by now. Has it?

> Why not single quotation marks: ‘ and ’ instead? Many people associate
> double quotes to verbatim speech, while this is almost never the case
> in user interfaces.

That people associate double quote marks with speech does not mean
single quotes will be more obvious for the things quoted in user interfaces.

Anyway, the answer to your question is that double quote marks are
easier to see than single ones, which is important at low resolutions
such as computer screens. Newspapers typically use double quotes for
much the same reason (small print on cheap paper), sometimes switching
to single quotes only for headlines where legibility is not an issue.

> I would also like to point out these sites:
> 
>   - The “Blog” of “Unnecessary” Quotation Marks
> http://quotation-marks.blogspot.com/
> 
>   - The Gallery Of "Misused" Quotation Marks
> http://www.juvalamu.com/qmarks/
> 
> ...since quotation marks are often used inappropriately.
>...

And in a similar vein, a site decrying the use of ugly Ascii quotes in
high-profile settings: 

Cheers
-- 
Matthew Paul Thomas
http://mpt.net.nz/
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Pat Suwalski
As Shaun points out, it gets a little convoluted.

Alan Cox wrote:
> Which rules does Canada follow for the ending of a sentence with quoted
> text ?
>   "quoted text."
> or
>   "quoted text". 
> 
> That might need a locale anyway

Assuming that British is punctuation outside of the quotes,

en_US: “That color is nice.”
en_CA: “That colour is nice.”
en_GB: “That colour is nice”.
en_AU: Yet another variant?

Leads to a possibility of 4 translations where there were two before. 
Anyway, this is probably not particularly constructive to the debate. 
Not sure where you were going with the question, but the point is that's 
it's mostly minutia that just isn't needed.

--Pat
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Shaun McCance
On Tue, 2008-05-13 at 17:33 +0100, Alan Cox wrote:
> On Tue, 13 May 2008 12:22:51 -0400
> Pat Suwalski <[EMAIL PROTECTED]> wrote:
> 
> > Alan Cox wrote:
> > > Put the English quotes in the en_US and en_GB translations, put German
> > > quotes in the de ones and so on.
> > 
> > This, if course, makes something like the very tiny en_CA locale into a 
> > rather full locale. I suppose many generic messages can go into just "en".
> 
> Which rules does Canada follow for the ending of a sentence with quoted
> text ?
>   "quoted text."
> or
>   "quoted text". 
> 
> That might need a locale anyway

Most English locales besides American put punctuation
outside quotation marks, unless it logically belongs
inside the quotation marks.

It should be noted, however, that even many Americans
prefer the logical punctuation placement, especially
within the computer industry.  The thread-starter was
about Nautilus, and I suspect the bulk of the cases
involve quotation marks surrounding file names or
other identifiers.  CMS has this to say (¶6.8):

  In computer-related writing, in which a file name or
  other character string enclosed in quotation marks might
  be rendered inaccurate or ambiguous by the addition of
  punctuation within the quotation marks, the alternative
  system may be used

The "alternative system" here is logical quotation.
For the majority of cases we're considering (quoting
file names and such), everybody should use logical
quotation, so the issue is moot.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Shaun McCance
On Tue, 2008-05-13 at 17:36 +0100, Alan Cox wrote:
> > Honestly, other than being pedantic, I don't see the
> > problem with UTF-8 in the C locale.  Does it cause
> > any *actual* problems?  I've never once gotten a bug
> > report against g-d-u about this.
> 
> Sort order, comparisons, printing, string lengths when using locale aware
> functions, and no doubt a few more that for the moment have escaped me.
> 
> Use the tools to spec and you get reliable predictable results, do
> otherwise and it all gets sloppy and buggy. Would you rely on undefined C
> behaviour in Gnome code ?
> 
> The discussions about it being work are also bollocks (to use a fine bit
> of en_GB). Make was invented to handle such trivial tasks for you.

OK, time for a concrete example.  I'm writing a dialog
with the following message:

  The file “%s” could not be found.

This is a message that gets put onto a gray box on the
screen.  It's not put into any sort of list that gets
sorted.  I'm not comparing it to anything or taking its
length (and if I were, I'd use the GLib functions which
Do The Right Thing).

If I have to use the en translation, then I have to put
this string in the source code:

  The file "%s" could not be found.

Then I have to run 'intltool-update en', open en.po,
and add the translation.  That's more steps, none of
which involve make.  How does make help me?

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Simos Xenitellis
O/H Shaun McCance έγραψε:
> On Tue, 2008-05-13 at 16:22 +0100, Simos Xenitellis wrote:
>   
>> I think the most important question to answer is whether we want to make 
>> POT files non-ASCII. That is, once messages have “”‘’, etc, then GNOME 
>> will be available for Unicode locales only.
>> If one starts GNOME with a C or a legacy 8-bit locale, it will not work.
>> 
>
> Don't we already have plenty of non-ASCII POT files?
> I know gnome-doc-utils is non-ASCII.
>> Personally I would say no to “” at this stage.
>> 
>
> I'm just wondering, if not now, when?  What do we have yet
> to accomplish that's blocking the use of proper typographic
> quotes?  I'm not trying to troll here.  It just seems to me
> that we've had all this functionality for quite a while, but
> we're still typing as if we're on old typewriters.  What do
> we need to do, as programmers, to get the world out of its
> ASCII rut?
Here is a link to the recent discussion about non-ASCII in translation 
files (=POT or source files),
http://www.mail-archive.com/[EMAIL PROTECTED]/msg05803.html

As a summary of that discussion, the general view was that it's ok to 
use UTF-8 in source files.
Karl Eichwalder then mentioned
“You'd better avoid such eye-candy stuff in source code. Instead do 
proper English translations and add en_US and en_GB files.”
Abel added that he remembered a previous discussion of a GNOME policy 
for "source code == en_US" (I presume he meant ASCII).
There was interest for a reference to that discussion but none  was 
provided and the thread ended there.

What I see here is that it would be good to rekindle that discussion 
"use of non-ascii characters in source translation messages", and get 
whatever the outcome as a GNOME policy.

Simos

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Alan Cox
> Honestly, other than being pedantic, I don't see the
> problem with UTF-8 in the C locale.  Does it cause
> any *actual* problems?  I've never once gotten a bug
> report against g-d-u about this.

Sort order, comparisons, printing, string lengths when using locale aware
functions, and no doubt a few more that for the moment have escaped me.

Use the tools to spec and you get reliable predictable results, do
otherwise and it all gets sloppy and buggy. Would you rely on undefined C
behaviour in Gnome code ?

The discussions about it being work are also bollocks (to use a fine bit
of en_GB). Make was invented to handle such trivial tasks for you.
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Alan Cox
On Tue, 13 May 2008 12:22:51 -0400
Pat Suwalski <[EMAIL PROTECTED]> wrote:

> Alan Cox wrote:
> > Put the English quotes in the en_US and en_GB translations, put German
> > quotes in the de ones and so on.
> 
> This, if course, makes something like the very tiny en_CA locale into a 
> rather full locale. I suppose many generic messages can go into just "en".

Which rules does Canada follow for the ending of a sentence with quoted
text ?
"quoted text."
or
"quoted text". 

That might need a locale anyway
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Shaun McCance
On Tue, 2008-05-13 at 16:54 +0100, Alan Cox wrote:
> > Don't we already have plenty of non-ASCII POT files?
> > I know gnome-doc-utils is non-ASCII.
> 
> That would be a bug...
> 
> > that we've had all this functionality for quite a while, but
> > we're still typing as if we're on old typewriters.  What do
> > we need to do, as programmers, to get the world out of its
> > ASCII rut?
> 
> Put the English quotes in the en_US and en_GB translations, put German
> quotes in the de ones and so on.

Who's going to manage the en locale?  As a developer,
when I write a string, I don't want to have to write
some bastardized form first, then go add the actual
string somewhere else.

The en locale is nice for temporary typo fixes when
we're late in a release cycle.  Anything else is just
an annoyance to developers.

Honestly, other than being pedantic, I don't see the
problem with UTF-8 in the C locale.  Does it cause
any *actual* problems?  I've never once gotten a bug
report against g-d-u about this.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Pat Suwalski
Alan Cox wrote:
> Put the English quotes in the en_US and en_GB translations, put German
> quotes in the de ones and so on.

This, if course, makes something like the very tiny en_CA locale into a 
rather full locale. I suppose many generic messages can go into just "en".

--Pat
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “ ” instead of ""

2008-05-13 Thread Wouter Bolsterlee
2008-05-13 klockan 16:19 skrev Christian Neumair:
> Alex Jones proposed [1] to change the quotation marks in Nautilus
> strings from the ASCII representation "..." to the unicode variant
> “...”.
> 
> I think the proposed quotation marks are aesthetically more pleasing,
> but I don't want to change this unless there is a GNOME-wide policy.
> 
> I hereby propose to establish a GNOME policy of using “...” for
> quotations. Comments, objections?

Why not single quotation marks: ‘ and ’ instead? Many people associate
double quotes to verbatim speech, while this is almost never the case in
user interfaces.

I would also like to point out these sites:

  - The “Blog” of “Unnecessary” Quotation Marks
http://quotation-marks.blogspot.com/

  - The Gallery Of "Misused" Quotation Marks
http://www.juvalamu.com/qmarks/

...since quotation marks are often used inappropriately.

  mvrgr, Wouter

-- 
:wq   mail [EMAIL PROTECTED]
  web http://uwstopia.nl

well i'm happy when it's good :: and when it's bad i cry  -- the who


signature.asc
Description: Digital signature
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Alan Cox
> Don't we already have plenty of non-ASCII POT files?
> I know gnome-doc-utils is non-ASCII.

That would be a bug...

> that we've had all this functionality for quite a while, but
> we're still typing as if we're on old typewriters.  What do
> we need to do, as programmers, to get the world out of its
> ASCII rut?

Put the English quotes in the en_US and en_GB translations, put German
quotes in the de ones and so on.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Alan Cox
> They also tend to fail horribly when pasting into a non-Unicode 
> terminal, which is still often the case over SSH. Probably not a huge 
> desktop consideration, though. Every distribution I know of uses Unicode 
> by default on the local terminal at this point.

Doesn't matter for translations but the C locale is ASCII (and sorting is
only defined for ASCII) so the base strings that get translated should
always be ASCII themselves. 

What people do with French/German/English/US/.. quoting rules after that
is a different matter but surely belongs to the language team.

Alan
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Shaun McCance
On Tue, 2008-05-13 at 16:22 +0100, Simos Xenitellis wrote:
> 
> I think the most important question to answer is whether we want to make 
> POT files non-ASCII. That is, once messages have “”‘’, etc, then GNOME 
> will be available for Unicode locales only.
> If one starts GNOME with a C or a legacy 8-bit locale, it will not work.

Don't we already have plenty of non-ASCII POT files?
I know gnome-doc-utils is non-ASCII.

> Personally I would say no to “” at this stage.

I'm just wondering, if not now, when?  What do we have yet
to accomplish that's blocking the use of proper typographic
quotes?  I'm not trying to troll here.  It just seems to me
that we've had all this functionality for quite a while, but
we're still typing as if we're on old typewriters.  What do
we need to do, as programmers, to get the world out of its
ASCII rut?

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Patryk Zawadzki
On Tue, May 13, 2008 at 5:22 PM, Simos Xenitellis
<[EMAIL PROTECTED]> wrote:
>  I think the most important question to answer is whether we want to make
>  POT files non-ASCII. That is, once messages have ""'', etc, then GNOME
>  will be available for Unicode locales only.
>  If one starts GNOME with a C or a legacy 8-bit locale, it will not work.

For regular strings that's a non-issue as you can keep '"' in C
locale. For the rest why not just add '"%s"' to translatable strings
then use this printf macro to quote strings that are dynamic?

-- 
Patryk Zawadzki
PLD Linux Distribution
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Claudio Saavedra
El mar, 13-05-2008 a las 10:18 -0500, Shaun McCance escribió:
> > The only problem I see is some languages use different characters
> for
> > quoting. ASCII ones are somewhat neutral.
> 
> Other languages will translate the strings anyway.

In fact, we in Spanish change quotation marks to «». We'll keep doing
even if the quotation marks are changed to “”, so that's not an issue.

Claudio

-- 
Claudio Saavedra <[EMAIL PROTECTED]>

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Shaun McCance
On Tue, 2008-05-13 at 10:45 -0400, Pat Suwalski wrote:
> My objection may seem silly, but since there is no way to type it on any 
> keyboard out there, that's a bit of a hindrance. Short of using the 
> character map and searching, one has to resolve to using "smart 
> substitution" editors like OpenOffice to get the characters.

There ought to be compose key sequences for the various
types of quotation marks.  According to the references
I can find, Compose+<+" should give a curly left double
quote, but it doesn't seem to work on my machine.

The character map should *really* list the compose key
sequence for a character in the Character Details tab.

> They also tend to fail horribly when pasting into a non-Unicode 
> terminal, which is still often the case over SSH. Probably not a huge 
> desktop consideration, though. Every distribution I know of uses Unicode 
> by default on the local terminal at this point.

This is indeed a problem.  On numerous occasions, I've
had to put away my "ssh && emacs -nw" and use gedit to
open a remote file, because Unicode got garbled over
the wire.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Simos Xenitellis
O/H Pat Suwalski έγραψε:
> My objection may seem silly, but since there is no way to type it on any 
> keyboard out there, that's a bit of a hindrance. Short of using the 
> character map and searching, one has to resolve to using "smart 
> substitution" editors like OpenOffice to get the characters.
>   
The following keyboard layouts allow you to type those double quote marks:

al ba be br by ca ch cz de dk ee epo es fi fo fr gb hr hu ie is it latam 
lt lv mao me mk mn mt nl no pl pt ro rs se si sk tr ua us za

Layouts that are missing from above may not need them (for example, gr, 
which uses «»).

An issue is with some default layouts that may not enable those double 
quotes (you have to pick the appropriate layout variant). That is the 
case with “us”, where the default layout does not include the said 
characters.

In most layouts (such as the default for GB), “” are found when you 
press AltGr+v, AltGr+b.
For US, you need to pick the “intl” variant, and here it follows its 
own, with AltGr+[, AltGr+] respectively.
> They also tend to fail horribly when pasting into a non-Unicode 
> terminal, which is still often the case over SSH. Probably not a huge 
> desktop consideration, though. Every distribution I know of uses Unicode 
> by default on the local terminal at this point.
>   
This situation (whether to put “” or not) is similar to whether to 
include ellipsis in translation messages instead of “...”. I am not sure 
what was the resolution for that issue.

The two issues have similarities and an important difference; the text 
of the menu items cannot be copied by default (unless an accessibility 
application is active), which means that the text will probably not make 
it out of the application.

I think the most important question to answer is whether we want to make 
POT files non-ASCII. That is, once messages have “”‘’, etc, then GNOME 
will be available for Unicode locales only.
If one starts GNOME with a C or a legacy 8-bit locale, it will not work.

Personally I would say no to “” at this stage.

Simos
> --Pat
>
> Christian Neumair wrote:
>   
>> Alex Jones proposed [1] to change the quotation marks in Nautilus
>> strings from the ASCII representation "..." to the unicode variant
>> “...”.
>>
>> I think the proposed quotation marks are aesthetically more pleasing,
>> but I don't want to change this unless there is a GNOME-wide policy.
>>
>> I hereby propose to establish a GNOME policy of using “...” for
>> quotations. Comments, objections?
>>
>> best regards,
>>  Christian Neumair
>>
>> [1] http://bugzilla.gnome.org/show_bug.cgi?id=532777
>>
>> 

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Matteo Settenvini
Well, that brings up the problem of quoting text in different languages.

For example, as far as I know:

* “English text”
* „German text“
* «French text»
* ...and so on

If this change has to be made, someone should warn the translators to
use consistently translated quote-marks all around.

But I'd rather stick with the neutral symbol.

Cheers,
matteo


Il giorno mar, 13/05/2008 alle 10.45 -0400, Pat Suwalski ha scritto:
> My objection may seem silly, but since there is no way to type it on any 
> keyboard out there, that's a bit of a hindrance. Short of using the 
> character map and searching, one has to resolve to using "smart 
> substitution" editors like OpenOffice to get the characters.
> 
> They also tend to fail horribly when pasting into a non-Unicode 
> terminal, which is still often the case over SSH. Probably not a huge 
> desktop consideration, though. Every distribution I know of uses Unicode 
> by default on the local terminal at this point.
> 
> --Pat
> 
> Christian Neumair wrote:
> > Alex Jones proposed [1] to change the quotation marks in Nautilus
> > strings from the ASCII representation "..." to the unicode variant
> > “...”.
> > 
> > I think the proposed quotation marks are aesthetically more pleasing,
> > but I don't want to change this unless there is a GNOME-wide policy.
> > 
> > I hereby propose to establish a GNOME policy of using “...” for
> > quotations. Comments, objections?
> > 
> > best regards,
> >  Christian Neumair
> > 
> > [1] http://bugzilla.gnome.org/show_bug.cgi?id=532777
> > 
> ___
> desktop-devel-list mailing list
> desktop-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list


signature.asc
Description: Questa è una parte del messaggio	firmata digitalmente
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Shaun McCance
On Tue, 2008-05-13 at 17:16 +0200, Patryk Zawadzki wrote:
> On Tue, May 13, 2008 at 4:19 PM, Christian Neumair <[EMAIL PROTECTED]> wrote:
> > Alex Jones proposed [1] to change the quotation marks in Nautilus
> >  strings from the ASCII representation "..." to the unicode variant
> >  "...".
> 
> The only problem I see is some languages use different characters for
> quoting. ASCII ones are somewhat neutral.

Other languages will translate the strings anyway.

--
Shaun


___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Patryk Zawadzki
On Tue, May 13, 2008 at 4:19 PM, Christian Neumair <[EMAIL PROTECTED]> wrote:
> Alex Jones proposed [1] to change the quotation marks in Nautilus
>  strings from the ASCII representation "..." to the unicode variant
>  "...".

The only problem I see is some languages use different characters for
quoting. ASCII ones are somewhat neutral.

-- 
Patryk Zawadzki
PLD Linux Distribution
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: Quotation marks: Using “” instead of ""

2008-05-13 Thread Pat Suwalski
My objection may seem silly, but since there is no way to type it on any 
keyboard out there, that's a bit of a hindrance. Short of using the 
character map and searching, one has to resolve to using "smart 
substitution" editors like OpenOffice to get the characters.

They also tend to fail horribly when pasting into a non-Unicode 
terminal, which is still often the case over SSH. Probably not a huge 
desktop consideration, though. Every distribution I know of uses Unicode 
by default on the local terminal at this point.

--Pat

Christian Neumair wrote:
> Alex Jones proposed [1] to change the quotation marks in Nautilus
> strings from the ASCII representation "..." to the unicode variant
> “...”.
> 
> I think the proposed quotation marks are aesthetically more pleasing,
> but I don't want to change this unless there is a GNOME-wide policy.
> 
> I hereby propose to establish a GNOME policy of using “...” for
> quotations. Comments, objections?
> 
> best regards,
>  Christian Neumair
> 
> [1] http://bugzilla.gnome.org/show_bug.cgi?id=532777
> 
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list