Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8606dd8

Browse files
committed
Make \? help message more clear when not connected.
On second thought, "none" could mislead to think that you're connected adatabase with that name. Duplicate the whole string, so that it can bemore easily translated. In back-branches, thought, just use an empty stringin place of the database name, to avoid adding a translatable string.
1 parentb04ce52 commit8606dd8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎src/bin/psql/help.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ slashUsage(unsigned short int pager)
164164
char*currdb;
165165

166166
currdb=PQdb(pset.db);
167-
if (currdb==NULL)
168-
currdb=_("none");
169167

170168
output=PageOutput(94,pager);
171169

@@ -257,9 +255,13 @@ slashUsage(unsigned short int pager)
257255
fprintf(output,"\n");
258256

259257
fprintf(output,_("Connection\n"));
260-
fprintf(output,_(" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
261-
" connect to new database (currently \"%s\")\n"),
262-
currdb);
258+
if (currdb)
259+
fprintf(output,_(" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
260+
" connect to new database (currently \"%s\")\n"),
261+
currdb);
262+
else
263+
fprintf(output,_(" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
264+
" connect to new database (currently no connection)\n")),
263265
fprintf(output,_(" \\encoding [ENCODING] show or set client encoding\n"));
264266
fprintf(output,_(" \\password [USERNAME] securely change the password for a user\n"));
265267
fprintf(output,_(" \\conninfo display information about current connection\n"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp