Re-split locale module

Crell - October 29, 2007 - 02:12
Project:Drupal
Version:7.x-dev
Component:locale.module
Category:task
Priority:normal
Assigned:Crell
Status:patch (code needs work)
Description

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.

AttachmentSize
locale_25.patch198.65 KB

#1

catch - October 30, 2007 - 22:56
Status:patch (code needs review)» patch (code needs work)

/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

Gábor Hojtsy - October 30, 2007 - 23:01

There is settings.php modified in this patch. Not good.

#3

Crell - November 26, 2007 - 04:20
Status:patch (code needs work)» patch (code needs review)

OK, let's take this again, from the top...

AttachmentSize
locale.patch74.02 KB

#4

Crell - December 18, 2007 - 17:31
Status:patch (code needs review)» patch (code needs work)

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

Crell - December 21, 2007 - 16:47
Status:patch (code needs work)» patch (code needs review)

Here we go, against latest HEAD.

AttachmentSize
locale.patch73.84 KB

#6

Gábor Hojtsy - January 8, 2008 - 22:11
Version:6.x-dev» 7.x-dev

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

Crell - January 8, 2008 - 22:16

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

lilou - August 23, 2008 - 16:43
Status:patch (code needs review)» patch (code needs work)

Patch no longer apply.

 
 

Drupal is a registered trademark of Dries Buytaert.