String changes

Started by Dennis Bjorklundover 23 years ago9 messagespatches
Jump to latest
#1Dennis Bjorklund
db@zigo.dhs.org

Here are some small string changes for psql.

--
/Dennis

Attachments:

psql_strings.difftext/plain; charset=US-ASCII; name=psql_strings.diffDownload+7-7
#2Patrick Welche
prlw1@newn.cam.ac.uk
In reply to: Dennis Bjorklund (#1)
Re: String changes

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

#3Dennis Bjorklund
db@zigo.dhs.org
In reply to: Patrick Welche (#2)
Re: String changes

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dennis Bjorklund (#3)
Re: String changes

=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <db@zigo.dhs.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

#5Patrick Welche
prlw1@newn.cam.ac.uk
In reply to: Dennis Bjorklund (#3)
Re: String changes

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

#6Dennis Bjorklund
db@zigo.dhs.org
In reply to: Tom Lane (#4)
Re: String changes

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

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Dennis Bjorklund (#6)
Re: String changes

=?ISO-8859-1?Q?Dennis_Bj=F6rklund?= <db@zigo.dhs.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

#8Dennis Bjorklund
db@zigo.dhs.org
In reply to: Tom Lane (#7)
Re: String changes

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

#9Bruce Momjian
bruce@momjian.us
In reply to: Dennis Bjorklund (#1)
Re: String changes

I have applied your space change to \connect help, and cleaned up the
pager setting display. Patch attached.

---------------------------------------------------------------------------

Dennis Bj���rklund 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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Attachments:

/bjm/difftext/plainDownload+8-8