Page MenuHomePhabricator

Translate extension styles are not loaded when fuzzy text is transcluded
Open, LowPublic

Description

When a page that is marked for translation is changed, the previous translations are usually invalidated and marked as "fuzzy" by wrapping them in <span class="mw-translate-fuzzy"></span>. On translated pages, this appears as a light pink background.

When fuzzy text is transcluded to another page, the text is still wrapped in the fuzzy span. However, no styles are loaded for .mw-translate-fuzzy, so the fuzzy text appears as normal text. This is problematic, as invalidated translations are often out-of-date, no longer make sense with the rest of the text, or factually incorrect. Without the pink style, someone reading the text is not informed that it needs to be updated, which also means that they are less likely to help update the translations.

This could be fixed by loading the ext.translate module on pages with transcluded translated text. Ideally it should only be loaded on pages that have fuzzy text, as the styles aren't required for fully-translated text.

Translated pages include a header saying that "Outdated translations are marked like this." when fuzzy text appears on the page. I don't think it's necessary to include this header, as it could add complexity and may cause more confusion than the pink text alone.