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 83768 - Don't include function names in translatable messages
Don't include function names in translatable messages
Status: RESOLVED FIXED
Product: gnome-media
Classification: Deprecated
Component: Gnome-CD
unspecified
Other All
: Normal major
: ---
Assigned To: Iain
gnome media maintainers
Depends on:
Blocks:
 
 
Reported: 2002-05-31 23:29 UTC by Christian Rose
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Christian Rose 2002-05-31 23:29:56 UTC
#: gnome-cd/linux-cdrom.c:249
#, c-format
msgid "(eject): ioctl failed: %s"

#: gnome-cd/linux-cdrom.c:434
msgid "(linux_cdrom_play): Drive not ready"

#: gnome-cd/linux-cdrom.c:454
msgid "(linux_cdrom_play): Drive still not ready"

#: gnome-cd/linux-cdrom.c:519
#, c-format
msgid "(linux_cdrom_play) ioctl failed %s"

#: gnome-cd/linux-cdrom.c:555
msgid "(linux_cdrom_pause): Drive not ready"

#: gnome-cd/linux-cdrom.c:568
#, c-format
msgid "(linux_cdrom_pause): Resume failed %s"

#: gnome-cd/linux-cdrom.c:587
#, c-format
msgid "(linux_cdrom_pause): ioctl failed %s"

#: gnome-cd/linux-cdrom.c:633
#, c-format
msgid "(linux_cdrom_stop) ioctl failed %s"

#: gnome-cd/linux-cdrom.c:849
#, c-format
msgid "(linux_cdrom_get_status): ioctl error %s"

#: gnome-cd/linux-cdrom.c:863
#, c-format
msgid "(linux_cdrom_get_status): CDROMSUBCHNL ioctl failed %s"

#: gnome-cd/linux-cdrom.c:874
#, c-format
msgid "(linux_cdrom_get_status): CDROMVOLREAD ioctl failed %s"

#: gnome-cd/linux-cdrom.c:939
#, c-format
msgid "(linux_cdrom_close_tray): ioctl failed %s"

#: gnome-cd/linux-cdrom.c:974
#, c-format
msgid "(linux_cdrom_set_volume:1): ioctl failed %s"


Please DON'T put function names inside messages marked for translation. Use
a printf-style approach instead, replacing the funtion name in the message
with %s.

Some key points why putting funtion names inside messages like this is bad:
* function names shouldn't be translated (and translator's usually do
translate what's marked for translation). Accidentally translated function
names has already happened
* This unnecessarily multiplies the amount of work for translators, since
the only difference between many messages above is the function name. Had
the function name been replaced with %s, it would only be a single message
to translate for those messages where the rest is identical
* If the code changes or messages or functions are moved around or funtions
renamed, all translations will need to be updated


BUT this breaks string freeze, so should most likely be aimed for 2.0.1
Comment 1 Christian Rose 2002-06-20 18:14:10 UTC
This bug also applies to messages in gnome-cd/freebsd-cdrom.c.
Comment 2 Göran Weinholt 2002-06-20 18:54:19 UTC
It would be better to use G_GNUC_FUNCTION, since you don't have to
write down the function name at all then. Here is an example of that,
in case anyone wonders how it should be used:

*error = g_error_new (GNOME_CDROM_ERROR, GNOME_CDROM_ERROR_NOT_READY,
   _("(%s): Drive still not ready"), G_GNUC_FUNCTION);
Comment 3 Kjartan Maraas 2002-06-21 22:54:21 UTC
My take on this is that we should remove the translation markers for
all strings that are printed on the console and consentrate on the gui
stuff. The rationale for this is that 99% of the users will never see
this and it only creates problems when reporting bugs as well.
Christian? (this means g_error(), g_print(), printf() etc)
Comment 4 Iain 2002-06-22 14:13:33 UTC
I've removed the _() from the lines that aren't meant for the end
user, just for the developers.