I have upgraded my site from 4.6x to 4.7.3 for about a month with no significant problems except one: The translated strings keep getting lost everyday. This has never happened even once before the upgrade.

Here are some of the details of this issue:

[1] The copy of the locale.module currently running has the $Id: locale.module, v 1.135.2.1 2006/08/08 17:50:28 killes Exp $. No modification has been done to that file.

[2] I have only one languege activated on the site. It's based on earlier version of Chinese translation with newer translations merged into it. English is not activated. No option for user to select language.

[3] The site can be overloaded during busy hours (SQL connection lost or SQL went away).

[4] The translation strings lost most often are the most common translations (such as translation for "Home", "Mon", "Add new comments", "My inbox" etc.) They got lost with great frequence: Everyday (but not always the same set of strings).

[5] This lost is perminent. Clean cache table won't help. Leave it along will not see any of those translation back.

[6] Those losted translation cannot be fixed with po translation file import with the "merge" mode (keep existing translation and add new ones). The import would complete without error and report "0 translation added".

[7] I tried (on a test installation of my site) deleting the language and recreate it with a po file downloaded from drupal.org. This doesn't prevent the translations from disappearing.

[8] The disappearing string has to be redone manually with "manage strings". Here is one example of of the result on a search for untranslated "Thu":

Thu
modules/locale.module:0,,,,, ;0, modules/locale.module:0;0, modules/locale.module:0, ;0

The location for this string (which has been translated times again for sure) looks very strange to me. Why "modules/locale.module:0" is repeated like that? Before in 4.6/4.5, this "location" has only one entry.

This issue is a show stopper for my site except stopping the show is no option so I am found myself doing the translation of those strings over and over again maunally each day. I appreciate any all help. A quick search on the site found nothing.

I have not had time to track the code on my own. I do have a guess based on what I experienced with this problem --

I suspect that this has to do with the "location" of the source string. Does the location of the source string play any role in search the source string?

I suspect that when one string (say "Home") shows up in a different location (or context) of my site, drupal create a new entry to the source table. I suspect that there are multiple entries now in the source table for the string "Home" but differ in their location/context.

I suspect that the newest entry for the source string is used which has no translation. The old ones are ignored while they have translation.

I notice that the source string is stored in a blob/text filed. That prevents it to be used as primary key, doesn't it? My sense is that if the source text (which are always English, no double bites stuff) is used as primary key, this problem I am having now will be resolved.

Thanks again for any help on this issue.

Comments

Xiang-2’s picture

Which is that a DB connection error occured during a translation lookup. In that case if the code mistaken it as "no translation for this string", it could then also insert a new entry for the string. This new entry either replaced or added on top of existing one.

If this is the case, the most common used strings would have a greater chance for this to happen.

syquest’s picture

What are the results if you leave the search strings text field blank in order get all strings returned? Do all of your strings have the same location? Your string locations should vary and not repeat as below:

modules/aggregator.module:201

modules/locale.module:48

modules/profile.module:292

modules/profile.module:299

etc...

I'm assuming that you turned the locale module off and upgraded in English, Drupal's default language. If not, then upgrade again under that condition. Furthermore, I would suggest that you always keep English active, but not available.

My site is in German, yet I didn't experience this problem after upgrading to 4.7.3 from 4.6.