pgsql: Easier to translate psql help Instead of requiring translators
Log Message:
-----------
Easier to translate psql help
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.
Modified Files:
--------------
pgsql/doc/src/sgml/ref:
alter_database.sgml (r1.22 -> r1.23)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_database.sgml?r1=1.22&r2=1.23)
alter_function.sgml (r1.17 -> r1.18)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_function.sgml?r1=1.17&r2=1.18)
alter_role.sgml (r1.12 -> r1.13)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_role.sgml?r1=1.12&r2=1.13)
alter_table.sgml (r1.108 -> r1.109)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_table.sgml?r1=1.108&r2=1.109)
alter_user.sgml (r1.45 -> r1.46)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/alter_user.sgml?r1=1.45&r2=1.46)
begin.sgml (r1.37 -> r1.38)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/begin.sgml?r1=1.37&r2=1.38)
create_domain.sgml (r1.32 -> r1.33)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_domain.sgml?r1=1.32&r2=1.33)
create_group.sgml (r1.19 -> r1.20)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_group.sgml?r1=1.19&r2=1.20)
create_role.sgml (r1.11 -> r1.12)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_role.sgml?r1=1.11&r2=1.12)
create_table.sgml (r1.115 -> r1.116)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_table.sgml?r1=1.115&r2=1.116)
create_user.sgml (r1.41 -> r1.42)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/create_user.sgml?r1=1.41&r2=1.42)
fetch.sgml (r1.43 -> r1.44)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/fetch.sgml?r1=1.43&r2=1.44)
grant.sgml (r1.75 -> r1.76)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/grant.sgml?r1=1.75&r2=1.76)
lock.sgml (r1.52 -> r1.53)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/lock.sgml?r1=1.52&r2=1.53)
select.sgml (r1.124 -> r1.125)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/select.sgml?r1=1.124&r2=1.125)
set_transaction.sgml (r1.26 -> r1.27)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/set_transaction.sgml?r1=1.26&r2=1.27)
start_transaction.sgml (r1.17 -> r1.18)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/ref/start_transaction.sgml?r1=1.17&r2=1.18)
pgsql/src/bin/psql:
Makefile (r1.65 -> r1.66)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/Makefile?r1=1.65&r2=1.66)
create_help.pl (r1.19 -> r1.20)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/create_help.pl?r1=1.19&r2=1.20)
help.c (r1.151 -> r1.152)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/help.c?r1=1.151&r2=1.152)
nls.mk (r1.23 -> r1.24)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/nls.mk?r1=1.23&r2=1.24)
petere@postgresql.org (Peter Eisentraut) writes:
Log Message:
-----------
Easier to translate psql help
Looks like this broke the msvc build ...
regards, tom lane
On Fri, 2009-09-18 at 09:46 -0400, Tom Lane wrote:
petere@postgresql.org (Peter Eisentraut) writes:
Log Message:
-----------
Easier to translate psql helpLooks like this broke the msvc build ...
Yep, one of create_help.pl's arguments changed to not include the file
extension, but msvc was still trying to give it "sql_help.h".
Quickpatch attached.
Wondered why my attempts to test and review another patch were suddenly
confounded...
regards, tom lane
- Josh Williams
Attachments:
msvc-sql_help.difftext/x-patch; charset=UTF-8; name=msvc-sql_help.diffDownload
Index: src/tools/msvc/Solution.pm
===================================================================
RCS file: /projects/cvsroot/pgsql/src/tools/msvc/Solution.pm,v
retrieving revision 1.47
diff -c -r1.47 Solution.pm
*** src/tools/msvc/Solution.pm 6 Jan 2009 18:37:50 -0000 1.47
--- src/tools/msvc/Solution.pm 19 Sep 2009 03:41:40 -0000
***************
*** 235,241 ****
{
print "Generating sql_help.h...\n";
chdir('src\bin\psql');
! system("perl create_help.pl ../../../doc/src/sgml/ref sql_help.h");
chdir('..\..\..');
}
--- 235,241 ----
{
print "Generating sql_help.h...\n";
chdir('src\bin\psql');
! system("perl create_help.pl ../../../doc/src/sgml/ref sql_help");
chdir('..\..\..');
}
Josh Williams wrote:
On Fri, 2009-09-18 at 09:46 -0400, Tom Lane wrote:
petere@postgresql.org (Peter Eisentraut) writes:
Log Message:
-----------
Easier to translate psql helpLooks like this broke the msvc build ...
Yep, one of create_help.pl's arguments changed to not include the file
extension, but msvc was still trying to give it "sql_help.h".
Quickpatch attached.
Thanks. Applied.
cheers
andrew