1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Fix translation of strings in psql \d output (translation in headers worked,

but not in cells).
This commit is contained in:
Heikki Linnakangas
2010-03-01 21:27:32 +00:00
parent 62f5ade804
commit d46f100d06

View File

@ -3,7 +3,7 @@
* *
* Copyright (c) 2000-2009, PostgreSQL Global Development Group * Copyright (c) 2000-2009, PostgreSQL Global Development Group
* *
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.116.2.2 2010/03/01 20:55:53 heikki Exp $ * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.116.2.3 2010/03/01 21:27:32 heikki Exp $
*/ */
#include "postgres_fe.h" #include "postgres_fe.h"
@ -1947,6 +1947,7 @@ printTableAddHeader(printTableContent *const content, const char *header,
* Otherwise, the cell will not be translated. * Otherwise, the cell will not be translated.
* *
* If mustfree is true, the cell string is freed by printTableCleanup(). * If mustfree is true, the cell string is freed by printTableCleanup().
* Note: Automatic freeing of translatable strings is not supported.
*/ */
void void
printTableAddCell(printTableContent *const content, const char *cell, printTableAddCell(printTableContent *const content, const char *cell,
@ -1969,7 +1970,7 @@ printTableAddCell(printTableContent *const content, const char *cell,
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
if (translate) if (translate)
*content->header = _(*content->header); *content->cell = _(*content->cell);
#endif #endif
if (mustfree) if (mustfree)