Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We have an almost 2 years old issue: #589774: Missing original strings for some modules (was Missing module release data) While we can not find a solution for that issue, then I suggest a new feature. With a new, 'start over packages' permission the corresponding users are also able to start over the packages (without the 'administer localization server' permission). I have included the patch too.
Comment | File | Size | Author |
---|---|---|---|
#43 | 1267466-43-start_over_packages.patch | 5.78 KB | SebCorbin |
#37 | l10n_server_start_over.patch | 5.79 KB | Zoltán Balogh |
#27 | l10n_server_new.patch | 9.15 KB | Zoltán Balogh |
#20 | l10n_server_global_permission.patch | 1.21 KB | Zoltán Balogh |
#17 | l10n_server_global_permission.patch | 1.25 KB | Zoltán Balogh |
Comments
Comment #1
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedAhh, not is_numeric($arg[3]). A better patch with is_numeric($arg[4]).
Comment #2
Gábor HojtsyThanks for working on this! Quick feedback:
- !empty($arg[4]) should go before is_numeric() to avoid notices
- l10n_communinty_project_releases_table() adds a column at all times to the table but only adds a header to it if start_over is supposed to be there; the column is there anyway; let's not add the column!
- These messages are pretty pointless for the users targeted, because they cannot do these things: "If you clean up the database before this release is parsed again, source strings and translations will be lost. Always make database backups.", "Make sure to parse this release data again before deleting a project or cleaning up the database, or you will loose existing translation data.".
- Whether the release to be deleted belongs to the project linked is not checked; if I click a truncated link I can easily accidentally reset a release I did not want to; at least check if the release belongs to the project in question
Comment #3
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedThanks for the feedback, I corrected all of them.
Comment #4
nevergone CreditAttribution: nevergone commentedPatch tested and works well.
Comment #5
Gábor HojtsyWhere is this invoked with $start_over FALSE?
The only difference in these two arrays is the last item. Let's not duplicate code! Instead build-up a $row and tack on the last item when available. Then add to $rows.
Well, checking if $project->pid == $release->pid at this point looks like futile, since $release can only come from a list of releases from the project. Looks like we should check whether $releases[$form_state['values']['release']->rid] even exists, right? Same in l10n_communinty_projects_release_reset(). I can invoke that function with a URL of unrelated project/release info, and could get through.
Comment #6
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedThe l10n_communinty_project_releases_table() function is invoked with $start_over=FALSE from the l10n_community_project_release() (with $link_releases=FALSE too). Others are corrected.
Comment #7
nevergone CreditAttribution: nevergone commentedWorks well. :)
Comment #8
Gábor HojtsyCommitted to 6.x-3.x. Needs to be ported to 7.x-1.x
Comment #9
Gábor HojtsyAlso rolled out to localize.drupal.org.
Comment #10
Gábor HojtsyAnnounced at http://localize.drupal.org/node/4124
Comment #11
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedI am a translation community manager, but the Start over link is missing for me.
Comment #12
zirvap CreditAttribution: zirvap commentedMissing for me too. I assume I should have seen it on pages like http://localize.drupal.org/translate/projects/avitamin/releases or http://localize.drupal.org/translate/projects/avitamin/releases/46629 , right?
Comment #13
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedYes, on http://localize.drupal.org/translate/projects/avitamin/releases for example. My patch just creates a new permission, but I do not know, how Organic Groups works exactly. I think, nothing connects the "translation community manager" with the "start over".
Comment #14
Gábor HojtsyI've granted that permission when I rolled this out. This is how the permission matrix for our roles look like for the server: https://skitch.com/gabor.hojtsy/gy5qt/permissions-localize.drupal.org - the other granted permissions work. The og_user_roles module we have just inherits those settings for in-group permissions. I've also cleared the cache. Did that help any? (I can see those links: https://skitch.com/gabor.hojtsy/gy5xx/localized-drupal-distribution-rele... - although I'm clearly an admin here, that at least proves the update is rolled out proper).
Comment #15
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedNow, I tested http://localize.drupal.org/translate/projects/avitamin/releases/reset/46629, and the access is denied. I (and nevergone) tested this patch without any organic groups modules. I readed the code again, the user_access('start over packages') is FALSE for the translation community managers, sure. What determines the display of the link?
The $start_over parameter is fix TRUE, so the user_access('start over packages') must be FALSE. Otherwise the links are displayed. But, I don't know why not.
Comment #16
Gábor HojtsyAll right, well, the group specific roles kick in when you *are* under a group. Looking at this, when you view this page it is not under any language group, so it will not grant you any permissions for that. Since you can be a member of any number of groups, possibly your permission for this would be the highest of your permissions from all the groups. That does sound like kind of overkill for this though and a pretty bad precedent... Looks like we need to figure out a way to have this UI somehow under a language group to keep the self-service nature of permission granting (vs. global permissions) and still have this feature work.
Comment #17
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedI installed a 'full' l.d.o, with groups and with the used roles and permissions. The attached patch is adds the 'translation community manager' role (similarly, than og_user_roles) to the user account, if the user is outside from any group.
I tested, works well.
Comment #18
nevergone CreditAttribution: nevergone commentedupdated: I tested the patch and not works well.
Comment #19
nevergone CreditAttribution: nevergone commentedstart over permission problems
Comment #20
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedAhh, hook_user() is too late, then lets move this logic to hook_init().
Comment #21
nevergone CreditAttribution: nevergone commentedI tested the patch and very works well. :)
Comment #22
Gábor HojtsyThis would widen the administer comments, administer nodes, etc. permissions these people have to the whole site, which is a no-go. The permissions of team managers should be confined to the group. As I've said above, this feature should be put under a group instead.
Comment #23
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedWould not be easier a new role ("global permission") instead of "translation community manager", which has only the "start over packages" permission? This operation is not group-specific.
Comment #24
Gábor HojtsyI don't think its easier to explain what that would be to 100 always rotating language teams admins.... This is a huge crowd changing organically. Making the UI intuitive and in-place is best.
Comment #25
Gábor HojtsyEg, I imagine you realize the strings are missing on the filter UI. So we can put on a little "troubleshooter" link there, like this: https://skitch.com/gabor.hojtsy/gb8nd/translate-localization-client-to-h... That page can have some explanation and a pointer to contact team admins if you don't have permission and a button if you do to start over the release? Seems like in-place in the group, much more closer to your workflow and can also be linked from the release list you worked with so far, since the page provides useful information even if you don't have permission to actually do something there. Also fits the permission/group model better.
Comment #26
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedOk, I working on it.
Comment #27
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedFirst attempt (not RTBC), just for the discussion. What do you think?
Comment #28
Gábor HojtsyLooks like a good direction. (I think you can still keep the missing strings links in the release table too?)
Comment #29
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedYes, we can still the link in the releases table with "browse translations" permission, and the authenticated users can access that. But where to redirect that link? I need to search a translation group, where the user is a translation community manager?
Comment #30
Gábor HojtsyWell, right, ok, let's skip that then.
Comment #31
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedI think, #27 will be good.
Comment #32
nevergone CreditAttribution: nevergone commented#27: I tested the patch and works well.
Comment #33
Gábor HojtsyThanks! Committed and pushed. Should deploy soon later today.
Comment #34
Gábor HojtsyNeeds to be ported to D7.
Comment #35
Gábor HojtsyThis should be deployed now, but it does not work. Using the project title instead of the short name and then pretending it is the short name does not really work. Also, it is displayed at a very odd place. I've suggested it would display under the release dropdown, right? Why are my suggestions ignored?
Comment #36
Gábor HojtsyBTW I've rolled back all patches committed from here, so you can start from a clean slate and broken functionality is not exposed on localize.drupal.org.
Comment #37
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedI am sorry, but the real simulation of the LDO is an impossible mission in any other environment. For example, I dont know, how do you know the title of the projects? Which connector provides this information? Why does not works the og_user_roles module for me?
In my case the project titles and project uris are always the same, so the previous patch is works well as tested in this case. I prepared the final patch for the current 6.x-3.x-dev version, which is functionally equivalent, but there are two differences. Its using the l10n_community_project_uri_by_title function for the correct link creation, and not ignoring your suggestion about the place of the link. If it does not work, then I really give up, because my environment is different. I set the needs review status, but I think, it is superfluous, because the functionality is tested before, and nobody can test whether this will really work on the LDO.
Comment #38
Gábor HojtsyThanks, committed and pushed, should be forward ported to Drupal 7 too.
Comment #39
Gábor HojtsyOk, rolled out on localize.drupal.org too. Community managers have the start over permission enabled. Hope this works good now. Still to be ported.
Comment #40
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedOhh yeah, works well.
„Release data for Quova 7.x-1.0 was deleted from the Localization server.”
Thanks a lot.
Comment #41
podarokprobably we have to add permission for a group of users for l.d.o with Start Over permission, not only admins
Comment #42
Zoltán Balogh CreditAttribution: Zoltán Balogh commentedAll members of the "translation community manager" role have this permission.
Comment #43
SebCorbin CreditAttribution: SebCorbin commentedRe-rolled for Drupal 7
Comment #44
SebCorbin CreditAttribution: SebCorbin commentedCommitted