Syntax got translated

Started by Susanne Ebrechtabout 14 years ago12 messagesbugs
Jump to latest
#1Susanne Ebrecht
susanne@2ndQuadrant.com

Hello,

I tested 9.1.2 and I used --enable-nls in ./configure.

I used psql.

I tested German, French and Spanish - I guess it is in all translated
languages.

The test is very easy:

CREATE TABLE t(i serial);

\d t

Output in German:
i | integer | not null Vorgabewert nextval('t_i_seq'::regclass)

Output in French:
i | integer | non NULL Par défaut, nextval('t_i_seq'::regclass)

Output in Spanish:
i | integer | not null valor por omisión nextval('t_i_seq'::regclass)

I think that the constraint keyword "DEFAULT" should not be translated here.
In my eyes in all cases it should output:

i | integer | not null default nextval('t_i_seq'::regclass)

Susanne

--
Dipl. Inf. Susanne Ebrecht - 2ndQuadrant
PostgreSQL Development, 24x7 Support, Training and Services
www.2ndQuadrant.com

#2Susanne Ebrecht
susanne@2ndQuadrant.com
In reply to: Susanne Ebrecht (#1)
Re: Syntax got translated

Am 18.02.2012 22:11, schrieb Susanne Ebrecht:

Output in French:
i | integer | non NULL Par défaut, nextval('t_i_seq'::regclass)

I just recognised that in French also the "not" from "not null" got
translated.

Additionally I tested Turkish:
i | integer | Null değil öntanımlı nextval('t_i_seq'::regclass)

Same here - "not null" and "default" got translated.

Susanne

--
Dipl. Inf. Susanne Ebrecht - 2ndQuadrant
PostgreSQL Development, 24x7 Support, Training and Services
www.2ndQuadrant.com

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Susanne Ebrecht (#1)
Re: Syntax got translated

Excerpts from Susanne Ebrecht's message of sáb feb 18 18:11:54 -0300 2012:

Output in German:
i | integer | not null Vorgabewert nextval('t_i_seq'::regclass)

Output in French:
i | integer | non NULL Par défaut, nextval('t_i_seq'::regclass)

Output in Spanish:
i | integer | not null valor por omisión nextval('t_i_seq'::regclass)

I think that the constraint keyword "DEFAULT" should not be translated here.
In my eyes in all cases it should output:

i | integer | not null default nextval('t_i_seq'::regclass)

I'm not clear on this. I translated it because it seemed sensible, but
I remember stopping for a minute to consider it. Maybe if more people
thinks it should not be translated, we could remove the translatability
marker from DEFAULT and other stuff like NOT NULL. I'mnot sure
however. Just removing the translations from the existing catalogs is
not enough, because future versions will just put them back.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

#4Guillaume Lelarge
guillaume@lelarge.info
In reply to: Alvaro Herrera (#3)
Re: Syntax got translated

On Mon, 20 Feb 2012 14:15:34 -0300, Alvaro Herrera
<alvherre@commandprompt.com> wrote:

Excerpts from Susanne Ebrecht's message of sáb feb 18 18:11:54 -0300

2012:

Output in German:
i | integer | not null Vorgabewert nextval('t_i_seq'::regclass)

Output in French:
i | integer | non NULL Par défaut, nextval('t_i_seq'::regclass)

Output in Spanish:
i | integer | not null valor por omisión
nextval('t_i_seq'::regclass)

I think that the constraint keyword "DEFAULT" should not be translated
here.
In my eyes in all cases it should output:

i | integer | not null default nextval('t_i_seq'::regclass)

I'm not clear on this. I translated it because it seemed sensible, but
I remember stopping for a minute to consider it. Maybe if more people
thinks it should not be translated, we could remove the translatability
marker from DEFAULT and other stuff like NOT NULL. I'mnot sure
however. Just removing the translations from the existing catalogs is
not enough, because future versions will just put them back.

I don't see why the modifiers shouldn't be translatable. It's not as if
they were intended to be copied and pasted in a query. They are here to
help the user understand the different modifiers in each column.

-1 to get rid of the translations.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

#5Susanne Ebrecht
susanne@2ndQuadrant.com
In reply to: Guillaume Lelarge (#4)
Re: Syntax got translated

Am 20.02.2012 21:22, schrieb Guillaume Lelarge:

I don't see why the modifiers shouldn't be translatable. It's not as if
they were intended to be copied and pasted in a query. They are here to
help the user understand the different modifiers in each column.

Of course they are intended to get copied and pasted. In support you
often ask
for output from \d tablename. And when I look to the languages that I
never learned,
especially when I look into Turkish - I would read NULL and not would
estimate column is
not NULL.

Default and not null are keywords - they are valid sql syntax.
They are constraint definitions.

When I output the table definition I want the constraint definition - I
don't want to translate it
back to english to understand - ahhhh default is meant.

Susanne

--
Dipl. Inf. Susanne Ebrecht - 2ndQuadrant
PostgreSQL Development, 24x7 Support, Training and Services
www.2ndQuadrant.com

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Guillaume Lelarge (#4)
Re: Syntax got translated

Guillaume Lelarge <guillaume@lelarge.info> writes:

On Mon, 20 Feb 2012 14:15:34 -0300, Alvaro Herrera
<alvherre@commandprompt.com> wrote:

Excerpts from Susanne Ebrecht's message of sáb feb 18 18:11:54 -0300

I think that the constraint keyword "DEFAULT" should not be translated
here.

I don't see why the modifiers shouldn't be translatable. It's not as if
they were intended to be copied and pasted in a query. They are here to
help the user understand the different modifiers in each column.

-1 to get rid of the translations.

It seems to boil down to whether you think the "Modifiers" column
contains SQL, or a textual description of the column's properties.
I could go either way on that, but I notice that the existing code
is in the habit of truncating the default expression at 128 characters.
If we want to decide that we're printing real, copy-and-pastable SQL,
that seems like a bad idea. On the other hand, if we're printing
informational text, it's not an unreasonable thing.

regards, tom lane

#7Guillaume Lelarge
guillaume@lelarge.info
In reply to: Susanne Ebrecht (#5)
Re: Syntax got translated

On Mon, 20 Feb 2012 21:47:49 +0100, Susanne Ebrecht
<susanne@2ndquadrant.com> wrote:

Am 20.02.2012 21:22, schrieb Guillaume Lelarge:

I don't see why the modifiers shouldn't be translatable. It's not as if
they were intended to be copied and pasted in a query. They are here to
help the user understand the different modifiers in each column.

Of course they are intended to get copied and pasted. In support you
often ask
for output from \d tablename. And when I look to the languages that I
never learned,
especially when I look into Turkish - I would read NULL and not would
estimate column is
not NULL.

Default and not null are keywords - they are valid sql syntax.
They are constraint definitions.

When I output the table definition I want the constraint definition - I
don't want to translate it
back to english to understand - ahhhh default is meant.

If that's so, nothing should be translatable in psql. If you do \d, the
second column is the relation type. I guess seeing vue instead of view
won't help you, so we need to stop translating this. The table's title
shouldn't be translatable too. Etc.

If you want the english way, you already can do this. You just need to ask
your customer to use "LANG=C psql" instead of psql.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

#8Susanne Ebrecht
susanne@2ndQuadrant.com
In reply to: Tom Lane (#6)
Re: Syntax got translated

Am 20.02.2012 21:55, schrieb Tom Lane:

It seems to boil down to whether you think the "Modifiers" column
contains SQL, or a textual description of the column's properties.
I could go either way on that, but I notice that the existing code
is in the habit of truncating the default expression at 128 characters.
If we want to decide that we're printing real, copy-and-pastable SQL,
that seems like a bad idea. On the other hand, if we're printing
informational text, it's not an unreasonable thing.

regards, tom lane

We might also have a culture difference here.

I discovered it during a demonstration in my training class.
The whole class laughed - when they read "Vorgabewert" instead of Default.

Maybe Germans aren't used to have a translation here - Maybe French folk
is used to have a translation here.

Regards,

Susanne

--
Dipl. Inf. Susanne Ebrecht - 2ndQuadrant
PostgreSQL Development, 24x7 Support, Training and Services
www.2ndQuadrant.com

#9Guillaume Lelarge
guillaume@lelarge.info
In reply to: Tom Lane (#6)
Re: Syntax got translated

On Mon, 20 Feb 2012 15:55:54 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Guillaume Lelarge <guillaume@lelarge.info> writes:

On Mon, 20 Feb 2012 14:15:34 -0300, Alvaro Herrera
<alvherre@commandprompt.com> wrote:

Excerpts from Susanne Ebrecht's message of sáb feb 18 18:11:54 -0300

I think that the constraint keyword "DEFAULT" should not be

translated

here.

I don't see why the modifiers shouldn't be translatable. It's not as if
they were intended to be copied and pasted in a query. They are here to
help the user understand the different modifiers in each column.

-1 to get rid of the translations.

It seems to boil down to whether you think the "Modifiers" column
contains SQL, or a textual description of the column's properties.
I could go either way on that, but I notice that the existing code
is in the habit of truncating the default expression at 128 characters.
If we want to decide that we're printing real, copy-and-pastable SQL,
that seems like a bad idea. On the other hand, if we're printing
informational text, it's not an unreasonable thing.

My first move was that truncating to 128 characters was bad idea. But in a
terminal, you have a limited number of columns, so it would make sense.

And, to me, it's a textual description. Not SQL. BTW, if it was SQL, when
I do \d tablename, I should get the complete SQL query to create the table,
not a description of the table definition. So, yeah, sure, the "Modifiers"
column doesn't contain SQL, it's a description.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

#10Guillaume Lelarge
guillaume@lelarge.info
In reply to: Susanne Ebrecht (#8)
Re: Syntax got translated

On Mon, 20 Feb 2012 22:14:32 +0100, Susanne Ebrecht
<susanne@2ndquadrant.com> wrote:

Am 20.02.2012 21:55, schrieb Tom Lane:

It seems to boil down to whether you think the "Modifiers" column
contains SQL, or a textual description of the column's properties.
I could go either way on that, but I notice that the existing code
is in the habit of truncating the default expression at 128 characters.
If we want to decide that we're printing real, copy-and-pastable SQL,
that seems like a bad idea. On the other hand, if we're printing
informational text, it's not an unreasonable thing.

regards, tom lane

We might also have a culture difference here.

I discovered it during a demonstration in my training class.
The whole class laughed - when they read "Vorgabewert" instead of

Default.

Maybe Germans aren't used to have a translation here - Maybe French folk
is used to have a translation here.

French folks are used to have translations everywhere. And if they don't,
they scream :)

I don't say it's a good thing :)

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

#11Susanne Ebrecht
susanne@2ndQuadrant.com
In reply to: Guillaume Lelarge (#10)
Re: Syntax got translated

Am 20.02.2012 22:19, schrieb Guillaume Lelarge:

French folks are used to have translations everywhere. And if they don't,
they scream :)

I don't say it's a good thing :)

That is why I expected a culture difference here.
I know that in French all get translated to French.
That is the French culture - the French language - neither good nor bad.
It is like it is.
There are other languages that work similar to French.

Languages like German, Dutch and others just work different.

Germans often just take the English word and use it - and after a while
you can find the
English word in German thesaurus using German grammar.
When the word made it into our thesaurus - then the English word finally
got adopted as
German word.

Honestly, the problem Germans have with it is - thinking to beginners -
when they read
"Default" they know that there is a default constraint on it. When they
read one of the
translations for "default" - they don't know what is going on. You
really need to translate
to English to understand that it is a default constraint.

Germans are confused from such kind of translations. It is more
confusing for them as
it will help them.

I don't know if it is possible - but could it get split by language
here. Translate in French but
not in German or so.

Susanne

--
Dipl. Inf. Susanne Ebrecht - 2ndQuadrant
PostgreSQL Development, 24x7 Support, Training and Services
www.2ndQuadrant.com

#12Guillaume Lelarge
guillaume@lelarge.info
In reply to: Susanne Ebrecht (#11)
Re: Syntax got translated

On Mon, 20 Feb 2012 22:49:16 +0100, Susanne Ebrecht
<susanne@2ndquadrant.com> wrote:

Am 20.02.2012 22:19, schrieb Guillaume Lelarge:

French folks are used to have translations everywhere. And if they

don't,

they scream :)

I don't say it's a good thing :)

That is why I expected a culture difference here.
I know that in French all get translated to French.
That is the French culture - the French language - neither good nor bad.

It is like it is.
There are other languages that work similar to French.

Languages like German, Dutch and others just work different.

Germans often just take the English word and use it - and after a while
you can find the
English word in German thesaurus using German grammar.
When the word made it into our thesaurus - then the English word finally

got adopted as
German word.

Honestly, the problem Germans have with it is - thinking to beginners -
when they read
"Default" they know that there is a default constraint on it. When they
read one of the
translations for "default" - they don't know what is going on. You
really need to translate
to English to understand that it is a default constraint.

Germans are confused from such kind of translations. It is more
confusing for them as
it will help them.

I don't know if it is possible - but could it get split by language
here. Translate in French but
not in German or so.

Sure, just don't translate it in the german .po file. Or, better, use the
same string.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com