After approving a set of translations in the moderate tab on localize.drupal.org, the filters are reset.
I had for example filtered on one specific project, after submitting the entries from the first page all other projects appeared again.
But this also happens when you fiter on a text string.
In my opinion these filters should be preserved.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | filters-modified.patch | 3.14 KB | gábor hojtsy |
| #6 | l10n_server_retain_filters2-D6.patch | 3.01 KB | claudiu.cristea |
| #4 | l10n_server_retain_filters1-D6.patch | 3.31 KB | claudiu.cristea |
| #2 | l10n_server_retain_filters-D6.patch | 1.5 KB | claudiu.cristea |
Comments
Comment #1
podaroksubscribe
Comment #2
claudiu.cristeaAttached is patch that should fix that.
Please test & review...
Comment #3
helmo commentedI just installed 6.x-1.x-dev on my dev machine and applying the patch seems to have the desired effect.
Comment #4
claudiu.cristeaI found that the call to
l10n_community_build_filter_values()is redundant while filters were obtained previously by the same method. Removed that call.Also optimizing a bit. I found that this piece of code is used now in 3 places:
... so I replaced it with a new function in translate.inc:
Here's the new patch.
Comment #5
gábor hojtsyOverall, looks good!
Detailed feedback:
What the translate.inc code does is to set $form['#redirect'] early on, so why not use the same pattern? That seems to require less coding and logic, especially none in the submission callback.
Too many spaces used for indentation.
Very good that this abstraction is there. It was already at multiple places.
Please use one line function introduction comments though to conform to the standard.
Also, we do not provide the type name in Drupal phpdoc, that is how it is, so remove "array".
This review is powered by Dreditor.
Comment #6
claudiu.cristeaOK. Fixed all the above stuff...
Comment #7
gábor hojtsyOk, I worked with this code a bit. The flattened filter arrays are really only needed for the redirection, so only used them there. Also shortened some code comments. Committed this one. Thanks for all your help.