diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2009-03-26 22:26:08 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2009-03-26 22:26:08 +0000 |
commit | 8032d76b5bcb037e6bcb4b5615432d4f3842c523 (patch) | |
tree | aec09ebeb02b20d8f0b9833f819fcd60ae315d07 /src/backend/parser/parse_func.c | |
parent | 845693f70f9c49ada509187b153848c47a32b530 (diff) | |
download | postgresql-8032d76b5bcb037e6bcb4b5615432d4f3842c523.tar.gz postgresql-8032d76b5bcb037e6bcb4b5615432d4f3842c523.zip |
Gettext plural support
In the backend, I changed only a handful of exemplary or important-looking
instances to make use of the plural support; there is probably more work
there. For the rest of the source, this should cover all relevant cases.
Diffstat (limited to 'src/backend/parser/parse_func.c')
-rw-r--r-- | src/backend/parser/parse_func.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 4ef129a67b8..edee35edcee 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.211 2009/01/01 17:23:45 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.212 2009/03/26 22:26:06 petere Exp $ * *------------------------------------------------------------------------- */ @@ -89,7 +89,9 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (list_length(fargs) > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg("cannot pass more than %d arguments to a function", + errmsg(ngettext("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS), FUNC_MAX_ARGS), parser_errposition(pstate, location))); @@ -259,7 +261,9 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, if (nargsplusdefs >= FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg("cannot pass more than %d arguments to a function", + errmsg(ngettext("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS), FUNC_MAX_ARGS), parser_errposition(pstate, location))); @@ -538,7 +542,9 @@ func_select_candidate(int nargs, if (nargs > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg("cannot pass more than %d arguments to a function", + errmsg(ngettext("cannot pass more than %d argument to a function", + "cannot pass more than %d arguments to a function", + FUNC_MAX_ARGS), FUNC_MAX_ARGS))); /* @@ -1413,7 +1419,9 @@ LookupFuncNameTypeNames(List *funcname, List *argtypes, bool noError) if (argcount > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg("functions cannot have more than %d arguments", + errmsg(ngettext("functions cannot have more than %d argument", + "functions cannot have more than %d arguments", + FUNC_MAX_ARGS), FUNC_MAX_ARGS))); args_item = list_head(argtypes); @@ -1451,7 +1459,9 @@ LookupAggNameTypeNames(List *aggname, List *argtypes, bool noError) if (argcount > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg("functions cannot have more than %d arguments", + errmsg(ngettext("functions cannot have more than %d argument", + "functions cannot have more than %d arguments", + FUNC_MAX_ARGS), FUNC_MAX_ARGS))); i = 0; |