On 2019-Oct-07, Bruce Momjian wrote: > Uh, I looked at the pg_ugprade code and the error message is: > > pg_fatal("Your installation contains \"contrib/isn\" functions which > rely on the\n" > "bigint data type. Your old and new clusters pass bigint > values\n" > "differently so this cluster cannot currently be upgraded. > You can\n" > "manually upgrade databases that use \"contrib/isn\" > facilities and remove\n" > "\"contrib/isn\" from the old cluster and restart the > upgrade. A list of\n" > "the problem functions is in the file:\n" > " %s\n\n", output_path); > > and the "in database" (which I have changed to capitalized "In database" > in the attached patch), looks like: > > fprintf(script, "In database: %s\n", active_db->db_name); > > meaning it _isn't_ an output error message, but rather something that > appears in an error file. I don't think either of these are translated. > Is that wrong?
pg_fatal is a "gettext trigger" (see nls.mk), so that part of the message is definitely translated. And the fprintf format string should be decorated with _() in order to make translatable too; otherwise the message is only half-translated when it appears in the pg_upgrade log, which is not nice. This should look like: if (!db_used) { /* translator: This is an error message indicator */ fprintf(script, _("In database: %s\n"), active_db->db_name); db_used = true; } fprintf(script, " %s.%s\n", BTW, how is one supposed to "manually upgrade databases that use contrib/isb"? This part is not very clear. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services