Closed (cannot reproduce)
Project:
Drupal core
Version:
8.2.x-dev
Component:
locale.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Sep 2010 at 21:46 UTC
Updated:
28 Sep 2016 at 21:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ahwebd commentedNote: In Drupal 6 the filter behaves correctly
Comment #2
ahwebd commentedComment #3
plachThis belongs to the locale queue. Translation module concerns content translation.
Comment #4
plachDid you visit the pages that print the strings you wish to translate?
Comment #5
ygerasimov commentedI confirm the bug. There is no results for untranslated strings for other language but English (provided by Drupal). I have checked Russian. Possibly there is some logic behind that?
Comment #6
ygerasimov commentedThe problem is in _locale_translate_seek() function.
We need to apply language condition during join and not separately below. See attached patch.
Also I corrected Language or Languages title in header of table. If there is only one additional language added, when we use "All languages" in filter we will get plural Languages (but still we have only one added language).
Comment #8
ygerasimov commented#6: locale-untranslated.patch queued for re-testing.
Comment #9
yoroy commentedSubscribe, I've noticed empty results when searching for strings, too.
Comment #10
yoroy commentedSeems the latest patch partly fixes the issue.
Before:
http://skitch.com/yoroy/dsjqj/translate-interface-before
After:
http://skitch.com/yoroy/dsjqw/translate-interface-after
But searching for 'Read more', as used in teasers on the front page still doesn't return results.
This was the case where I hit on this issue: it's one of the few user-facing strings, I wanted to translate it to dutch.
Comment #11
ygerasimov commented@yoroy Can you see 'Read more' string when you just list all words without filters? I am not sure if this problem is related to this issue.
Comment #12
yoroy commentedI get a total of 19 results when doing a blank search on all languages, translated or untranslated, all text groups.
Comment #13
ygerasimov commented@yoroy but can you see 'Read more' in the list of 19 results? If not then you will not find it with filters applied and this is not related to this issue. Possibly it is some other bug or not.
Comment #14
yoroy commentedNo it's not in there. Sorry for distracting from the issue.
Comment #15
ygerasimov commentedI hope this issue is RTBC. Please review it.
Comment #16
sun.core commentedThere's no real difference in the performed query here, since the query performs a left join.
Should use format_plural().
Powered by Dreditor.
Comment #17
ygerasimov commentedRegarding the query there is big difference between two queries (the query is to select all source strings that do not have translations). Before patch the query was like following:
This means to join tables and then select all records with Russian language. This query does not make sense as if t.translation IS NULL that record should not exist in locales_target table but in other hand t.language = 'ru' means that record exists and language key is 'ru'.
After patch the query is similar to
That means to select all records from both tables where t.language = 'ru'. So if there is no ru translation in locales_target table the join will be with empty record so all values will be NULL. And that what we really need as after the join we select only records where translation IS NULL (that means that we haven't found any record in locales_target table).
In other cases I believe the queries are equal.
Regarding second point about format_plural() I have changed the patch.
Comment #18
dixon_This seems to be a quite major bug which hopefully still can make it into D7?
So the Drupal 7 release party in Gothenburg, Sweden will update, test and review this patch so we hopefully can make some progress on it.
I'm by no way stealing the issue by assigning it to me, just stating that I will coordinate some work on this later today.
Comment #19
dixon_I can confirm this bug. The patch in #17 fixes the problem as expected. But the patch only applied with offsets. So here is a re-roll of the patch in #17.
Do we need a test for this one?
Comment #20
fabsor commentedHi!
The patch above works like a charm! We also need a test to check that this actually works. the attached patch provides a test for this.
Comment #21
fabsor commentedouch!
The last patch was full of coding standards errors. Here is a better one.
Comment #22
fabsor commentedAlright, it's not my day today =)
Here is a patch that actually does what it is supposed to do.
Comment #23
ximo commentedPatch applied, problem solved. Great work, dixon_ and fabsor :)
(This patch was made possible by Gothenburg Drupal 7 Release Party.)
Comment #24
dixon_Patch still works and applies without offset.
Steps to reproduce the problem:
admin/config/regional/languageand add another language without importing any strings (everything will be untranslated in that language then)admin/config/regional/translate/translateand search for an existing string under your new language. Use the "Only untranslated strings".Next:
The only problem I have is this code comment:
It doesn't flow in my mouth that good. And initial capital letter in Language confuses me. Attached is a patch that instead says this:
Powered by Dreditor.
Comment #25
sun1) "English" should be uppercase, no?
2) assertNoText() is an insufficient assertion when you actually expect something particular to be there. assertNoText() will pass even if it is horribly broken.
Lastly, this bug sounds a bit annoying/confusing for the end-user, but it's not major.
Powered by Dreditor.
Comment #28
jhedstromThis appears fixed in 8.x. I could not reproduce with the steps outlined in #24.