Greg Sabino Mullane <htamf...@gmail.com> writes: > Please find attached a patch to enable more intuitive titles when using > psql and doing the following actions: > \dt \di \dv \dm \ds \dE > In other words, everything in listTables() > We still default to "List or relations", but if we know that the user has > requested exactly one specific type of relation, we use that > instead.
As presented, I think this fails the translatability guideline about "Do not construct sentences at run-time" [1]. You could get around that by selecting one of several whole title strings, though. For myself, if we were going to do something like this, I'd kind of like to cover more cases: greg=# \dti List of tables and indexes But I'm really not sure how to maintain translatability without a combinatorial explosion. It's fairly easy to see how we might produce output like greg=# \dtvi List of tables, views, indexes but "List of", "tables", "views", and "indexes" would all have to be separately translated, and I fear that might not hang together well. regards, tom lane [1] https://www.postgresql.org/docs/devel/nls-programmer.html#NLS-GUIDELINES