Project information is not kept between View/Edit links
meba - August 19, 2009 - 22:01
| Project: | Localization server |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
| Issue tags: | localize-drupal-testing |
Description
Check /translate/languages/cs/view?project=ac
Now click Edit. You expect to edit project "ac", the links should keep the query string.

#1
I feel the pain. Did not yet figure out how to push query string params into the menu tabs displayed.
#2
You want stylish or hackish solution? Yeah, I don't know stylish solution but hackish might be to use theme_menu_item_link, at least at LDO, since we can't put it into module
#3
Slept a bit on this one. Maybe we can also use a theme preprocess function for the page template. Depending on how late our function is called. Except that it might be ugly since the output is already themed for tabs there.
#4
#5
I'd love to get this solved on the PHP level if possible and only refrain to JS if on PHP it was not possible.
#6
#7
forget the last patch. the js way is a good way :D
#8
Well i think you are right about using preprocess_page but i think it will require rewriting alot of functions, including http://api.drupal.org/api/function/menu_local_tasks/6 (I mean wrapping it into own function)...
#9
Now that there is a Moderate page as well with the same filters (and new filters are added), it is even more important to try and keep these working. See http://localize.drupal.org/node/117
#10
@tobiasb: your second patch seems to be a better approach to me. Some notes:
- we do need to keep all the filtering options; see the new filter cleanup functions in l10n_server which get you a sanitized $filter array from $_GET
- http://api.drupal.org/api/function/hook_theme_registry_alter/6 says theme registry altering is only called on theme registry rebuild; how is it ensured that this file is included in that case?
- good idea to keep the filtering info for the export page too
#11
Thats the reason why only the first patch works/only the Js-Way.
#12
Heh, you can always put that PHP code into the module itself, right?
#13
I wouldn't add filters to menus. I'd rather store the filters in $_SESSION and retrieve them on pages where I'm interested. However if a filter is still coming via $_GET I'd overwrite the session one....
How about this approach?
I would love to write a patch but before that we need to:
#14
And, yes, as a next step we can even imagine storing filters in user profile ($user->data). If the user choose this (!?)
#15
@claudiu.cristea: I don't think session based storage of filters is ok, since it causes problems for workflows, when you are in translation and want to look up similar string in another window. You'll keep using different filters in the two windows. If you store the filter in session, the second window will override content in the first. That sounds like quite bas usability, doesn't it?
#16
Well, this can be a problem but not so big as the main one.
Keeping filters across pages and even sessions is a serious improvement. On big projects (like Drupal core) translators are working more than one day. Each day or new session they have to reenter at least the project name. This is quite annoying.
#17
Well, I've suggested a "your last 5 filters" block or something, which would let you quickly jump back to your recent filters, and we'd remember that per user.
#18
Ok, now with all queries & moderate.
#19