Language module defines in language_admin_overview_form two attributes (#language and #language_default) which are not used in that form, but are retrived in hook_form_alter in locale module.

Given that this variables are only used in that case and it is not critical, this functions should be decoupled and that info be generated in the locale module.

Coming from #1877338: Convert language admin form to new #type 'table'.

CommentFileSizeAuthor
#1 clean_languages-1882448-1.patch1.12 KBplopesc
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plopesc’s picture

Status: Active » Needs review
FileSize
1.12 KB

Attaching patch that decouples both functions.

tstoeckler’s picture

Status: Needs review » Closed (won't fix)

Well language module needs to generate that data anyway. So when it makes it available for other's (i.e. locale.module) for altering, it just alleviates those modules' need to generate the data again for themselves. Memory-wise this is not very much information. So having those two things in $form_state is actually a good thing.

I'm going to mark this won't fix. Please re-open if you disagree, but I'm pretty sure that #1882712: Language admin form: move top-level language properties to table form row is the way to go.

Gábor Hojtsy’s picture

Issue tags: +D8MI, +language-base

Retroactively tagging for D8MI :)