Alphabetize the lang files!

Bug #1197235 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Won't Fix
Low
Rebecca Blundell

Bug Description

The best way to organize the lang strings in a lang file is to alphabetize all of them. Many lang files have attempts to sort the strings by category, but this never works in the long run because it quickly becomes unclear which category new strings should go in.

So I've found that the most convenient way to sort them in the long run is just to alphabetize them. If anyone has some free time, it'd be good to go through all the lang files and alphabetize them. At least, the ones in the core Mahara download. We'd probably need a different process to handle the ones in the translation langpacks.

And of course it wouldn't make sense to do this by hand. You'd want to write a script that identifies the lang files and alphabetizes only the $string['name'] lines. It should be robust enough that it can handle multi-line strings. Comments interspersed amongst the strings should probably be discarded, because these usually refer to the string categories.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Tagging bite-sized, in the sense that it's a relatively large change, but it doesn't require much understanding of how Mahara actually works.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Oh, here's another complication to watch out for: plural lang strings!

https://bugs.launchpad.net/mahara/+bug/901051
https://wiki.mahara.org/index.php/Language_Packs/Plural_forms

tags: added: snack-sized
removed: bite-sized
Changed in mahara:
assignee: nobody → Rebecca Blundell (rjb-dev)
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

We decided today that we are not going to fix this as lang files are now often in sections which would make the alphabetization harder. Furthermore, it's easy to search in files to find the value.

Instead, Rebecca is going to look into consolidating lang strings and removing duplicates. See bug # 1742304 for more information.

Changed in mahara:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.