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.
suggest to log every imported po files' MD5 checksum.
two benefits:
1. admin do not need to reapprove the bad suggestion
2. less server load (do not need to reimport identical po files.)
Comment | File | Size | Author |
---|---|---|---|
#10 | 5-years.jpg | 189.05 KB | droplet |
#1 | l10n_server_730674.patch | 3.82 KB | tobiasb |
Comments
Comment #1
tobiasbthats nice idea.
Comment #2
Gábor HojtsyWell, from what I can tell, this would only be an improvement if an admin declines at least one of the imported strings. Only those, which were declined would be reactivated. If someone imports a .po file multiple times, that would not result in multiple copies of the same suggestion to approve / decline. What are we trying to solve here?
Comment #3
droplet CreditAttribution: droplet commentedpeoples sharing .po on other web, and some peoples take it and reimport it into localize server.
so my ideas is going to prevent same strings from same .po reactivated again. more better way is prevent same suggestion reactive.
Comment #4
SebCorbin CreditAttribution: SebCorbin at Makina Corpus commentedI agree with Gabor, this could end up badly if we work at the imported file level.
But we could add an interface (through multi-step import form) when we ask the user to confirm the strings that have already been submitted and not approved.
Comment #5
Gábor HojtsyYeah that second step may work well indeed.
Comment #6
hass CreditAttribution: hass commentedIgnoring already uploaded strings should be much easier to implement I guess. This also means strings that have been declined should not re-imported and their status must not changed back from declined to suggestion. Otherwise we do all work again and again.
Comment #7
Gábor Hojtsy@hass: how do we tell the translator did not change their mind about a previously declined string and now (maybe after a discussion somewhere) wants to make that the translation or reactive that suggestion?
Comment #8
hass CreditAttribution: hass commentedI guess we need to come back to the open issue where strings are marked as Golden and can only changed by a manager :-)
We schould not forget how often people imported garbage and we have not been able to rollback this easily. I remember someone imported turkish into german...
I fear the import system as something highly abusive after this happened so often...
Comment #9
Gábor HojtsyYeah indeed, the import system assumes that humans do what the form is intended to offer. We can for example put in a confirmation step before we save the stuff which would print a few of the changes and summarize the full extent of the import maybe and ask for confirmation there. I would hate to revoke mass-manipulation possibilities from the import because that is the fastest mass-manipulation tool now (eg. for large scale search and replace changes with terminology until the UI offers it).
Comment #10
droplet CreditAttribution: droplet commented1.
I'm actually looking for a very basic feature that compare hash value between 2 PO files (Patch #1), Not every single string. If hash function in PHP is slow, we can use Linux tools instead. Performance doesn't seems like a problem here.
2.
After implemented Point 1, we can add confirmation step to postponed any import UNTIL admin approves.
We should never trust any imports, ask users to make confirmation is useless.
Import a PO file with 3000 strings is few clicks and 10 sec, but remove them from ADMIN side would be more than 3000 clicks and could be more than 10 hours work.
last word:
Comment #11
droplet CreditAttribution: droplet commentedComment #12
Gábor HojtsyI agree doing something simple if such simple thing helps is preferable as a first step. I am not entirely convinced that keeping a log of prior imported .po file hashes will help so much, but it may, and its not hard to implement indeed.
As for people doing damage, if you only grant trusted people the priviledges to approve translations, then the extent of the damage a member can do is to litter with suggestions, they would not affect any of your final translations. If you are to give this priviledge to normal members that any future mass-moderation tools will be a lot more dangerous in your team (eg. if we are to have a feature to refuse all suggestions from a user in a time period for example to clean up such problems). So I would urge you to review permissions in your group too.
Otherwise the patch could be ported to D7 now. It lacks an update path.
Comment #13
droplet CreditAttribution: droplet commented@Gábor Hojtsy,
they do not affected final translations but slow down the whole progress to approve suggestions. Yes. I can turn off any import PO files but I don't think it's right direction. Especially, we cannot give CREDIT to members from admin side.
Comment #14
hass CreditAttribution: hass commentedWe need months to decline garbage, but 3 seconds to create it. Horrible situation...
Comment #15
droplet CreditAttribution: droplet commentedHoping no one hit this problem but if you do... Here's a way to decline them all at quicker way:
https://gist.github.com/KayLeung/9b70662b2905c5bccf4f
( Sorry, no English version. Reading the JS code & DEMO link for filters settings :) )
You can also match submit date to get more accurate result in
(If you have any JS problem, contact me directly. Or leave message in Git)
Good luck