After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679467 - Mention translation in g_warning() documentation
Mention translation in g_warning() documentation
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-07-05 19:32 UTC by Philip Withnall
Modified: 2017-10-06 10:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Mention translation in g_warning() documentation (2.41 KB, patch)
2012-07-05 19:33 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2012-07-05 19:32:03 UTC
Quite often, I find myself wondering whether I should translate messages passed to g_warning() (and friends). The consensus seems to be that warning messages *shouldn’t* be translated, since they’ll only ever appear in .xsession-errors, and it’s more useful to the program authors for debugging if warning messages pasted in bug reports are in English.

Patch coming up to mention that the messages *shouldn’t* be translated for g_warning(), g_error(), g_critical() and g_debug().
Comment 1 Philip Withnall 2012-07-05 19:33:26 UTC
Created attachment 218120 [details] [review]
Mention translation in g_warning() documentation
Comment 2 Emmanuele Bassi (:ebassi) 2017-10-06 09:57:58 UTC
Review of attachment 218120 [details] [review]:

Looks good.

::: glib/gmessages.c
@@ +164,3 @@
  *
+ * A convenience function/macro to log a warning message. The message should
+ * typically <emphasis>not</emphasis> be translated to the user's language.

We should definitely not use DocBook tags, here — but the whole file needs to be ported to Markdown, apparently, so it's not a big deal.
Comment 3 Philip Withnall 2017-10-06 10:24:31 UTC
Ported to Markdown while rebasing the patch (gmessages.c has been ported to Markdown since this patch was written). Thanks for the review.