BUG #4563: Translation of errors.
BUG #4563: Translation of errors.
От:
"Eugene Pimenov" <libc@me.com>
Дата:
The following bug has been logged online: Bug reference: 4563 Logged by: Eugene Pimenov Email address: libc@me.com PostgreSQL version: 8.3.5 Operating system: MacOS X, FreeBSD, whatever Description: Translation of errors. Details: Hello, I'm using ActiveRecord to connect to a postgresql database. One day it said me: âневеÑнÑй Ð²Ñ Ð¾Ð´Ð½Ð¾Ð¹ ÑинÑакÑÐ¸Ñ Ð´Ð»Ñ Ñипа byteaâ. I said: "wtf?! what's going onâ. I knew that the problem is in ActiveRecord, so I copied the error, and googled it. I found nothing. I downloaded the source code of postgresql, wrote a magick string: âgrep -R "$(echo 'невеÑнÑй Ð²Ñ Ð¾Ð´Ð½Ð¾Ð¹ ÑинÑакÑÐ¸Ñ Ð´Ð»Ñ Ñипа bytea' | iconv -t koi8-r)" .â and found: msgid "invalid input syntax for type bytea" msgstr " bytea" Then I googled for âinvalid input syntax for type byte railsâ and found http://dev.rubyonrails.org/ticket/1745 which seems to be the solution for my problem. Conclusion: translation of error messages is not helpful! It's harmful. My proposal: 1) Remote all translations for errors and shoot everyone in the head who wants to translate it. 2) Write a code to every translation (e.g. Error 424242 inccorrect ...), so people can actually google out a solution for their problems. Thank you.
Re: BUG #4563: Translation of errors.
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Eugene Pimenov" writes: > 2) Write a code to every translation (e.g. Error 424242 inccorrect ...), so > people can actually google out a solution for their problems. RTFM: http://www.postgresql.org/docs/8.3/static/errcodes-appendix.html regards, tom lane
Re: BUG #4563: Translation of errors.
От:
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Дата:
Tom Lane wrote: > "Eugene Pimenov" writes: >> 2) Write a code to every translation (e.g. Error 424242 inccorrect ...), so >> people can actually google out a solution for their problems. > > RTFM: > http://www.postgresql.org/docs/8.3/static/errcodes-appendix.html PostgreSQL error codes are not as unique as the error messages. If you don't like translated error messages, you could just set lc_messages to en_US in your postgresql.conf. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com