I was wondering say i translated "File" which is used on one of my profile tabs into a different language, will it make the word "File" appear translated every other place or will it only be on that specific Profile Tab?

I'm asking this because I'm afraid that if I translate general words like "view" "File" and such it would break the Drupal system?

Any help would be much appreciated,
Regards,
Amir

Comments

Gábor Hojtsy’s picture

Category: bug » support
Status: Active » Closed (fixed)

Yes, Drupal can only store one translation for the same string, and it does not in fact know whether the string is used in an email, a page, or whatever, so it always uses the same translation. Drupal 7 introduced string contexts to say "view" as in "view content" or "view" as in "a view in views module". Drupal 6 does not have that.

ah000’s picture

thanks alot for the quick reply,

so for example if I traslate: "Enter your e-mail address. You'll be sent a new password immediately"
how will the translated phrase exacly get stored in the Drupal 6?
I wonder what happends everytime the system encounters the word "password" , will it take what was translated in the this string corresponding to the word "password" or it would only care about the whole phrase ("Enter your e-mail address. You'll be sent a new password immediately") and would not look at each individual word inside the phrase. ... ?

Thanks,

Gábor Hojtsy’s picture

It will only care about the whole phrase. "view" and "view content" are two entirely different strings to Drupal, the later will not have "view" replaced with the translation when displayed. This is essential to support language teams reorder sentences, have different variants and suffixes on words when used, etc.

ah000’s picture

Thanks so much,
The other question that I have is:

warning: Missing argument 2 for theme_l10n_client_message() in /mnt/r0105/d20/s17/b03325c3/www/DOMAIN.COM/modules/l10n_client/l10n_client.module on line 488.

ps.and ofcourse DOMAIN.com is my domain.

I'm getting this 'Warning' and the translations don't get saved,
I don't know what the problem is.
any thoughts?
Thanks again,

Gábor Hojtsy’s picture

Title: Does the translated phrase, appear translated in everyother place that the same word/phrase is used? » Missing argument 2 for theme_l10n_client_message()
Category: support » bug
Status: Closed (fixed) » Active

That sounds like a bug, changed title and recategorized the issue for that. Anybody else seen that?

hamza11’s picture

Hi, I am having the same problem. The problem is with a field that is a taxonomy term. I have a view of type taxonomy term that displays terms and descriptions on the page. Terms are linked to another page. Taxonomy descriptions are being translated, but when translating terms and save translation, the client window displays the term has been translated by making it green. but when i reload the page the same error is displayed.
Missing argument 2 for theme_l10n_client_message()
and when i check the term in client window, it is still untranslated.
Please help me how to fix the error.
Thanks you.

hamza11’s picture

Title: Missing argument 2 for theme_l10n_client_message() » Problem solved. it was not Localization client's issue.

My problem has been solved. here is some detail:

Actually, the problem was not within the module. I created a view of type taxonomy term. I pulled fields from term name, term image and term description. I wanted to wrap the term name field within a div with a unique class to easily apply styles to that field. So within views cofiguration page of the term name field, i checked the checkbox "Rewrite output of this field" and wrapped the field within a div. Then i wanted to link the field to a different path. so i checked "output this field as a link". and linked this field to my desired path. So, what happened? when i went to translate this field through localization client. i found the field wrapped with the markup like this:

<a href = "some/path"><div class = "some-class">The Field title</div></a>

I copied the entire text with the markup and just changed the field title like this:

<a href = "some/path"><div class = "some-class">Translated title</div></a>

When i saved the translation and refreshed the page to view the result, i got the error:

Missing argument 2 for theme_l10n_client_message()

Then i edited my view, unchecked the checkbox "Rewrite output of this field". and translated the title again with the Localization client and translation was successfully saved. I think the problem was that a block level tag (div) was wrapped within an inline level tag (a).

Because, later, i wrapped the field's output within a div using a specific template file, suggested by views module for that particular field, and there was no problem. because the translation string in localization client's window was like this:

<div class = "some-class"><a href = "some-path">The field title</a></div>

This time, the markup was the same, but now an inline level tag (a) was wrapped within a block level tag (div).

Thank you, The developers of this fantastic module, "Localization client". We can never so easily translate our content without the help of this module.

Thank you again.

truyenle’s picture

Same issue here and Not in the same case of #7. Just the Title Login of user login block.

GiorgosK’s picture

Please keep title descriptive of the issue

GiorgosK’s picture

Title: Problem solved. it was not Localization client's issue. » Missing argument 2 for theme_l10n_client_message()
Issue tags: +-Missing argument 2 for theme_l10n_client_message()

oops wrong textfield

udane’s picture

I have the same problem. I have this string in the header of the view:
<div class="pest1 activo"><a href="actividades-listado">Listado</a></div><div class="pest2"><a href="actividades-mapa">Mapa</a></div>

Any help please?

tomrishworth’s picture

I'm also receiving this error.
When I try to save a translation I get a blank page that says { "message": null }

Gábor Hojtsy’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is not supported. The same problem was not reported for Drupal 7.