Re: ToDo: show size of partitioned table - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: ToDo: show size of partitioned table
Date
Msg-id 20190402191531.GA23006@alvherre.pgsql
Whole thread Raw
In response to Re: ToDo: show size of partitioned table  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Responses Re: ToDo: show size of partitioned table
List pgsql-hackers
On 2019-Mar-13, Amit Langote wrote:

> +    if (show_indexes)
> +    {
> +        objects_name = gettext_noop("indexes");
...
> +        if (pattern)
> +            /* translator: objects_name is "index", "table" */
> +            psql_error("Did not find any partitioned %s named \"%s\".\n",
> +                       object_name,
> +                       pattern);
...
> +        /* translator: objects_name is "indexes", "tables" */
> +        appendPQExpBuffer(&title, _("List of partitioned %s"), objects_name);
> +

This stuff doesn't work from a translation standpoint; sentence building
is not allowed.  You have to do stuff like:

    if (tables)
    {
        errmsg = gettext_noop("Could not find any partitioned table");
        tabletitle = gettext_noop("List of partitioned tables");
    }
 ...
    if (pattern)
        /* translator: objects_name is "index", "table" */
        psql_error(gettext(errmsg), object_name, pattern);
      ...
    appendPQExpBuffer(&title, gettext(tabletitle));

and so on.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Erik Rijkers
Date:
Subject: Re: [HACKERS] generated columns
Next
From: Alvaro Herrera
Date:
Subject: Re: ToDo: show size of partitioned table