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.
When recording a suggestion, Localization Server should check if it isn't duplicated.
Sometimes different contributors translate twice the same string. If the string is short, like, say, "themes", both contributors will translate them as the same, thus creating duplicated suggestions.
Duplicated suggestions make the approval process a little harder, so they should be avoided.
Comment | File | Size | Author |
---|---|---|---|
#12 | duplicate_suggestion.patch | 4.46 KB | Gábor Hojtsy |
#10 | l10n_dup_2.patch | 4.24 KB | meba |
#9 | l10n_dup2.patch | 4.28 KB | meba |
#7 | l10n_dup.patch | 4.26 KB | meba |
#5 | l10n_duplicates.patch | 2.07 KB | meba |
Comments
Comment #1
Gábor HojtsyAgreed. Will work on this later.
Comment #2
hass CreditAttribution: hass commentedSubscribe. I estimate we have ~60% duplicated suggestions on the German translation server, too.
Comment #3
dami CreditAttribution: dami commentedSubscribe. From out experience, most of duplicate translations come from import. An alternative is to have a separate permission control on who can import new translations. We have had different ppl imported same setup po files multiple times... Maybe I should open a new feature request for this?
Comment #4
meba CreditAttribution: meba commentedI think I have a patch for this. Let me find it :)
Comment #5
meba CreditAttribution: meba commentedHere we go...
Comment #6
Gábor Hojtsy- I'd say duplicates are strings which are is_active (visible on the user interface) and either suggestions or active translations. The first one is not included in the query.
- You use the "unusual" join notation which is not seen in Drupal much. Drupal mostly uses table aliases instead of repeating long table names, and uses LEFT JOIN, INNER JOIN and friends when needed to specifically mark the type of join.
- I am not entirely sure we should report when a duplicate is found, we just should not save it, or maybe just report a summary number as the other changes are also reported as a summary.
Comment #7
meba CreditAttribution: meba commentedRerolling, thanks for the suggestions.
Comment #8
dami CreditAttribution: dami commentedPatch no longer valid against latest dev. But by looking at codes, I think there might be a problem: When checking duplicates, we need to look at both source and translated strings. There are cases where different source strings would have same translation. A submission is duplicate only when both source and translation strings are identical to existing ones, otherwise we are blocking valid translations.
Comment #9
meba CreditAttribution: meba commentedUpdated to HEAD and fixed a bug mentioned in #8
Comment #10
meba CreditAttribution: meba commentedRerolling against DRUPAL-5 because UI changes were committed.
Comment #11
Gábor HojtsyJust did a quick review, did not try the patch yet.
- There are whitespace problems from/around "Check for duplicate translation or suggestion.".
- '%d' in single quotes does not look nice in the patch.
Comment #12
Gábor HojtsyI've taken on fixing the cosmetics of this patch mentioned above and even more (eg. bad function naming). Committed this new functionality to Drupal 6.x-dev. Thanks for your help!
Ps. This does not deal with duplicates in any way on import, although above several people mentioned they get duplicates from import in high quantities. Now we have a distinct permission to import stuff, but still, it might make sense to also tap this into the import flow.
Comment #13
hass CreditAttribution: hass commented@Gabor: Just for information... is D5 version dead or going to die before it becomes final?
Comment #14
Gábor Hojtsyhass: I was pushed in this module's public issue queue by several people to migrate development from Drupal 5 to Drupal 6 and even convert to Views 2. Drupal 6 has quite lots of changes, and maintaining two different sets of modules is a big no-go. I don't plan any new features to be added to the Drupal 5 version. The target for Drupal.org deployment is Drupal 6, so I am putting on considerable work there.
Comment #15
hass CreditAttribution: hass commentedThat's fine - no problem to upgrade, but could you add this info to the project home, please. :-)
Comment #16
Gábor HojtsyOk, marked the 5.x release unsupported and added a piece on 5.x support discontinuation to the project page.
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.