Posted by Gábor Hojtsy on September 19, 2009 at 9:35am
| Project: | Localization server |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | claudiu.cristea |
| Status: | closed (fixed) |
Issue Summary
Looks like some clever module and theme authors add the empty string as translatable in their code. Localization server picks this up dutifully, but rather it should report it as a warning in the source code parse warnings. Maybe need to resolve on the potx layer.

| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| Empty t.png | 94.7 KB | Ignored: Check issue status. | None | None |
Comments
#1
#2
In UK L.D.O we have a lot of such strings too and they are marked as translated
subscribe
#3
Coming with a first patch...
Check the TODO that I added there...
#4
@podarok: I think you might experience a different bug. Our bug here is that the SOURCE string is empty, while on your screenshot, none of the source strings are empty.
@claudiu.cristea: IMHO, first we should check in potx itself. I'd imagine we need to solve this in the "save string callback" functions, one of which is implemented in potx and another one is implemented in l10n_server. We should IMHO store an error for these strings as well, so the warning report will include these bogus sources.
#5
2Gábor Hojtsy
gm... Oh, I see
In my screenshot there are many marked as translated strings but with empty or non visible translated strings...
Do I need creation for a new issue?
#6
@podarok: Yes, that IMHO should be a new issue.
#7
Opened a sister issue for potx at #609590: Do not store empty strings, signal an error instead which has the potx specific fixes. We need to use the same empty string treatment here, and I've added test coverage for that as well to ensure we have this right. Actually committing this, but don't know the exact time when I can roll this out (not now).
Best would be to also add an update function to convert empty source strings to warnings (since we know the file name and line info for them, we can easily generate these error messages on an update). And then remove these strings. That would help all kinds of sites running this module to update properly instead of just a one-off hackish rollout on localize.drupal.org.
Making needs work on that, but committed the attached patch, so even if this rolls out, such future modules will mark errors.
#8
I've did manual update on deployment on drupal.org, did not add update function since this should not be a significant problem for other users most probably. Consider it done.
#9
Automatically closed -- issue fixed for 2 weeks with no activity.
#10
Isn't this not also an issue of potx? potx should not extract the empty string or poedit chokes
#11
@hass: read #7 up there please.