Page MenuHomePhabricator

Unification of ways for usage and calling messages used as headers for special pages
Open, Needs TriagePublic

Description

Background: In MediaWiki various special pages may be display default or customized '*-summary' messages.

( Type 1 )

Common naming pattern for all these messages is '$specialPageName-summary'.
With page rendering these '$specialPageName-summary' messages placed into a div with class 'mw-specialpage-summary'.

These message may be empty by default, but if not, its content is displayed as header in the appropriate special page.

Examples:

( Type 2 )

But in some cases, is still uses "legacy" messages, as 'MediaWiki:Recentchangestext' (see in Wikidata), that also shown in these same special page 'Special:RecentChanges'

This message is called by default way, as content language, a may be added in the '$wgForceUIMsgAsContentMsg' array for changing this behaviour (but this is not done anywhere).

In multilingual sites for this message currently realized solution with using content from translatable template, what displayed for users by depends from user interface language (by ugly way, through hacking msg 'MediaWiki:Lang', but this is worked).

Problems:

  • For Type 1
    1. some summaries contains default text, included in main language file and may be translated in the translatewiki.net (as 'MediaWiki:Recentchanges-summary' )
    2. some other summaries is empty by default (as 'MediaWiki:Search-summary' or 'MediaWiki:Watchlist-summary'); translations for these messages will not be exported to the extension or MediaWiki core (see comment in the twn).
    3. these messages called as language specific message, with postfix '/ru', '/es' etc. based on the user-interfase' language
    4. therefore, for creating these messages locally, needs to create separate messages for each supported language (this is very actually for multilanguage portals like Commons and Wikidata). And if for your language this message was not created, you will not see anything - nothing default value not be substituted.
    5. Also no ways for using Extension:Translate to easy creation and maintainig these translations locally (without manual copying by sysops)
    6. See also code includes/SpecialPage.php
  • For Type 2
    1. currently there is no common way for passing user interface language language code to templates etc.; see also similar problem in T139463

Proposal:

  • For Type 1
    1. Change MediaWiki code for using common way for calling '*-summary' messages by "Type 1", so that it will be as it is described in the mediawiki.org: by default, as content language); is needed, these messages may be included in the '$wgForceUIMsgAsContentMsg' (within instance settings)
    2. For 'UI messages', if translate is not present, should be substituted message for language defined by fallback chain, and if this also unexist - that default value from site content language.
  • For Type 2
    1. implement the path for passing user interface language language code to templates etc. (this will be separate task)
    2. discuss and consider about keeping these 'legacy' messages as 'MediaWiki:Recentchangestext'

Event Timeline

Kaganer created this task.Oct 3 2017, 5:58 PM
Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptOct 3 2017, 5:58 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Kaganer updated the task description. (Show Details)Oct 3 2017, 5:59 PM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 3 2017, 10:02 PM
Kaganer updated the task description. (Show Details)Oct 3 2017, 10:03 PM

@Kaganer: good first bug tasks are self-contained, non-controversial issues with a clear approach and should be well-described with pointers to help the new contributor. Given the current short task description I'm removing the good first bug tag. Please re-add the tag once the task description has been polished (for example, which code repository is this about. I've read the task description three and still have no idea what I'm supposed to do and how to test this, as a new code contributor not familiar with the MediaWiki codebase) and provides sufficient information for a new contributor. Thanks!

Base added a comment.Oct 4 2017, 12:02 PM

@Aklapper , are you sure this is how the tag is used? Honestly it seems clearer for me how to do this task than e.g. T176561 but neither has clear descriptions on how to do it, IMHO.

@Base: Feel free to correct/improve other tasks and their tags.

Kaganer updated the task description. (Show Details)Oct 5 2017, 4:09 PM
debt added a subscriber: debt.Oct 5 2017, 5:19 PM

@Kaganer can you add some use cases for this requested change?

Kaganer renamed this task from Bring 'MediaWiki: Search-summary' under control of '$wgForceUIMsgAsContentMsg' to Unification usage and calling ways for messages that a used as headers for special pages .Oct 5 2017, 11:56 PM
Kaganer updated the task description. (Show Details)
Kaganer updated the task description. (Show Details)
Kaganer renamed this task from Unification usage and calling ways for messages that a used as headers for special pages to Unification ways for usage and calling messages that a used as headers for special pages .Oct 5 2017, 11:58 PM
Kaganer updated the task description. (Show Details)

@Aklapper, @debt - some explanation was added. This task is not at all what I saw at the beginning ;)

@Aklapper, very thanks for the kick ;)

Kaganer updated the task description. (Show Details)Oct 6 2017, 11:47 AM
Kaganer updated the task description. (Show Details)
Kaganer updated the task description. (Show Details)Oct 6 2017, 11:51 AM

This looks to be more of a front-end user consideration that is not specific to the search pages, it seems like its all about special search pages, so therefore the MediaWiki-Search team might be the ones to take care of this.

This looks to be more of a front-end user consideration that is not specific to the search pages, it seems like its all about special search pages, so therefore the MediaWiki-Search team might be the ones to take care of this.

Yes, most likely you are right.

Kaganer updated the task description. (Show Details)
Kaganer added a subscriber: Nemo_bis.
Kaganer updated the task description. (Show Details)Oct 19 2017, 11:04 PM
Amire80 moved this task from Untriaged to Message keys names on the I18n board.Mar 12 2018, 1:27 PM
Amire80 renamed this task from Unification ways for usage and calling messages that a used as headers for special pages to Unification of ways for usage and calling messages used as headers for special pages .Jun 1 2019, 7:26 AM