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.
Here is a very strange bug? feature?
I have to delete all duplicated suggestions from multiple user?
This is very useless workaround or maybe not?
Comment | File | Size | Author |
---|---|---|---|
#9 | d6uk.zip English Ukrainian translation | 867.23 KB | podarok |
#6 | languageicons-6.x-1.2.uk_.po | 63 bytes | podarok |
equal_strings_is_suggestion.png | 48.93 KB | podarok |
Comments
Comment #1
Gábor HojtsyWell, looks like the diff (shown with the last string) shows that there is some difference with the last char. Also, I tried to reproduce this by searching for "aluminium" in Kazakh (that's the language, right?), and no strings were found. Can you provide reproducible examples?
Comment #2
podarok2Gábor Hojtsy
It is Ukrainian
here is a link http://localize.drupal.org/translate/languages/uk/translate?project=&sta...
The strings are really equal !
Comment #3
podarokComment #4
Gábor HojtsyThat is interesting. The server should not accept strings which are same as previous ones. If you try to copy (with the pencil+arrow button) a suggestion and try to submit it unedited, you'll get "1 duplicate translation not saved" as feedback. If you copy more, the counter will increase. I tried this with Hungarian and Ukranian on the page you linked and it worked like this. Looks like something is not working the same way on import. Hum.
Comment #5
Gábor HojtsyLooking at this, the normal form submission runs via l10n_community_translate_form_submit(), which uses
Here, l10n_community_pack_string() is just \0 delimited strings, if multiple.
The import uses _l10n_community_import_one_string(), which does this:
Here, $value['msgstr'] is again either a single string, or a \0 delimited list of strings, if plural.
So looks like if we can reproduce this with .po file imports, we should be able to do that with web based editing as well (which I could not). Can you provide me with the recipe to reproduce?
Comment #6
podarokthe main trouble is that I do not know when and how that strings suggested into database...
it was done via po file import possibly
I can try to reproduce it...
I have a duplicated account at l.d.o for testing and have to try to play with po files...
Just tested
Tested with different options and their combinations
and
request from server is as usual
and nothing changed in http://localize.drupal.org/translate/languages/uk/translate?project=&sta...
suggestion was not added(that is good! but we still do not know where is a bug...)
Possibly it is a bug with xml-rpc from l10n_client?
cause as I see - suggested strings can be viewed at queue only after a some time(via cron? job_queue?), not at the same time as they were send from l10n_client
Comment #7
podarokComment #8
podarokpossibly we have to store into database not only a user and time but a way too
f.e: suggested from (array('po', 'web', 'xmlrpc', 'other'))
for debugging purpose
Comment #9
podarokhe he
looks like it can be reproduced
first time when I imports a large po file (attached) server tells me one words
the options
second time for the same file
the options
third time
the options
Wow!!!
There is a bug! after the first time every next time suggested strings have to be zero!!! But system stores random strings?!
My po file was generated from one of my live sites(Drupal 6) via export (/uk/admin/build/translate/export) all the strings
Comment #10
podarokand this screen after my "games" is changed
http://localize.drupal.org/translate/languages/uk/translate?project=&sta...
8(((
were 3 pages, now 5 pages
Comment #11
Gábor HojtsyOk, so my new suspect is database replication. My understanding from the above is that as the new records appear in the replicated DB, you get to see less string accepted (although I don't see why the duplicate count stays the same). How fast did you perform these 3 imports?
Comment #12
podarokaround a 10sec-5minutes between each one (copy past text request into this topic and waiting for 2 MB upload (10-30 seconds))
Comment #13
podarokif there is an issue with replication(or any) we need a code for clearing such duplications from database, cause in this issue my hands just in a seconds already imported into l.d.o database near a 800 duplicated suggestions 8((((
possibly top translation groups have this issue too...
2Gábor Hojtsy
Do I need to create another issue for that?
Comment #14
Gábor HojtsyUhm, looked at our database settings, we do not actually use replication. So even more mysterious. Don't know what to think yet then. I'll look at debugging this maybe later this week with much smaller .po files.
Comment #15
Gábor HojtsyFor #8, I'm working on refactoring history handling for strings, which among other things should provide exact information on how the string got into the database (even who submitted it when the attribution was set different to the submitter). I'm working on that at #1005436: Refactor history storage / handling but do not expect immediate results. (That will not solve the issue, but since you mentioned that tangent, let me cross-link to that issue, so you are aware).
Comment #16
Gábor HojtsyWe have string storage information for quite a while now. Are you still experiencing this issue? I have not heard from *anybody* else that they've seen this.
Comment #17
Gábor HojtsyCould it be that #991724: force to Unix line endings is the reason for this?
Comment #18
droplet CreditAttribution: droplet commented@Gábor,
it is not the same problem as I reported on #991724. (endings problem only (99.x%) only happened on multiple line strings)
I've seen such problem before, all suggestion are older around / before 2010. maybe buggy on previous version.
if you are remember when we implement #622500: Add hashkey to strings and translations for quicker comparison, you found that some duplicated strings.
Guess it should look into DB to see what happening.
Comment #19
podarok2Gabor
How can I test it?
I can`t test it on localize.drupal.org - its production
Comment #20
Gábor Hojtsy@podarok: you can join the test team and use that to test. Please do use minimal .po files to try and reproduce. DO NOT use .po files with hundreds of strings, if you can reproduce with a couple of strings.
Comment #21
SebCorbin CreditAttribution: SebCorbin commentedIs this still an issue?