Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
language.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Dec 2009 at 22:16 UTC
Updated:
3 Oct 2014 at 09:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
brianV commentedTagging for the novice queue.
Comment #2
marc delay commentedI've changed the hook_menu in locale.module to include the new menu wildcard patterns.
I have also change the
$items['admin/config/regional/translate/delete/%translation']
menu item to directly call the dlete form instead of calling a page with the validation inline. This validation has of course been moved into the translation_load function.
I have added the hook_load functions into the locale.inc file.
I changed the locale_translate_edit_form to accept the full $source object loaded from a single row in the locales_source table so that it matches the param structure from locale_translate_delete_form and they can use a common hook_load.
This is my first patch submit so I'm sure there will be problems and potential re-rolls.
Comment #4
dave reidSeems backwards to not provide the full language object. I'm sure we probably have to do additional loading on all of the pages that require the this menu loader. Can we simplify this?
We don't put this logic in any kind of menu loaders. Either return the object or FALSE.
This review is powered by Dreditor.
Comment #5
marc delay commentedI changed the two loader functions to load all fields.
like this:
I moved the conditional logic back into the forms.
I had to rework the forms using these loaders a bit. They were previously loading the infomation they needed in the forms and the code had to be change to use a full object instead of a single variable.
like this:
was changed to this
I had also previously submitted an incomplete patch which I also fixed. (I didn't include a variable change in the patch which probably caused an undeclared variable error.)
Comment #7
marc delay commentedSorry. Here's the real patch.
Comment #9
marc delay commentedComment #11
marc delay commentedSorry for the delay. Holidays and all.
I'm having problems with simpletest + MAMP which are impeding the progress here.
I have moved the load functions from locale.inc where they do not belong into locale.module where they actually work.
Comment #13
marc delay commentedmuch better, but still missed a $lid reference.
Comment #15
marc delay commentedI believe this patch is now officially ready.
There were two tests still failing because the test was looking for a custom error page. With the %wildcard autoloader all bad urls should goto page not found.
I have modified locale.test to reflect this change.
Comment #16
eric_a commentedOops ;-)
Also, I don't think you can just copy
return drupal_not_found()to the locale_translate_delete_form() form constructor function, which is supposed to return a form array, not a string of html. Best replaced withObject loaders are not just for "auto loading" by the menu system.
How about:
Comment #17
pasqualleI think this should be string_translation_load() or something similar. The word "translation" has many meanings in Drupal..
Comment #18
marc delay commentedThank you for the input.
This issue has been completely muddled by #480424: Update locale module to use drupal_static().
I'm going to look at the way they're using drupal_static and try to work this out.
I have high hopes that a solution will be here in a couple days. At the very least the wildcard loaders will be able to be implemented for the menu callbacks, if not for all the other places languages and string translations are loaded.
Comment #19
plachCleaning-up the "locale module" issue queue as per http://cyrve.com/criticals.
Comment #20
dave reidUm...this applies to the locale.module, not the language system. :)
Comment #21
plach@Dave Reid
I just talked with Gabor: we agreed to move to locale module the string-translation issues, while moving to the language system queue the language management (add/remove) and negotiation issues.
There is not always a clean distinction, in this case in this case probably I misunderstood the issue ;)
Btw:
typo
Powered by Dreditor.
Comment #22
sunPatch seems to be bogus/reversed.
This loader belongs into language.inc.
This function needs to be within the Locale module namespace.
Powered by Dreditor.
Comment #23
oriol_e9g#15: locale_menu_wildcard.patch queued for re-testing.
Comment #25
pasquallethe %language wildcard is fixed here: #1260510: Introduce a language_load($langcode)
I am not sure what to do in D8 with the string translation wildcard..
Comment #26
xjmHi @Marc DeLay,
Thanks for taking this on. Are you still working on this issue? If not, we'll unassign it in a day or two so that someone else can give it a try. (Feel free to assign it back to yourself if you'd still like to work on it, as well.) Thanks!
Comment #27
xjmPutting it back in the queue.
Comment #28
wamilton commentedlanguage module was already done, modified menu paths only in locale.module hook_menu.
Comment #30
k_zoltan commentedReviewed the patch the menu items this affects doesn't exist.
So there is actually no need for any patch to this issue.
For details see #1301040: Move language listing functionality from locale.module to a new language.module
Comment #31
sunThey still exist, but are (mostly) located in Language module now.
Comment #32
oenie commentedIt seems to me this issue is no longer relevant, since d8 has now switched to using the routing system ?
Comment #33
oenie commentedbad tag formatting, sorry
Comment #34
oenie commentedFixed for D7, obsolete for D8.