Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
locale.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2008 at 00:45 UTC
Updated:
8 Mar 2010 at 21:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedAnd here's the patch.
Comment #2
lilou commentedagain 1 :
Comment #3
lilou commentedComment #4
damien tournoud commentedWell spotted lilou, but we need to keep the function call!
Here is a reroll. Ran the test suite, 100% pass.
Comment #6
gábor hojtsyA closely related issue is #187398: Re-split locale module which should be followed up, fixed and committed to Drupal 7 as well. Locale.inc is basically all locale.module subfunctionality, and is not at all shared in the whole system. Locale functions like t() are elsewhere, not in locale.inc. So locale.inc should move under locale.module and named like other Drupal sub-module includes are now named.
Comment #7
lilou commentedSee: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
Comment #8
catchLooks like we could remove this nested if:
Comment #9
gábor hojtsyThis patch includes other places where inclusion of locale.inc was explicit and not implicit through locale_inc_callback. These should now also make use of drupal_function_exists(). This gets us much closer to execute a simple patch at #187398: Re-split locale module (which requires these changes or would need to modify incldue paths from includes/locale.inc to modules/locale/locale.admin.inc or so).
Please review this patch since it holds up #187398: Re-split locale module which holds up further nice developments (at least I have some cool ideas :) on locale functionality.
Comment #10
drewish commentedI ran through the install in English and it worked fine but after grabbing the Traditional Chinese D6 language set (there aren't any D7 ones yet) and then re-running the installation I got the following warning:
And no languages were displayed. I'm not sure if it was because there's a difference in D6 and D7 translations or a bug in the patch.
Comment #11
drewish commentedAfter reverting the patch I notice that there's more warnings but the form actually appears. It seems like the call to
drupal_get_form('install_select_locale_form', $locales);at the bottom ofinstall_select_locale()isn't finding the form.Comment #12
sunMost probably because the registry has no idea of Locale module / locale.inc during installation. #310467: Slimmer hook_theme() contains a fix for this, which allows us to load locale.module + locale.inc in maintenance mode.
Comment #13
gábor hojtsyUhm, well #187398: Re-split locale module is quite important for any future development on locale module to happen, so it would be good to bring this forward, so we can get that committed too and get over the cleanups with actual feature development (eg. cleaning up the very dated locale UI).
Comment #14
gábor hojtsyTurns out that #310467: Slimmer hook_theme() would not help solve this issue, because locale.inc is not at all in the locale module's location and is not referenceable through its info file. Ironically, for that to happen, we would need to fix #187398: Re-split locale module first, which was marked postponed on this issue. So looks like our circle is back to fixing #187398: Re-split locale module first and mark this postponed on that.
Comment #15
andypostMake it active 'cos fixed #187398: Re-split locale module
Now all form-related staff is moved to locale.admin.inc
Comment #16
andypostBecause locale.inc is loaded in locale_init() and used only in locale_js_alter() there's no reason to save locale_inc_callback()
Comment #18
andypostForget to include changed tests
Comment #19
andypostAdded comment about locale_js_alter() could be called from simpletest after installing locale.module so locale_init() is not called
include_once() changed to require_once() to unify with other tests
Comment #20
dries commentedI think it is odd that we specifically reference Simpletest here.
Comment #21
andypostChanged comment, locale_init() sometimes could be skiped
Comment #22
dries commentedGood! Committed to CVS HEAD. Thanks.