Page MenuHomePhabricator

Use natural sort order on Special:Allmessages
Closed, DeclinedPublic

Description

Author: alefzet

Description:
SpecialAllmessages forced messages to be sorted alphabetically (currently from key '1movedto2'
to 'yourvariant' key) but isn't naturally.
But for translator purpouse is needed sorting naturally as order in default MessagesEn file for
comparing necessary strings (as from 'sidebar' to 'autoredircomment').
Additional benefit of it is separating extensions messages from MediaWiki messages. It decrease
redundant works for extensions messages translations for translations for a new languages.
Please remove from SpecialAllmessages.php the statement ksort( $sortedArray ); Or implement (if for
somebody need) sorting switch "Alphabetically <-> Naturally"


Version: unspecified
Severity: enhancement

Details

Reference
bz7980

Event Timeline

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

I would suggest not to use Special:Allmessages for translation at all in normal
circumstances. Using it in active wiki will result in translation that is mixed
translation and site customizations and probably using the wrong license too.
There is better tools and methods available.

robchur wrote:

The page needs to be gutted and rewritten. :)

alefzet wrote:

Natural sort order on PHP page generated from Allmessages is enaugh at all.

rotemliss wrote:

I support a natural order on Special:Allmessages, because it makes sense even if
not used for translation: related messages are close (well, should be), and
though it may be so also when sorted if they have the same prefix, it's not
consistent.

(In reply to comment #2)

The page needs to be gutted and rewritten. :)

Right.

(In reply to comment #3)

Natural sort order on PHP page generated from Allmessages is enaugh at all.

Note that if you use this for pasting in messages files, you can just use
maintenance/language/rebuildLanguage.php to sort the file right (this script
should be finally used in the PHP view of Allmessages, but I think it should be
optimized first).

alefzet wrote:

(In reply to comment #4)

Note that if you use this for pasting in messages files, you can just use

maintenance/language/rebuildLanguage.php to sort the file right (this scriptshould be finally used
in the PHP view of Allmessages, but I think it should beoptimized first).

The order of keys generated with maintenance/language/rebuildLanguage.php is not conform to order in
MessagesEn.php. Actually rebuildLanguage make natural sort in keys blocks, not in whole file, blocks
still are unordered.

rotemliss wrote:

(In reply to comment #5)

The order of keys generated with maintenance/language/rebuildLanguage.php is

not conform to order in

MessagesEn.php. Actually rebuildLanguage make natural sort in keys blocks, not

in whole file, blocks

still are unordered.

Really? The whole files (well, inside $messages) should be organised like
MessagesEn.php, including keys, blocks, comments, and everything else. That's
the whole point of the script. Please open a bug for that, and attach a
generated file for example.

alefzet wrote:

Seems the bug should be closed, because not necessary now.