diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2024-05-14 12:57:22 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2024-05-14 12:57:22 +0200 |
commit | 3ddbac368c205fce1f293de1fe60c1b479800746 (patch) | |
tree | 8e450cce1a8fb9e83690aec2a35a8300eb603957 /src/common/jsonapi.c | |
parent | 9eb54a258f53dd1d7f198e74c1b11b516ad2e98a (diff) | |
download | postgresql-3ddbac368c205fce1f293de1fe60c1b479800746.tar.gz postgresql-3ddbac368c205fce1f293de1fe60c1b479800746.zip |
Add missing gettext triggers
Commit d6607016c7 moved all the jsonapi.c error messages into
token_error(). This needs to be added to the various nls.mk files
that use this. Since that makes token_error() effectively a globally
known symbol, the name seems a bit too general, so rename to
json_token_error() for more clarity.
Diffstat (limited to 'src/common/jsonapi.c')
-rw-r--r-- | src/common/jsonapi.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/common/jsonapi.c b/src/common/jsonapi.c index 26e1f43ed38..3d3b76822b5 100644 --- a/src/common/jsonapi.c +++ b/src/common/jsonapi.c @@ -2105,7 +2105,7 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex) * A helper for error messages that should print the current token. The * format must contain exactly one %.*s specifier. */ -#define token_error(lex, format) \ +#define json_token_error(lex, format) \ appendStringInfo((lex)->errormsg, _(format), \ (int) ((lex)->token_terminator - (lex)->token_start), \ (lex)->token_start); @@ -2124,7 +2124,7 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex) case JSON_NESTING_TOO_DEEP: return (_("JSON nested too deep, maximum permitted depth is 6400")); case JSON_ESCAPING_INVALID: - token_error(lex, "Escape sequence \"\\%.*s\" is invalid."); + json_token_error(lex, "Escape sequence \"\\%.*s\" is invalid."); break; case JSON_ESCAPING_REQUIRED: appendStringInfo(lex->errormsg, @@ -2132,33 +2132,33 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex) (unsigned char) *(lex->token_terminator)); break; case JSON_EXPECTED_END: - token_error(lex, "Expected end of input, but found \"%.*s\"."); + json_token_error(lex, "Expected end of input, but found \"%.*s\"."); break; case JSON_EXPECTED_ARRAY_FIRST: - token_error(lex, "Expected array element or \"]\", but found \"%.*s\"."); + json_token_error(lex, "Expected array element or \"]\", but found \"%.*s\"."); break; case JSON_EXPECTED_ARRAY_NEXT: - token_error(lex, "Expected \",\" or \"]\", but found \"%.*s\"."); + json_token_error(lex, "Expected \",\" or \"]\", but found \"%.*s\"."); break; case JSON_EXPECTED_COLON: - token_error(lex, "Expected \":\", but found \"%.*s\"."); + json_token_error(lex, "Expected \":\", but found \"%.*s\"."); break; case JSON_EXPECTED_JSON: - token_error(lex, "Expected JSON value, but found \"%.*s\"."); + json_token_error(lex, "Expected JSON value, but found \"%.*s\"."); break; case JSON_EXPECTED_MORE: return _("The input string ended unexpectedly."); case JSON_EXPECTED_OBJECT_FIRST: - token_error(lex, "Expected string or \"}\", but found \"%.*s\"."); + json_token_error(lex, "Expected string or \"}\", but found \"%.*s\"."); break; case JSON_EXPECTED_OBJECT_NEXT: - token_error(lex, "Expected \",\" or \"}\", but found \"%.*s\"."); + json_token_error(lex, "Expected \",\" or \"}\", but found \"%.*s\"."); break; case JSON_EXPECTED_STRING: - token_error(lex, "Expected string, but found \"%.*s\"."); + json_token_error(lex, "Expected string, but found \"%.*s\"."); break; case JSON_INVALID_TOKEN: - token_error(lex, "Token \"%.*s\" is invalid."); + json_token_error(lex, "Token \"%.*s\" is invalid."); break; case JSON_UNICODE_CODE_POINT_ZERO: return _("\\u0000 cannot be converted to text."); @@ -2189,7 +2189,7 @@ json_errdetail(JsonParseErrorType error, JsonLexContext *lex) /* fall through to the error code after switch */ break; } -#undef token_error +#undef json_token_error /* * We don't use a default: case, so that the compiler will warn about |