The string 'Translate Text' is not surrounded by drupal.t in the l10n_client.js file. Therefor it is not translated to the current locale.

CommentFileSizeAuthor
#1 l10n_client_TranslateText.patch885 byteshass

Comments

hass’s picture

Status: Active » Needs review
StatusFileSize
new885 bytes

Patch attached.

gábor hojtsy’s picture

Status: Needs review » Fixed

Thanks, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

hass’s picture

Status: Closed (fixed) » Active

I need to reopen this case. I'm not sure what is wrong with l10n_client, but the string in JS file is not translated... it looks like the JS translation is not working as expected. Nevertheless the string is t'ified and in the tranlation file it is displayed in english.

If i enable JS compression the JS files are translated. Looks more like a core bug, but maybe Garbor knows best what is broken. Not sure if this is not releated to $conf['locale_cache_strings'] = 0; in l10n_client

looks missing, too:

locale_update_js_files($form_state['values']['langcode']);
cache_clear_all('locale:', 'cache', TRUE);

gábor hojtsy’s picture

hass: Maybe you have more bugs here? ("Looks missing too" suggests it is not related, or you think it is not). The Drupal.t() issue sounds like a core issue from your description.

hass’s picture

"Looks missing, too" could be a problem of l10n_client, but i don't know how this functions should work. However i think a locale clear cache should be done after an re-import, isn't it? Additional the parsed files should be deleted after an re-import... i'm not sure how the JS files are updated or re-parsed. And I was unable to figure out how this works or should work. I hoped you know better... i'm only guessing

I opened a core case at http://drupal.org/node/232592

gábor hojtsy’s picture

Status: Active » Fixed

Found the core issue for editing translations not being carried over to JS, committed to 6.x and put RTBC for 7.x: http://drupal.org/node/305920

Also found that l10n_client does not invalidate the JS when you submit a string, so patched that at: http://drupal.org/cvs?commit=138906

I tried to track down how is the JS (or the DB) cache invalidated on PO imports in Drupal itself, but I could not find the place. That might qualify as another issue we need to figure out.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.