Easier to translate psql help
authorPeter Eisentraut
Fri, 18 Sep 2009 05:00:42 +0000 (05:00 +0000)
committerPeter Eisentraut
Fri, 18 Sep 2009 05:00:42 +0000 (05:00 +0000)
Instead of requiring translators to translate the entire SQL command
synopses, change create_help.pl to only require them to translate the
placeholders, and paste those into the synopsis using a printf mechanism.
Make some small updates to the markup to make it easier to parse.

Note: This causes msgmerge of gettext 0.17 to segfault.  You will need
the patch from https://savannah.gnu.org/bugs/?27474 to make it work.
msgmerge usually only runs on babel.postgresql.org, however.

21 files changed:
doc/src/sgml/ref/alter_database.sgml
doc/src/sgml/ref/alter_function.sgml
doc/src/sgml/ref/alter_role.sgml
doc/src/sgml/ref/alter_table.sgml
doc/src/sgml/ref/alter_user.sgml
doc/src/sgml/ref/begin.sgml
doc/src/sgml/ref/create_domain.sgml
doc/src/sgml/ref/create_group.sgml
doc/src/sgml/ref/create_role.sgml
doc/src/sgml/ref/create_table.sgml
doc/src/sgml/ref/create_user.sgml
doc/src/sgml/ref/fetch.sgml
doc/src/sgml/ref/grant.sgml
doc/src/sgml/ref/lock.sgml
doc/src/sgml/ref/select.sgml
doc/src/sgml/ref/set_transaction.sgml
doc/src/sgml/ref/start_transaction.sgml
src/bin/psql/Makefile
src/bin/psql/create_help.pl
src/bin/psql/help.c
src/bin/psql/nls.mk

index 21e8b3bba7a96f91952813bd635d4fe5c78f28a7..9a28adc84684de541eb1cb6e3666162cb00700ac 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 ALTER DATABASE name [ [ WITH ] option [ ... ] ]
 
-where option can be:
+where option can be:
 
     CONNECTION LIMIT connlimit
 
index 803575111ac6a9611858aa600281417e51f7f6d1..cce237600409631b057c750bfbff1ab26d1dba8f 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -30,7 +30,7 @@ ALTER FUNCTION name ( [ [ 
 ALTER FUNCTION name ( [ [ argmode ] [ argname ] argtype [, ...] ] )
     SET SCHEMA new_schema
 
-where action is one of:
+where action is one of:
 
     CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
     IMMUTABLE | STABLE | VOLATILE
index cef9b5d8ab4be0f427d0c5513493b4df420c470d..5b8a832a4870ba008a66171f487a1b54eb0c70bd 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 ALTER ROLE name [ [ WITH ] option [ ... ] ]
 
-where option can be:
+where option can be:
     
       SUPERUSER | NOSUPERUSER
     | CREATEDB | NOCREATEDB
index 01aefb91307231c65e6f3ca9499ba394851486a7..354fa20edf7d2848ff6d79714d504ce591c5c30d 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -30,7 +30,7 @@ ALTER TABLE name
 ALTER TABLE name
     SET SCHEMA new_schema
 
-where action is one of:
+where action is one of:
 
     ADD [ COLUMN ] column type [ column_constraint [ ... ] ]
     DROP [ COLUMN ] [ IF EXISTS ] column [ RESTRICT | CASCADE ]
index 529684cb9e7844d29ad0467db9770c3f3f49bfeb..386441fe8ccaeb23af0342a55f1a07000ce3df18 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 ALTER USER name [ [ WITH ] option [ ... ] ]
 
-where option can be:
+where option can be:
     
       SUPERUSER | NOSUPERUSER
     | CREATEDB | NOCREATEDB
index 3dd5df9827bcbfd5d88d77ea82a5e94ccf284a2f..9b05454636f849be1a626c5e8a88bf551197f1e2 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 BEGIN [ WORK | TRANSACTION ] [ transaction_mode [, ...] ]
 
-where transaction_mode is one of:
+where transaction_mode is one of:
 
     ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
     READ WRITE | READ ONLY
index d8bbce18174bfeb69a0f9c87679981e41a8bf737..aae7a3539c3f4a01b384092d4a33c8f6df040879 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -22,10 +22,10 @@ PostgreSQL documentation
  
 
 CREATE DOMAIN name [ AS ] data_type
-    [ DEFAULT expression ]
+    [ DEFAULT expressionreplaceable> ]
     [ constraint [ ... ] ]
 
-where constraint is:
+where constraint is:
 
 [ CONSTRAINT constraint_name ]
 { NOT NULL | NULL | CHECK (expression) }
index 5040f630e9990281956495b1e6ed59beaf023ec9..b45fa6eeb20ac0b782b3d21efb9e2a1d43993b5f 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 CREATE GROUP name [ [ WITH ] option [ ... ] ]
 
-where option can be:
+where option can be:
     
       SUPERUSER | NOSUPERUSER
     | CREATEDB | NOCREATEDB
index d56f65987c7fad5252d38bcf4017a5aea471281c..d65456b4a14130f068f140c64dc52546d432ce22 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 CREATE ROLE name [ [ WITH ] option [ ... ] ]
 
-where option can be:
+where option can be:
     
       SUPERUSER | NOSUPERUSER
     | CREATEDB | NOCREATEDB
index 1f986bcd88c71019837138d55e50a6d77037cd3d..dc9b6855d91edaeb5dd43d05afab68a30491611d 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -22,7 +22,7 @@ PostgreSQL documentation
  
 
 CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( [
-  { column_name data_type [ DEFAULT default_expr ] [ column_constraint [ ... ] ]
+  { column_name data_type [ DEFAULT default_exprreplaceable> ] [ column_constraint [ ... ] ]
     | table_constraint
     | LIKE parent_table [ { INCLUDING | EXCLUDING } { DEFAULTS | CONSTRAINTS | INDEXES } ] ... }
     [, ... ]
@@ -32,7 +32,7 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE 
 [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
 [ TABLESPACE tablespace ]
 
-where column_constraint is:
+where column_constraint is:
 
 [ CONSTRAINT constraint_name ]
 { NOT NULL |
@@ -44,7 +44,7 @@ where column_constraint is:
     [ ON DELETE action ] [ ON UPDATE action ] }
 [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
 
-and table_constraint is:
+and table_constraint is:
 
 [ CONSTRAINT constraint_name ]
 { UNIQUE ( column_name [, ... ] ) index_parameters |
@@ -54,7 +54,7 @@ and table_constraint is:
     [ MATCH FULL | MATCH PARTIAL | MATCH SIMPLE ] [ ON DELETE action ] [ ON UPDATE action ] }
 [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
 
-<replaceable class="PARAMETER">index_parameters in UNIQUE and PRIMARY KEY constraints are:
+<phrase>index_parameters in UNIQUE and PRIMARY KEY constraints are:
 
 [ WITH ( storage_parameter [= value] [, ... ] ) ]
 [ USING INDEX TABLESPACE tablespace ]
index 3b0f325896570f8f3558696829778e64ed66a287..7530ead7beac5a8a525e8e6173cbb44ae6c4b765 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 CREATE USER name [ [ WITH ] option [ ... ] ]
 
-where option can be:
+where option can be:
     
       SUPERUSER | NOSUPERUSER
     | CREATEDB | NOCREATEDB
index 74ff297bb2eb2a3f1b6f3a2fab891d8632debb6f..ca81bcf55749ed49437cdd977ad14801f2b49551 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -28,7 +28,7 @@ PostgreSQL documentation
 
 FETCH [ direction { FROM | IN } ] cursorname
 
-where direction can be empty or one of:
+where direction can be empty or one of:
 
     NEXT
     PRIOR
index fe927e0ffe288f46949724d1080d4ad8ed2f06f1..55f87006bf4937eb2ad92fd264f11efc8624fbaf 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -41,11 +41,11 @@ GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
     TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
 GRANT { USAGE | ALL [ PRIVILEGES ] }
-    ON FOREIGN DATA WRAPPER fdwname [, ...]
+    ON FOREIGN DATA WRAPPER fdwnamereplaceable> [, ...]
     TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
 GRANT { USAGE | ALL [ PRIVILEGES ] }
-    ON FOREIGN SERVER servername [, ...]
+    ON FOREIGN SERVER servernamereplaceable> [, ...]
     TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
 GRANT { EXECUTE | ALL [ PRIVILEGES ] }
@@ -61,7 +61,7 @@ GRANT { { CREATE | USAGE } [,...] | ALL [ PRIVILEGES ] }
     TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
 GRANT { CREATE | ALL [ PRIVILEGES ] }
-    ON TABLESPACE tablespacename [, ...]
+    ON TABLESPACE tablespacenamereplaceable> [, ...]
     TO { [ GROUP ] rolename | PUBLIC } [, ...] [ WITH GRANT OPTION ]
 
 GRANT role [, ...] TO rolename [, ...] [ WITH ADMIN OPTION ]
index 567f36345115035951bcfd025790d1aecf29b452..4df32bff4504943399a105cfa6b18e187b8dc72a 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 LOCK [ TABLE ] [ ONLY ] name [, ...] [ IN lockmode MODE ] [ NOWAIT ]
 
-where lockmode is one of:
+where lockmode is one of:
 
     ACCESS SHARE | ROW SHARE | ROW EXCLUSIVE | SHARE UPDATE EXCLUSIVE
     | SHARE | SHARE ROW EXCLUSIVE | EXCLUSIVE | ACCESS EXCLUSIVE
index f22eeb2804d911482af4172d8d8deb155e558b67..524c902048ac48166a1a7ef76fee2920d0799c7b 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -47,7 +47,7 @@ SELECT [ ALL | DISTINCT [ ON ( expression
     [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
     [ FOR { UPDATE | SHARE } [ OF table_name [, ...] ] [ NOWAIT ] [...] ]
 
-where from_item can be one of:
+where from_item can be one of:
 
     [ ONLY ] table_name [ * ] [ [ AS ] alias [ ( column_alias [, ...] ) ] ]
     ( select ) [ AS ] alias [ ( column_alias [, ...] ) ]
@@ -56,7 +56,7 @@ where from_item can be one of:
     function_name ( [ argument [, ...] ] ) AS ( column_definition [, ...] )
     from_item [ NATURAL ] join_type from_item [ ON join_condition | USING ( join_column [, ...] ) ]
 
-and with_query is:
+and with_query is:
 
     with_query_name [ ( column_name [, ...] ) ] AS ( select )
 
index f3b9999b15759b20af3f902ffd91ff36b15a7aa2..80cf691182ff652a60f37910a140a758747070ad 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
   SET TRANSACTION
@@ -20,7 +20,7 @@
 SET TRANSACTION transaction_mode [, ...]
 SET SESSION CHARACTERISTICS AS TRANSACTION transaction_mode [, ...]
 
-where transaction_mode is one of:
+where transaction_mode is one of:
 
     ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
     READ WRITE | READ ONLY
index 9f63ad2de785bceb1a663df475d911da90cd5158..15ba39af919c16232f3ceeff4d6142f8f6fc9f41 100644 (file)
@@ -1,5 +1,5 @@
 
 
@@ -23,7 +23,7 @@ PostgreSQL documentation
 
 START TRANSACTION [ transaction_mode [, ...] ]
 
-where transaction_mode is one of:
+where transaction_mode is one of:
 
     ISOLATION LEVEL { SERIALIZABLE | REPEATABLE READ | READ COMMITTED | READ UNCOMMITTED }
     READ WRITE | READ ONLY
index 5a7cade37459424cd61e885f19f93ab37806700a..9a5feadba4160afa6179f09a51eb08efb855ed9f 100644 (file)
@@ -5,7 +5,7 @@
 # Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
 # Portions Copyright (c) 1994, Regents of the University of California
 #
-# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.65 2009/08/28 20:26:19 petere Exp $
+# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.66 2009/09/18 05:00:42 petere Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -22,6 +22,7 @@ override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) -I$(top_srcdir)/src/bin/p
 OBJS=  command.o common.o help.o input.o stringutils.o mainloop.o copy.o \
    startup.o prompt.o variables.o large_obj.o print.o describe.o \
    psqlscan.o tab-complete.o mbprint.o dumputils.o keywords.o kwlookup.o \
+   sql_help.o \
    $(WIN32RES)
 
 FLEXFLAGS = -Cfe
@@ -40,8 +41,9 @@ dumputils.c keywords.c: % : $(top_srcdir)/src/bin/pg_dump/%
 kwlookup.c: % : $(top_srcdir)/src/backend/parser/%
    rm -f $@ && $(LN_S) $< .
 
+sql_help.c: sql_help.h ;
 sql_help.h: create_help.pl $(wildcard $(REFDOCDIR)/*.sgml)
-   $(PERL) $< $(REFDOCDIR) $@
+   $(PERL) $< $(REFDOCDIR) $*
 
 psqlscan.c: psqlscan.l
 ifdef FLEX
@@ -67,4 +69,4 @@ clean distclean:
    rm -f psql$(X) $(OBJS) dumputils.c keywords.c kwlookup.c
 
 maintainer-clean: distclean
-   rm -f sql_help.h psqlscan.c
+   rm -f sql_help.h sql_help.c psqlscan.c
index 6aadda90b0685557c14626f199dc25cf8f68b58e..d56cc5bea6be1f9024c8aae65387904e26dbc178 100644 (file)
@@ -5,7 +5,7 @@
 #
 # Copyright (c) 2000-2009, PostgreSQL Global Development Group
 #
-# $PostgreSQL: pgsql/src/bin/psql/create_help.pl,v 1.19 2009/01/01 17:23:54 momjian Exp $
+# $PostgreSQL: pgsql/src/bin/psql/create_help.pl,v 1.20 2009/09/18 05:00:42 petere Exp $
 #################################################################
 
 #
@@ -14,7 +14,7 @@
 # enough that this worked, but this here is by no means an SGML
 # parser.
 #
-# Call: perl create_help.pl docdir sql_help.h
+# Call: perl create_help.pl docdir sql_help
 # The name of the header file doesn't matter to this script, but it
 # sure does matter to the rest of the source.
 #
 use strict;
 
 my $docdir = $ARGV[0] or die "$0: missing required argument: docdir\n";
-my $outputfile = $ARGV[1] or die "$0: missing required argument: output file\n";
+my $hfile = $ARGV[1] . '.h' or die "$0: missing required argument: output file\n";
+my $cfile = $ARGV[1] . '.c';
 
-my $outputfilebasename;
-if ($outputfile =~ m!.*/([^/]+)$!) {
-    $outputfilebasename = $1;
+my $hfilebasename;
+if ($hfile =~ m!.*/([^/]+)$!) {
+    $hfilebasename = $1;
 }
 else {
-    $outputfilebasename = $outputfile;
+    $hfilebasename = $hfile;
 }
 
-my $define = $outputfilebasename;
+my $define = $hfilebasename;
 $define =~ tr/a-z/A-Z/;
 $define =~ s/\W/_/g;
 
 opendir(DIR, $docdir)
     or die "$0: could not open documentation source dir '$docdir': $!\n";
-open(OUT, ">$outputfile")
-    or die "$0: could not open output file '$outputfile': $!\n";
+open(HFILE, ">$hfile")
+    or die "$0: could not open output file '$hfile': $!\n";
+open(CFILE, ">$cfile")
+    or die "$0: could not open output file '$cfile': $!\n";
 
-print OUT
+print HFILE
 "/*
  * *** Do not change this file by hand. It is automatically
  * *** generated from the DocBook documentation.
@@ -56,15 +59,31 @@ print OUT
 
 #define N_(x) (x)              /* gettext noop */
 
+#include \"postgres_fe.h\"
+#include \"pqexpbuffer.h\"
+
 struct _helpStruct
 {
    const char     *cmd;        /* the command name */
    const char     *help;       /* the help associated with it */
-   const char     *syntax;     /* the syntax associated with it */
+   void (*syntaxfunc)(PQExpBuffer);    /* function that prints the syntax associated with it */
+   int             nl_count;   /* number of newlines in syntax (for pager) */
 };
 
+";
+
+print CFILE
+"/*
+ * *** Do not change this file by hand. It is automatically
+ * *** generated from the DocBook documentation.
+ *
+ * generated by
+ *     $^X $0 @ARGV
+ *
+ */
+
+#include \"$hfile\"
 
-static const struct _helpStruct QL_HELP[] = {
 ";
 
 my $maxlen = 0;
@@ -95,12 +114,25 @@ foreach my $file (sort readdir DIR) {
    $cmddesc =~ s/\s+/ /g;
         $cmddesc =~ s/\"/\\"/g;
 
-   $cmdsynopsis =~ s/<[^>]+>//g;
+        my @params = ();
+
+        my $nl_count = () = $cmdsynopsis =~ /\n/g;
+
+        $cmdsynopsis =~ m!! and die "$0:$file: null end tag not supported in synopsis\n";
+        $cmdsynopsis =~ s/%/%%/g;
+
+        while ($cmdsynopsis =~ m!<(\w+)[^>]*>(.+?)]*>!) {
+            my $match = $2;
+       $match =~ s/<[^>]+>//g;
+       $match =~ s/%%/%/g;
+            push @params, $match;
+            $cmdsynopsis =~ s!<(\w+)[^>]*>.+?]*>!%s!;
+        }
    $cmdsynopsis =~ s/\r?\n/\\n/g;
         $cmdsynopsis =~ s/\"/\\"/g;
 
         foreach my $cmdname (@cmdnames) {
-       $entries{$cmdname} = { cmddesc => $cmddesc, cmdsynopsis => $cmdsynopsis };
+       $entries{$cmdname} = { cmddesc => $cmddesc, cmdsynopsis => $cmdsynopsis, params => \@params, nl_count => $nl_count };
        $maxlen = ($maxlen >= length $cmdname) ? $maxlen : length $cmdname;
    }
     }
@@ -109,9 +141,41 @@ foreach my $file (sort readdir DIR) {
     }
 }
 
-print OUT "    { \"$_\",\n      N_(\"".$entries{$_}{cmddesc}."\"),\n      N_(\"".$entries{$_}{cmdsynopsis}."\") },\n\n" foreach (sort keys %entries);
+foreach (sort keys %entries) {
+    my $prefix = "\t"x5 . '  ';
+    my $id = $_;
+    $id =~ s/ /_/g;
+    my $synopsis = "\"$entries{$_}{cmdsynopsis}\"";
+    $synopsis =~ s/\\n/\\n"\n$prefix"/g;
+    my @args = ("buf",
+                $synopsis,
+                map("_(\"$_\")", @{$entries{$_}{params}}));
+    print HFILE "extern void sql_help_$id(PQExpBuffer buf);\n";
+    print CFILE "void
+sql_help_$id(PQExpBuffer buf)
+{
+\tappendPQExpBuffer(".join(",\n$prefix", @args).");
+}
+
+";
+}
+
+print HFILE "
+
+static const struct _helpStruct QL_HELP[] = {
+";
+foreach (sort keys %entries) {
+    my $id = $_;
+    $id =~ s/ /_/g;
+    print HFILE "    { \"$_\",
+      N_(\"$entries{$_}{cmddesc}\"),
+      sql_help_$id,
+      $entries{$_}{nl_count} },
+
+";
+}
 
-print OUT "
+print HFILE "
     { NULL, NULL, NULL }    /* End of list marker */
 };
 
@@ -123,5 +187,6 @@ print OUT "
 #endif /* $define */
 ";
 
-close OUT;
+close CFILE;
+close HFILE;
 closedir DIR;
index ef297fe0095094383404451d6139fdb7547f3bb6..947eff050a1dc2d9d9cb98df8c6546fccfbc3192 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2009, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.151 2009/07/24 19:35:44 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/help.c,v 1.152 2009/09/18 05:00:42 petere Exp $
  */
 #include "postgres_fe.h"
 
@@ -349,7 +349,6 @@ helpSQL(const char *topic, unsigned short int pager)
        size_t      len,
                    wordlen;
        int         nl_count = 0;
-       const char *ch;
 
        /* User gets two chances: exact match, then the first word */
 
@@ -386,10 +385,8 @@ helpSQL(const char *topic, unsigned short int pager)
                if (pg_strncasecmp(topic, QL_HELP[i].cmd, len) == 0 ||
                    strcmp(topic, "*") == 0)
                {
-                   nl_count += 5;
-                   for (ch = QL_HELP[i].syntax; *ch != '\0'; ch++)
-                       if (*ch == '\n')
-                           nl_count++;
+                   nl_count += 5 + QL_HELP[i].nl_count;
+
                    /* If we have an exact match, exit.  Fixes \h SELECT */
                    if (pg_strcasecmp(topic, QL_HELP[i].cmd) == 0)
                        break;
@@ -403,13 +400,17 @@ helpSQL(const char *topic, unsigned short int pager)
                if (pg_strncasecmp(topic, QL_HELP[i].cmd, len) == 0 ||
                    strcmp(topic, "*") == 0)
                {
+                   PQExpBufferData buffer;
+
+                   initPQExpBuffer(&buffer);
+                   QL_HELP[i].syntaxfunc(&buffer);
                    help_found = true;
                    fprintf(output, _("Command:     %s\n"
                                      "Description: %s\n"
                                      "Syntax:\n%s\n\n"),
                            QL_HELP[i].cmd,
                            _(QL_HELP[i].help),
-                           _(QL_HELP[i].syntax));
+                           buffer.data);
                    /* If we have an exact match, exit.  Fixes \h SELECT */
                    if (pg_strcasecmp(topic, QL_HELP[i].cmd) == 0)
                        break;
index e6ca23563a87a0fc010fc09b8d9d8dd5e542c2a7..16c8380535511d9130a0f052d9ee77213173af28 100644 (file)
@@ -1,7 +1,7 @@
-# $PostgreSQL: pgsql/src/bin/psql/nls.mk,v 1.23 2009/06/26 19:33:50 petere Exp $
+# $PostgreSQL: pgsql/src/bin/psql/nls.mk,v 1.24 2009/09/18 05:00:42 petere Exp $
 CATALOG_NAME   := psql
 AVAIL_LANGUAGES    := cs de es fr ja pt_BR sv tr
 GETTEXT_FILES  := command.c common.c copy.c help.c input.c large_obj.c \
-                   mainloop.c print.c startup.c describe.c sql_help.h \
+                   mainloop.c print.c startup.c describe.c sql_help.h sql_help.c \
                    ../../port/exec.c
 GETTEXT_TRIGGERS:= _ N_ psql_error simple_prompt