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.)

CommentFileSizeAuthor
#10 5-years.jpg189.05 KBdroplet
#1 l10n_server_730674.patch3.82 KBtobiasb
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tobiasb’s picture

Status: Active » Needs review
FileSize
3.82 KB

thats nice idea.

Gábor Hojtsy’s picture

Well, 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?

droplet’s picture

peoples 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.

SebCorbin’s picture

Title: Prevent resubmit same po files » Warn when resubmitting same strings
Version: 6.x-2.x-dev » 7.x-1.x-dev
Issue summary: View changes
Status: Needs review » Needs work

I 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.

Gábor Hojtsy’s picture

Yeah that second step may work well indeed.

hass’s picture

Ignoring 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.

Gábor Hojtsy’s picture

@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?

hass’s picture

I 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...

Gábor Hojtsy’s picture

Yeah 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).

droplet’s picture

Issue summary: View changes
FileSize
189.05 KB

1.
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:

droplet’s picture

Issue summary: View changes
Gábor Hojtsy’s picture

Issue tags: +Needs update path

I 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.

droplet’s picture

@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.

hass’s picture

We need months to decline garbage, but 3 seconds to create it. Horrible situation...

droplet’s picture

Hoping 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

    var foundAuthor = jQuery(this).find('.author .l10n-more-link').text().indexOf('Multiple contributors');

(If you have any JS problem, contact me directly. Or leave message in Git)

Good luck