refresh strings in translation interface causes translations to be erased and then cannot be found in search
YesCT - April 23, 2009 - 05:16
| Project: | Internationalization |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
In the refresh tab of the translation interface page, it says "Use the refresh option when you are missing strings to translate for a given text group. All the strings will be re-created keeping existing translations." but when I, for example, select the check box for blocks and then click the button "refresh strings". Then go back to search and have it search for blocks that match anything, it finds no blocks that are translated, or need translation (and I had some that were translated before doing the refresh).
I tried emptying the cache, and running cron.
I made a little video to show what happens if that helps:
http://cathytheys.blip.tv/file/2025928

#1
Do you have "All langauges (Translatable)" selected in the Multilingual settings for each block?
#2
I have the same problem, refreshing the text group of Taxonomy will cause the complete erasing of all strings both translated or untranslated, which means, nothing would be found in searching the whole Taxonomy. Really weird! I am sure it's not what it supposed to be, but I don't know where the problem is!
#3
brucepearson, yep.
I wonder if it is a module interaction thing. Is there any easy way to export the list of modules and versions? hmmm
#4
I seem to have the same problem
Most of my taxonomy terms have gone from the translation search after refreshing
-----------------
Sorry, correction
The refresh eliminated the strings that are not handled by string translation, following some changes in translation mode settings.
The only strings that appear now are those of the vocabularies the translation mode is set to "Localize terms"
#5
I have the same problem too!
Did anybody found a workaround?
#6
Same for views.
Looking at the code, I would say avoid "refresh" like the plague, unless you know the sub-module implements it correctly. Blocks, Views, do *not* implement refresh at all, and from the reports above, I'd guess i18ntaxonomy may have problems too. If a submodule does not implement the refresh, the default behavior for i18n is to wipe away all translations in the text group. Not good.
Workaround? Don't use the feature. And also be aware that the strings often must be 'discovered' by going to a page where they are used. If it's not showing up in the search, go the page where it's shown and then try again. That seemed to work for views.
I may try to fix this and submit a patch if I get some time. Maybe in hook_locale as another op to check if 'refresh' is implemented, and if nobody implements it, don't do the refresh.
#7
What I think should happen to fix this bug is this:
hook_locale currently has 2 ops, 'groups' and 'refresh'
I think it should have a 3rd: 'implements'.
so a module that implements 'refresh' would have hook_locale like so:
mymodule_locale($op = 'groups', $group = NULL) {switch ($op) {
case 'groups':
return array('mygroup' => t('My Group'));
case 'implements':
if ($group == 'mygroup') {
return array('refresh');
}
break;
case 'refresh':
if ($group == 'mygroup') {
return mymodule_locale_refresh();
}
break;
}
}
If 'refresh' is not implemented, then it will not be presented in the form at admin/build/translate/refresh, and it's 'refresh' op not called.
#8
I believe lost translation data prove to be critical for the next release
#9
Hello, I was referred here by brucepearson and am also experiencing the same problem. Not sure what I can do to contribute as I'm not too knowledgeable with PHP, but will do what I can.
#10
Cross post
#11
I have a similar problem. I have a node type and a menu called "Order".
If I refresh the menu translations, the translation of the "Order" menu is gone.
When I change the name of the content type "Order" in something else, for example "Ordered", a refresh will not erase the translation of the "Order" menu. So when the name of the content type is the same as the menu, the menu translation is lost. The translation of the node type remains intact.
I have not tested this with another content type.
Did anybody else notice this issue?
#12
i have the same issue , everytime i refresh, most of my translations gets kidnapped plus i cant find a way to translate my taxonomies even when the string gets created and i add the translation string it still shows them in base language , so i dont know what to do, ill to to figure it out but suggestion would be really appreciated.
#13
I'm experiencing the same issue.
#14
Yes, there was a serious issue here with text groups not implementing the 'refresh' callback, and losing all strings.
That one is fixed, fully reworked that part. Text goups without a refresh function don't even show up anymore in the refresh page.
Now, other issues about this or that text group missing some string (but not all) please open separate issues for each.
#15
Automatically closed -- issue fixed for 2 weeks with no activity.