| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | locale.module |
| Category: | task |
| Priority: | normal |
| Assigned: | Crell |
| Status: | patch (code needs work) |
The locale module is already sorta page-split. That is, its page handlers live in locale.inc, which is conditionally loaded, rather than in the module file. There's no reason we need to do that old and yucky way anymore. :-) Unfortunately much of the locale system is called from various places in the install process, so we can't just move the entire locale.inc file to locale.admin.inc. The attached page moves those parts of locale.inc that are page-handler only to locale.admin.inc, but leaves in locale.inc those pieces that are called at other times. At least, I think it does. :-) Reviews to confirm that it was reorganized properly are most welcome.
#1
/admin/build/translate
* warning: include_once(includes/locale.inc.) [function.include-once]: failed to open stream: No such file or directory in /drupal6/modules/locale/locale.admin.inc on line 501.* warning: include_once() [function.include]: Failed opening 'includes/locale.inc.' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in drupal6/modules/locale/locale.admin.inc on line 501.
#2
There is settings.php modified in this patch. Not good.
#3
OK, let's take this again, from the top...
#4
This has, I'm certain, been broken by later patches. However, there's still a string-freeze patch pending so I am going to defer to that for now, since RC/string-freeze is nearly upon us. I'll reroll this after string freeze hits since this should have side effects other than code reorganization, unless Gabor tells me otherwise.
#5
Here we go, against latest HEAD.
#6
Oh, well, I regret not looking at this more closely before RC1... it looks like a nice cleanup without much of a side effect (only doing admin forms/pages)... *but* RC1 was a string freeze, and moving around this amount of string from the includes folder to the locale module folder would probably not get welcomed by our translators (then all the strings move to a different translation file for them, and it complicates their work a lot).
Postponing a proper locale module split to Drupal 7.
#7
Fortunately this one shouldn't have a noticeable performance impact the way the others should; it's just a code clean up. See ya in 7.
#8
Patch no longer apply.