GNOME Bugzilla – Bug 83768
Don't include function names in translatable messages
Last modified: 2004-12-22 21:47:04 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
This bug also applies to messages in gnome-cd/freebsd-cdrom.c.
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);
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)
I've removed the _() from the lines that aren't meant for the end user, just for the developers.