Page MenuHomePhabricator

advancedsearch-field-preview-sort uses "lego" concatenation
Closed, ResolvedPublic

Description

Hi,

It appears that advancedsearch-field-preview-sort is a message of the kind that is called "lego" in the MediaWiki jargon: another message is concatenated to it in run time using $.append() instead of being added as a $1 parameter.

This is strongly discouraged, because it causes major difficulties in translation:
https://www.mediawiki.org/wiki/Localisation#Avoid_fragmented_or_'patchwork'_messages

For example, this causes this message to appear in the Russian Wikipedia at "Сортировать по релевантность", which is grammatically incorrect. The translators have no way to translate this correctly.

Also, I'm not sure why is the <bdi> tag needed there.

This message must stop using run-time concatenation, and document in qqq what words can after it.

Thanks!

Event Timeline

Amire80 created this task.Aug 6 2019, 12:16 PM
Restricted Application added a project: TCB-Team. · View Herald TranscriptAug 6 2019, 12:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 530231 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Fix lego message for sort preview label

https://gerrit.wikimedia.org/r/530231

Change 530231 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Fix lego message for sort preview label

https://gerrit.wikimedia.org/r/530231

Pikne closed this task as Resolved.Mon, Sep 2, 12:40 PM
Pikne assigned this task to Tonina_Zhelyazkova_WMDE.

Looks good to me on beta wiki.