[geeklog-devel] Need to decouple config order from language file

Dirk Haun dirk at haun-online.de
Sun Feb 10 03:28:15 EST 2008

Blaine Lang wrote:

>Since 1.5 has not yet been released, if we wanted to re-organize the 
>display order, why would we not change that now.

We can. And probably will - there are quite a few options that I'd like
to reorder and regroup. I haven't done it yet since I wanted to solve
this problem first.

I'm trying to look ahead. If we want to reorder something in 1.5.1 (due
to whichever changes - new options making a fieldset too big so that we
want to split it or something like that) we would run into the problem I
described. If the order of the text strings in the language files
controls the order of the options on the config pages, then that will
surely lead to problems with the translations.

>We have the fieldset and sortorder fields in the conf_values table for 

But the order of the fieldsets has to match the order in the $LANG_fs array.

Take the "Story" fieldset. It already contains 18 options (including the
misplaced "After Saving User"). Say in 1.5.1 we add another two and then
decide to split it into two fieldsets. For lack of better ideas, let's
call them "Story 1" and "Story 2". Then we obviously want them to appear
in the order "Story 1", "Story 2", "Trackback", "Pingback" on that page.
Which means that we would have to change $LANG_fs from

  22 => "Story",
  23 => "Trackback",
  24 => "Pingback"


  22 => "Story 1",
  23 => "Story 2",
  24 => "Trackback",
  25 => "Pingback"

I.e. all the language files would have to be updated.

What I'm proposing would get rid of the 1:1 relation and $LANG_fs would
look like this:

  'fs_story' => "Story",
  'fs_trackback' => 'Trackback',
  'fs_pingback' => 'Pingback'

After the hypothetical change, we would only have to update one text
string and add the new one anywhere in the $LANG_fs array, since the
order is only defined in the database and is decoupled from the order in
the $LANG_fs array.

The same would also have to be done with the subgroups.

Clearer now?

bye, Dirk


More information about the geeklog-devel mailing list