GNOME Goal: Remove markup in translatable messages

Guidelines

Remove surrounding HTML markup in translatable messages. This is less error-prone for translators, avoids an unnecessary burden for the translators since the markup should not be translated anyway, and makes translation tools, like translation databases, more efficient in finding and reusing translations.

More often than not, the problematic messages come from Glade. This required fixes in Glade and GTK+, see 97061. This has now been fixed in Glade3 and GTK+ trunk, which now support attribute parsing and editors.

How does it affect translators?

In .pot files, messages like this appear:

msgid "<b>Home Page Preferences</b>"

msgid "<span size=\"medium\"><b>No file</b></span>"

when they should really only be:

msgid "Home Page Preferences"

msgid "No file"

This is much less error-prone for translators, avoids an unnecessary burden for the translators since the markup should not be translated anyway, and makes translation tools, like translation databases, more efficient in finding and reusing translations.

Tricky cases

It can be hard to fix cases where the markup is embedded in the middle of a longer string, such as

msg = "Unfortunately GNOME 3 failed to start properly and started in the <i>fallback mode</i>"

You could try to eliminate the markup using a construction like

s = g_strdup_printf ("<i>%s</i>", _("fallback mode"));
/* Translators, %s stands for 'fallback mode' here */
msg = g_strdup_printf _("Unfortunately GNOME 3 failed to start properly and started in the %s"), s);
g_free (s);

But this is considerably more clumsy than the embedded markup version, and you may well introduce memory leaks and new 'split string' translation issues this way.

If in doubt, it is best to seek advice from translators on gnome-i18n@gnome.org.

How to fix a module?

By using the new features from Glade3 and GTK+, problematic markup can be removed from GLade messages, which helps translators.

Comments before approval

ChPe: This only works with the GtkBuilder format, not with libglade. So this depends on another Gnome goal being done first: GnomeGoals/RemoveLibGladeUseGtkBuilder

{i} Add your comments to this goal proposal here

Status of this goal

/!\ Note: Automatically updated stats can be found at http://people.gnome.org/~fpeters/reports/remove-markup-in-messages.html

{i} Tip: If you choose to work on a module, create the bug report on the GNOME bugzilla. This way people will know someone already works on it, and won't duplicate the work you're doing.

State

Markup

todo

<: #ff8080> todo

patch

<: #ffcc50> [[GnomeBug:xxxxx|patch]]

done

<: #80ff80> [[GnomeBug:xxxxx|done]]

not needed

<: #80ff80> not needed

Tarball

Status

core

gnome-session

done

gnome-settings-daemon

done

gnome-shell

done

mutter

done

pulseaudio

not needed

telepathy-mission-control

not needed

core-utilities

empathy

to do

eog

done

eog-plugins

done

epiphany

done

gnome-calculator

done

gnome-dictionary

not needed

gnome-contacts

done

gnome-disk-utility

done

gnome-system-monitor

done

gnome-terminal

to do

Only .glade.h files affected.

nautilus

done

core-extras

gnome-user-share

done

core-fallback

PolicyKit-gnome

done

gnome-panel

done

metacity

to do

core-os-services

accountservice

not needed

avahi

to do

ConsoleKit

to do

dbus

not needed

gdm

not needed

NetworkManager

not needed

PackageKit

not needed

polkit

not needed

upower

not needed

core-deps

gcr

done

tracker

to do

apps

accerciser

done

anjuta

to do

anjuta-extras

done

cheese

done

dasher

done

file-roller

done

ghex

not needed

glade

to do

gnome-games

to do

gnome-nettool

done

goobox

done

nemiver

done

orca

done

seahorse

done

totem

done

zenity

done

Initiatives/GnomeGoals/RemoveMarkupInMessages (last edited 2017-08-07 14:00:24 by PiotrDrag)