Lists: | pgsql-patches |
---|
From: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | String changes |
Date: | 2003-03-08 10:23:31 |
Message-ID: | Pine.LNX.4.44.0303081122030.27526-200000@zigo.dhs.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
Here are some small string changes for psql.
--
/Dennis
Attachment | Content-Type | Size |
---|---|---|
psql_strings.diff | text/plain | 3.2 KB |
From: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
---|---|
To: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: String changes |
Date: | 2003-03-08 15:46:24 |
Message-ID: | 20030308154624.B27918@quartz.newn.cam.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
On Sat, Mar 08, 2003 at 11:23:31AM +0100, Dennis Björklund wrote:
> Here are some small string changes for psql.
>
> --
> /Dennis
> Index: command.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/command.c,v
> retrieving revision 1.90
> diff -u -r1.90 command.c
> --- command.c 2003/02/19 04:04:04 1.90
> +++ command.c 2003/03/08 10:19:52
> @@ -1901,7 +1901,7 @@
> if (popt->topt.pager == 1)
> puts(gettext("Using pager is on."));
> else if (popt->topt.pager == 2)
> - puts(gettext("Using pager is always."));
> + puts(gettext("Always use pager."));
> else
> puts(gettext("Using pager is off."));
Then how about "Never use pager." ?
> - fprintf(output, _("\n"));
> + fprintf(output, "\n");
and what about all the other _( ) ? (Looks a bit like php to me..)
Cheers,
Patrick
From: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
---|---|
To: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: String changes |
Date: | 2003-03-08 18:44:39 |
Message-ID: | Pine.LNX.4.44.0303081927110.27526-100000@zigo.dhs.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
On Sat, 8 Mar 2003, Patrick Welche wrote:
> > - puts(gettext("Using pager is always."));
> > + puts(gettext("Always use pager."));
> > else
> > puts(gettext("Using pager is off."));
>
> Then how about "Never use pager." ?
This setting is still mostly boolean, it toggles between on and off if you
don't explicitly set it. I left it as is because most other settings are
still on/off.
I changed "Using pager is always." because it is not good english.
For me it's fine with "Using pager is off." but I wouldn't protest if it
was changed. Both are just as fine if you ask me.
> > - fprintf(output, _("\n"));
> > + fprintf(output, "\n");
>
> and what about all the other _( ) ? (Looks a bit like php to me..)
I don't know what you ask here. Do you have an example of a _( ) that is
not needed then it should be removed of course. The rest that I saw was
needed.
_() is used for translations. To mark "\n" for translation make no sense.
--
/Dennis
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
Cc: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: String changes |
Date: | 2003-03-08 20:07:08 |
Message-ID: | 10484.1047154028@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <db(at)zigo(dot)dhs(dot)org> writes:
> _() is used for translations. To mark "\n" for translation make no sense.
Yeah, but making those printfs different from the others is a recipe
for future mistakes. I thought that proposed patch was useless
micro-optimization, too.
regards, tom lane
From: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk> |
---|---|
To: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: String changes |
Date: | 2003-03-08 20:09:50 |
Message-ID: | 20030308200950.C28346@quartz.newn.cam.ac.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
On Sat, Mar 08, 2003 at 07:44:39PM +0100, Dennis Björklund wrote:
>
> I don't know what you ask here. Do you have an example of a _( ) that is
> not needed then it should be removed of course. The rest that I saw was
> needed.
>
> _() is used for translations. To mark "\n" for translation make no sense.
I didn't know that..
Cheers,
Patrick
From: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>, <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: String changes |
Date: | 2003-03-08 21:36:12 |
Message-ID: | Pine.LNX.4.44.0303082230160.27526-100000@zigo.dhs.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
On Sat, 8 Mar 2003, Tom Lane wrote:
> Yeah, but making those printfs different from the others is a recipe
> for future mistakes. I thought that proposed patch was useless
> micro-optimization, too.
The reason to remove it is to help the translators.
When I find the string "\n" in the translation file I have to look that up
in the source to understand what it is and what it should be translated
to. Of course I could just translate it to "\n" but my experience as a
translator tells me that it's usually a sign of a misstake. When there is
many translations, and each translator has the same problem, then it may
be worth it to remove it.
It has nothing to do with the 0.00001s it takes to do the call to gettext.
--
/Dennis
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
Cc: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: String changes |
Date: | 2003-03-08 22:09:17 |
Message-ID: | 12265.1047161357@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <db(at)zigo(dot)dhs(dot)org> writes:
> On Sat, 8 Mar 2003, Tom Lane wrote:
>> Yeah, but making those printfs different from the others is a recipe
>> for future mistakes. I thought that proposed patch was useless
>> micro-optimization, too.
> The reason to remove it is to help the translators.
It would only help if you were to find and nuke every single instance of
gettext("\n"), and make sure that no new ones get introduced. I think
that adds more current and future work than the translators are likely
to save. And no, I don't believe that translators will expend great
effort on translating it ;-)
regards, tom lane
From: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>, <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: String changes |
Date: | 2003-03-09 06:39:51 |
Message-ID: | Pine.LNX.4.44.0303090724130.27526-100000@zigo.dhs.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
On Sat, 8 Mar 2003, Tom Lane wrote:
> It would only help if you were to find and nuke every single instance of
> gettext("\n"), and make sure that no new ones get introduced. I think
> that adds more current and future work than the translators are likely
> to save.
Well, I did.
> And no, I don't believe that translators will expend great
> effort on translating it ;-)
Oh, you'd be surprised of how many such things that translators complain
about :-)
The reason why strings like "\n", " ", "\t " and such things are hard is
because often it's most often used to layout things. And when you change
the translation in one place the translated string is usually longer
(english is fairly compact), then the translator have to fix up whitespace
to make it match the other strings. For example "\n" maybe should have
been translated to "\n\n" if some other string had to be two lines in a
language with longer sentences then english (like Finnish, or to a
smaller extent swedish).
But it's just a string. It won't change the world in any way! I'll not send
more mails about it.
--
/Dennis
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Dennis Björklund <db(at)zigo(dot)dhs(dot)org> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: String changes |
Date: | 2003-03-10 15:45:35 |
Message-ID: | 200303101545.h2AFjZM26379@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-patches |
I have applied your space change to \connect help, and cleaned up the
pager setting display. Patch attached.
---------------------------------------------------------------------------
Dennis Bjrklund wrote:
> Here are some small string changes for psql.
>
> --
> /Dennis
Content-Description:
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 1.9 KB |