translations not being saved
taite11 - March 27, 2009 - 18:56
| Project: | Localization client |
| Version: | 6.x-1.7 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
Any translation I save through Localization Client does not save. I click "save translation" and then it appears to save, but on page refresh (and in translate interface) I can see that it was not saved. Saving terms through "translate interface" works fine.

#1
same here
#2
What browser(s) are you trying with?
#3
#4
Firefox. Same browser I use on the other site that the localization client works on.
#5
Ok, we've had reports of saving not working in Opera due to HTML uppercasing (http://drupal.org/node/264230). Anyway, can you please try and update to the latest version, which fixes possible HTML invalidity/unescaping issues. The difference between the two sites is either the data shown or the modules you use.
#6
same problem for me with FF 3 Linux
#7
#8
I have tried in several other browsers and get the same issue - I don't think it's browser related.
1. I type in the string I want to translate
2. I locate it from the list on the left
3. I click on it
4. I type my translation on the right
5 .I press save
6. The row on the left gets highlighted in green - AND the original string disappears
7. The translated string disappears from the right
8. I am now unable to locate the originals string on the left without refreshing the page.
Note: at step 6 - In firefox, I get left with an empty green row, about 4 pixels high... In IE I get a full height empty green row.
#9
I have noticed this issue for profile fields only, other content can be translated using the localization client.
#10
@thelostboy
Not just profile - i'm getting it now on menu translations, FF3 browser
#11
Some context and what I've discovered during debugging: (Bare with me because up to now I'd never looked at this code)
In my case, I am attempting to translate the contents of a block that has been configured to be Any Language (Translatable).
I tried using the localization client and saw what was reported in #8 with no translation (apparently) being saved.
I then also tried translating the same block contents via the traditional built in translation interface. Doing so works.
I made note of the 'lid' when I translated via the old interface.
I then tried the localization client again, but this time I traced the code in my debugger when I submitted the form.
As I trace through the code, I see that it in fact does save the translation (and there are records in both the source and target tables)
BUT what was saved was saved using an entirely different 'lid' than the one used when I translated via the other method.
So on closer examination _locale_import_one_string_db determined the lid by looking for 'source' with a textgroup = default (and not textgroup = 'block').
This explains why something gets saved, but doesn't have the same 'lid'. And ultimately why it appears as those the saving doesn't work.
So I back traced to see where 'textgroup' was set. (i18nstrings_save_string())
It is supposed to be determined by a value posted with the form, but there was no 'textgroup' field that was submitted (not an empty value - the field simply wasn't posted)
The code then simply defaults the value of 'textgroup' to 'default'.
I haven't yet looked at how the forms are built so I can't say with certainty if this is a bug or by design. i.e. I'm not sure if the form is supposed to have 'textgroup' set or not.
I will investigate further and see what I can find, but maybe this will help someone move this issue forward.
#12
Took a bit more of a look and this problem can start to be traced back to
i18nstrings_tt function which is partially responsible for the population of strings that show up in the localization client.
It attempts to give the localization client the source, translation AND the 'textgroup', but localization client's l10_client_add_string_to_page function only takes the first two arguments.
THEREFORE localization client will never know what the textgroup is supposed to be and therefore will never be able to set it as part of the form and certainly won't be able to submit it either.
Long story short, this is in part a shortcoming of the localization client but ultimately a problem with i18nstrings.module and its communication with the localization client.
#13
Ok, looks like we need to fix it in l10n_client. Can you share a patch? :)
#14
I will most certainly start crafting a patch once I fully grok the interactions of these modules.
It will likely require patching both modules. It will also require writing some javascript that doesn't exist yet to make this all work.
I will keep you posted.
#15
Any news regarding this issue?
#16
Any news?
#17
Sorry,
Any news on fix on this. It does not seem to update for me either...
Thanks.
#18
Not working for me either. Patch on the way?
Thanks!
#19
Subscribing
#20
Since this is related to textgroups not being supported, I think it's a duplicate of #361147: Support for different text groups.
#21
I just got the problem exactly as described in #8, then I got this:
Which in English is
or something
#22
@naught101 This looks like a Drupal file system configuration problem where the file system for JS translation caching is not set properly. This is a core configuration issue and unrelated to l10n_client.