Page MenuHomePhabricator

date format user preference option should be translatable
Closed, ResolvedPublic

Description

The names of the options under date format in user preferences are only english
(at least in swedish language projects). It would be nice if the options were
translatable through the messages in the MediaWiki namespace.

The "No preference" option should be translatable, and the different date
formats should use the local names of months.


Version: unspecified
Severity: normal

Details

Reference
bz3817

Event Timeline

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

You can translate them by submitting patch against LanguageSv.php and allow
everybody enjoy the translations. Because they are closely related to php code
that forms those formats, they cannot be translate separately. And looking the
code, that option should not have any effect on the actual date format as it's
not read in the code.

avarab wrote:

Marking this as INVALID, there are some messages that should only be
translatable through the language file and this is one of them, since your
translation won't have any effect unless you change the corrisponding PHP code.

Is it actually necessary to have an array hardcoded in the language file? Can't we
just run the actual output function to show how they're formatted?

Note that since eg the month names are editable messages, a hardcoded list can be
wrong with respect to actual output.

Now uses the actual timeanddate() to produce the list. The default option text
is configurable as MediaWiki:Datedefault.

Also I've restructured some of the date/time formatting stuff internally so not
as much needs to be cut-n-pasted on most languages. There's a lot of cleanup
still that could be done...