Excerpts from Greg Stark's message of vie ago 10 12:57:25 -0400 2012:
> On Thu, Aug 9, 2012 at 5:40 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
> > Fair enough.  I was not sold on doing that either.  I would still like
> > to know if it's okay to use one string with %s for the cases where
> > there's not a good reason for the "context" to be more than just a
> > SQL keyword.
> 
> Given that the SQL keyword is going to be an English word I can't
> imagine how this could be a big deal for translators. It might not
> match gender or case or something but only if the reader is
> automatically mentally translating the keyword into their language and
> then applying that language's rules to it. At least to me it makes
> sense to refer to "VALUES" as a singular noun or "LIMIT" as a generic
> male noun even though "limitation" would be feminine (I had to look
> that one up though so perhaps I'm not the best person to judge).

Speaking of english words, I was wondering at "check" the other day.
For example, we have

#: catalog/heap.c:2171
#, c-format
msgid "check constraint \"%s\" already exists"

#: catalog/heap.c:2534
#, c-format
msgid "only table \"%s\" can be referenced in check constraint"

And so on (there are several more).  Note that here we use "check
constraint" without any capitalization.  However this doesn't translate
too well as is; I mean, if I were to translate "check" into its
equivalent spanish word, I'm sure to cause a great deal of confusion.
So I've opted for putting the check word, verbatim, in quotes; for
example:

msgid "check constraint \"%s\" already exists"
msgstr "la restricción «check» «%s» ya existe"

However this is also a bit ugly because I now have two sets of quoted
words -- check itself and then the constraint name.

If we were to have CHECK in uppercase, this would be easy:

msgid "check constraint \"%s\" already exists"
msgstr "la restricción CHECK «%s» ya existe"

Maybe I should just do that -- uppercase the keyword instead of sticking
it in quotes.


(As for the gender of limit, in spanish, you'd probably think of "el
límite" which is masculine.  But in general, I agree with you: I think
it makes sense to keep the key word in english in the error message.)

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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to