Page MenuHomePhabricator

MediaWiki:Pageinfo-recent-edits cannot use formatDuration in non-nominative context
Open, MediumPublic

Description

The current message in MediaWiki core's includes/actions/InfoAction.php and its parameter $1 uses Language::formatDuration:

		// Recent number of edits (within past 30 days)
		$pageInfo['header-edits'][] = [
			$this->msg( 'pageinfo-recent-edits',
				$lang->formatDuration( $config->get( 'RCMaxAge' ) ) ),
			$lang->formatNum( $pageCounts['recent_edits'] )
		];

Its English translation is defined in ./languages/i18n/en.json as "pageinfo-recent-edits": "Recent number of edits (within past $1)",.
On https://translatewiki.net/wiki/MediaWiki:Pageinfo-recent-edits/en people can translate that message to other languages.

"within past $1" is not a nominative case.
This makes the message untranslatable.

It looks like the fix is to split this into separate messages.

Details

Reference
bz42864

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:58 AM
bzimport set Reference to bz42864.
bzimport added a subscriber: Unknown Object (MLST).
Nemo_bis created this task.Dec 8 2012, 4:56 PM

Adding many blockers of bug 38638 to the list of "easy" bugs, to mark them as candidates for [[mw:Google Code-in]] tasks (gci2013). If you think this bug is not suitable, remove the keyword.

jrbs added a subscriber: jrbs.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 30 2015, 12:08 AM
Nemo_bis set Security to None.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 29 2017, 12:31 PM

@Nemo_bis, is this all about adding this message into mediawiki i18n? Or is there more to it, if so, could you add more flesh to the ticket?

@D3r1ck01: The current message in MediaWiki core's includes/actions/InfoAction.php and its parameter $1 uses Language::formatDuration:

		// Recent number of edits (within past 30 days)
		$pageInfo['header-edits'][] = [
			$this->msg( 'pageinfo-recent-edits',
				$lang->formatDuration( $config->get( 'RCMaxAge' ) ) ),
			$lang->formatNum( $pageCounts['recent_edits'] )
		];

Its English translation is defined in ./languages/i18n/en.json as "pageinfo-recent-edits": "Recent number of edits (within past $1)",.
On https://translatewiki.net/wiki/MediaWiki:Pageinfo-recent-edits/en people can translate that message to other languages.

It looks like the fix is to split this into separate messages, because "within past $1" is not a nominative case.

But it's unclear to me how/what's the best way to fix this. So I am tempted to remove good first task until we know.

Aklapper updated the task description. (Show Details)Dec 5 2017, 3:21 PM

Removing good first task and Google-Code-in-2017 as per last comment. Please feel free to re-add once the path ahead for a contributor is clear.