Commit Graph

41 Commits

Author SHA1 Message Date
Peter Eisentraut 713a9f210d Add libpgcommon to backend gettext source files
This ought to have been done when libpgcommon was split off from
libpgport.
2013-10-19 13:49:05 -04:00
Peter Eisentraut 6a007fa1eb Translation updates 2013-09-02 02:43:18 -04:00
Peter Eisentraut 539ecc9241 Translation updates 2013-05-05 22:34:23 -04:00
Alvaro Herrera 7fcbf6a405 Split out XLog reading as an independent facility
This new facility can not only be used by xlog.c to carry out crash
recovery, but also by external programs.  By supplying a function to
read XLog pages from somewhere, all the WAL reading can be used for
completely different purposes.

For the standard backend use, the behavior should be pretty much the
same as previously.  As for non-backend programs, an hypothetical
pg_xlogdump program is now closer to reality, but some more backend
support is still necessary.

This patch was originally submitted by Andres Freund in a different
form, but Heikki Linnakangas opted for and authored another design of
the concept.  Andres has advanced the patch since Heikki's initial
version.  Review and some (mostly cosmetics) changes by me.
2013-01-16 16:12:53 -03:00
Peter Eisentraut 9099d84374 Sort file list when creating gettext-files
That way, the created .pot file is more deterministic and not
dependent on the order in which the files are found.
2011-12-27 20:20:56 +02:00
Peter Eisentraut 3ad2c8e168 Clean gettext-files file in clean target
It used to be cleaned in maintainer-clean, but that is inconsistent
with other cleaning of NLS files in nls-global.mk, and it's also wrong
overall, because it's not part of the distribution tarball, which is
the base definition of the maintainer-clean target.
2011-11-09 20:56:19 +02:00
Peter Eisentraut cb5a7bc2dc Add the possibility to pass --flag arguments to xgettext calls
The --flag argument can be used to tell xgettext the arguments of
which functions should be flagged with c-format in the PO files,
instead of guessing based on the presence of format specifiers, which
fails if no format specifiers are present but the translation
accidentally introduces one.

Appropriate flag settings have been added for each message catalog.

based on a patch by Christoph Berg for bug #6066
2011-06-27 00:37:21 +03:00
Peter Eisentraut 7a5a843a2a Refactor common gettext triggers
Put gettext trigger words that are common to the backend and backend
modules into a makefile variable to include everywhere, to avoid
error-prone repetitions.
2011-06-27 00:04:15 +03:00
Peter Eisentraut c6ef139376 Make _ be automatically included in GETTEXT_TRIGGERS
Since it's globally defined in c.h, it should be treated as a gettext
trigger everywhere.
2011-06-26 23:05:30 +03:00
Peter Eisentraut 1b11e239ca Replace := by = in nls.mk files
It currently doesn't make a difference, but it's inconsistent with
most other usage, and it might interfere with a future patch, so I'll
change it all in a separate commit.

Also, replace tabs with spaces for alignment.
2011-06-26 20:08:38 +03:00
Peter Eisentraut 74b1d29dd1 Translation updates for 9.1beta2 2011-06-09 23:02:48 +03:00
Tom Lane 2594cf0e8c Revise the API for GUC variable assign hooks.
The previous functions of assign hooks are now split between check hooks
and assign hooks, where the former can fail but the latter shouldn't.
Aside from being conceptually clearer, this approach exposes the
"canonicalized" form of the variable value to guc.c without having to do
an actual assignment.  And that lets us fix the problem recently noted by
Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus
log messages about "parameter "wal_buffers" cannot be changed without
restarting the server".  There may be some speed advantage too, because
this design lets hook functions avoid re-parsing variable values when
restoring a previous state after a rollback (they can store a pre-parsed
representation of the value instead).  This patch also resolves a
longstanding annoyance about custom error messages from variable assign
hooks: they should modify, not appear separately from, guc.c's own message
about "invalid parameter value".
2011-04-07 00:12:02 -04:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Tom Lane 91e71929ba Convert the core lexer and parser into fully reentrant code, by making use
of features added to flex and bison since this code was originally written.
This change doesn't in itself offer any new capability, but it's needed
infrastructure for planned improvements in plpgsql.

Another feature now available in flex is the ability to make it use palloc
instead of malloc, so do that to avoid possible memory leaks.  (We should
at some point change the other lexers likewise, but this commit doesn't
touch them.)
2009-07-13 02:02:20 +00:00
Peter Eisentraut a6667d96c5 Translation updates for 8.4 release.
File that are translated less than 80% have been removed, as per new
translation team policy.
2009-06-26 19:33:52 +00:00
Tom Lane 76d4abf2d9 Improve the recently-added support for properly pluralized error messages
by extending the ereport() API to cater for pluralization directly.  This
is better than the original method of calling ngettext outside the elog.c
code because (1) it avoids double translation, which wastes cycles and in
the worst case could give a wrong result; and (2) it avoids having to use
a different coding method in PL code than in the core backend.  The
client-side uses of ngettext are not touched since neither of these concerns
is very pressing in the client environment.  Per my proposal of yesterday.
2009-06-04 18:33:08 +00:00
Alvaro Herrera f97017068f Translation updates 2009-05-14 21:41:53 +00:00
Peter Eisentraut 80a836cab4 Translation updates for 8.4 beta 2009-04-09 19:38:53 +00:00
Tom Lane b0169bb124 Install a more robust solution for the problem of infinite error-processing
recursion when we are unable to convert a localized error message to the
client's encoding.  We've been over this ground before, but as reported by
Ibrar Ahmed, it still didn't work in the case of conversion failures for
the conversion-failure message itself :-(.  Fix by installing a "circuit
breaker" that disables attempts to localize this message once we get into
recursion trouble.

Patch all supported branches, because it is in fact broken in all of them;
though I had to add some missing translations to the older branches in
order to expose the failure in the particular test case I was using.
2008-10-27 19:37:22 +00:00
Tom Lane 05fc744b96 Add a new ereport auxiliary function errdetail_log(), which works the same as
errdetail except the string goes only to the server log, replacing the normal
errdetail there.  This provides a reasonably clean way of dealing with error
details that are too security-sensitive or too bulky to send to the client.

This commit just adds the infrastructure --- actual uses to follow.
2008-03-24 18:08:47 +00:00
Peter Eisentraut 6dfa40d69f Translation updates 2008-01-30 11:05:41 +00:00
Peter Eisentraut 9c76af4a5e Add _ to gettext triggers. Must have been forgotten here when it was introduced. 2005-10-04 11:14:03 +00:00
Peter Eisentraut 8511a1b734 New translation 2005-01-09 17:10:29 +00:00
Peter Eisentraut cd380b99cd Translation updates 2004-12-16 11:31:55 +00:00
Peter Eisentraut 93c4a14e5c New translation 2004-12-13 22:54:20 +00:00
Peter Eisentraut 99b735cc03 Work around lack of NLS support in libpgport by making those components
who use it scan the relevant source files for their own catalog.  It
creates a bit of duplicate work for translators, but it gets the job done
for now.
2004-11-27 22:44:15 +00:00
Peter Eisentraut 3ae6531673 Add translation from 7.4 branch to head. 2004-08-11 09:00:27 +00:00
Peter Eisentraut a2ec3fe817 New translation 2004-08-10 19:10:21 +00:00
Tom Lane b15f9b08ef Replace direct fprintf(stderr) calls by write_stderr(), and cause this
routine to do something appropriate on Win32.  Also, add a security check
on Win32 that parallels the can't-run-as-root check on Unix.

Magnus Hagander
2004-06-24 21:03:42 +00:00
Peter Eisentraut 1159c484b2 New translation 2004-06-10 17:10:24 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Peter Eisentraut 7397819f78 Translation updates 2003-11-14 23:59:12 +00:00
Peter Eisentraut a776bd9b69 New Norwegian translation by Trond Endrestøl, actually made for 7.3, but
this should help people get started in 7.4 as well.
2003-09-29 10:57:06 +00:00
Peter Eisentraut b994b143a6 New translations 2003-09-29 09:51:29 +00:00
Peter Eisentraut 2f9d32cded Run distprep target before creating list of files that contain translatable
strings in the backend, so that .l and .y files are included.  To that end,
don't make the .pot file a prerequisite on distprep.
2003-09-14 22:40:38 +00:00
Tom Lane b7489ac445 elog() is no longer a gettext trigger --- all remaining uses are considered
internal errors.
2003-07-28 00:25:21 +00:00
Tom Lane 2a4a0c4d71 Add ereport-related functions to GETTEXT_TRIGGERS list. 2003-07-19 20:32:12 +00:00
Peter Eisentraut df7618020b Merge PO file updates from 7.3 branch. 2003-06-28 22:31:01 +00:00
Peter Eisentraut d73f8137d2 Translation updates 2002-09-14 13:46:24 +00:00
Peter Eisentraut 12f80d7c69 Initial Spanish translation from Karim Mribti <karim@inlosa.com> 2002-08-28 21:01:14 +00:00
Peter Eisentraut 41c92ace2f Move PO files into subdirectories separate from the source code. 2002-08-21 20:42:27 +00:00