This is the path module counterpart for #540294: Move node language settings from Locale to Node module, to move language related code to their respective modules. The same argument stands here. Path module handles the storage of language information for paths, its just the input of the language that is in locale.module. Path module is otherwise full of locale support, such as in path_admin_overview(): http://api.drupal.org/api/drupal/modules--path--path.admin.inc/function/...
We'd want to move the tests related to language path support to path module, as well I guess, not done yet.
Comment | File | Size | Author |
---|---|---|---|
#7 | decouple-path-and-locale.patch | 2.26 KB | franz |
decouple-path-and-locale.patch | 2.27 KB | Gábor Hojtsy | |
Comments
Comment #1
catchCould we do #access => module_exists('locale'); maybe? That way any other form alter on this doesn't need to take into account whether locale module is enabled or not - structure will be the same.
Comment #2
Gábor Hojtsy@catch: how do you call locale_language_list('name') then? module_invoke()? That sounds like would present a separate language list if locale is not there, and could result in validation failures (the possible options would not have the selected language, but you cannot change it)?
Comment #3
catchhmm, fair enough. I had meant to mark this CNR from active anyway.
It'd be good if we could come up with a better pattern than module_exists() for stuff like this, really dislike that function, but obviously not for this issue.
Comment #5
franzYou probably meant '#default_value' => $path['language'], is that so?
Comment #6
Gábor HojtsyYes, that seems to be bad-copy-paste. Can you help with a fixed patch? :)
Comment #7
franzJust wanted to check. That should do it.
Comment #8
Gábor HojtsyLooks better, thanks :)
Comment #9
David Lesieur CreditAttribution: David Lesieur commentedChecked the code, played with it on a test site, looks good.
Comment #10
tarmstrong CreditAttribution: tarmstrong commentedJust wanted to link this issue to #1280996: New language_select element type for form API which is hopefully using the general idea of this patch to create a language_select element in more places in Core.
Comment #11
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks. Marking 'fixed'.
Comment #12
Gábor HojtsyThanks, we'll continue abstracting this out in #1280996: New language_select element type for form API. People interested please go there.