Page MenuHomePhabricator

Mediawiki messages need separate parameters for date and time
Closed, ResolvedPublic

Description

Author: z9z8z-wps

Description:
Some Mediawiki messages like [[MediaWiki:Lastmodified]] make use of a parameter containing date and time in the current locale to build messages
like "This page was last modified 12:59, 2 July 2006".

Some languages require additional words between date and time in the context of a full sentence and/or would put the date before the time ("This
page was last modified on July 2, 2006 at 12:59"). So there should be separate parameters for date and time whereever a combined timestamp
parameter occurs.


Version: unspecified
Severity: normal

Details

Reference
bz6518

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:16 PM
bzimport set Reference to bz6518.
bzimport added a subscriber: Unknown Object (MLST).

Do you really really need that? Can't you rephrase it using colon or similar?

jimmy.collins wrote:

Yes. This could be helpfull f.e. in German localisation.

z9z8z-wps wrote:

(In reply to comment #1)

Do you really really need that? Can't you rephrase it using colon or similar?

Is it really really too hard to fix? It would be a bit cryptic to write "last change: 12:59, license: GNU, privacy: yes, ..."

Not impossible but it isn't trivial nor high up in the priority list.

z9z8z-wps wrote:

Assuming it is desirable to keep the parameter for the combined timestamp and just add one for time and date each, what is not trivial in
changing

$d = $wgLang->timeanddate( $timestamp, true );
$s = ' ' . wfMsg( 'lastmodified', $d );

to

$td = $wgLang->timeanddate( $timestamp, true );
$t = $wgLang->time( $timestamp, true );
$d = $wgLang->date( $timestamp, true );
$s = ' ' . wfMsg( 'lastmodified', $td, $t, $d );

in function lastModified() in Skin.php and something similar for getAuthorCredits() in Credits.php?

z9z8z-wps wrote:

Since there appears to be no more need for discussion please take the above as proposed patch. If it's not sufficient please tell what is
missing.

jimmy.collins wrote:

I have updated 'lastmodified' in r16592.

rotemliss wrote:

(In reply to comment #7)

I have updated 'lastmodified' in r16592.

I think that the message should be also renamed. Currently, if we don't run
rebuildMessages.php, only the date is shown. Also, rebuildMessages.php won't
help if the message is changed.

jimmy.collins wrote:

(In reply to comment #8)

I think that the message should be also renamed. Currently, if we don't run
rebuildMessages.php, only the date is shown. Also, rebuildMessages.php won't
help if the message is changed.

OK - I will rename it.

jimmy.collins wrote:

Done in r16594.

jimmy.collins wrote:

... and r16595. Grrrrr...