translating g_warning|g_error



Hi, I couldn't find discussion about this in a brief web search, and
obviously post-3.0, but since it came up with a patch I wrote:

* Should we be translating g_warning / g_error ?

At the moment, my random local set of git checkouts weighs heavily against:

$ (for x in *; do (cd $x; echo $x; git grep
'g_\(\(warning\)\|\(error\)\) *(_(';) done) |tee /tmp/translated.txt
$ wc -l /tmp/translated.txt
344 /tmp/translated.txt
$ (for x in *; do (cd $x; echo $x; git grep
'g_\(\(warning\)\|\(error\)\) *("';) done) |tee /tmp/untranslated.txt

$ wc -l /tmp/untranslated.txt
9480 /tmp/untranslated.txt

My take on this is that translating stuff in ~/.xsession-errors is
more harmful than helpful, because practically speaking that file is
going to be primarily viewed by developers diagnosing bugs.  I guess
the other potential audience is system administrators or technicians,
and I imagine most of them are probably going to find English errors
most useful too.

The modules with g_warning translations are often internally
inconsistent, too; gtk+ has around 21 translated, and hundreds of
untranslated.

gtk/gtkcolorbutton.c:      g_warning (_("Received invalid color data\n"));
gtk/gtkstyle.c:      g_warning ("Default font does not have a family set");

etc.

One other take is that Unix tools (e.g. gtk-update-icon-cache) should
be translated, but things which are going to end up in
~/.xsession-errors shouldn't.  That's a more complicated approach;
we'd probably practically speaking have to take the stance that
g_warning/g_error are always untranslated, so gtk-update-icon-cache.c
would need to switch to g_printerr().


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]