Admin Center translation

Admin Center translation

Postby tungsten on Mon Feb 06, 2006 2:27 am

Hi,

after some hours of working on Lifetype it seems that i can't find anything now =)
I've been looking in the Forums but can't find an answer for the following:
I want to translate some words in the Control Center. For example "Appearance Management"

$messages["manageAppearancePlugins"] = "Appearance Management";

When i change it in the locale of the plugins, nothing happens. Do i have to change it in ALL locales of ALL plugins in that category?

---

2nd question:
After adding some plugins, i recognized that for example

(authimage plugin en)
$messages["label_configuration"] = "Configuration";

(authimage plugin de_DE)
$messages["label_configuration"] = "Konfiguration";

Displays the en locale. But the rest (below Configuration, for example
$messages["label_key"] = "Schlüssel";

is displayed in german again. So the plugin gets the translation from the english locale but only for the first 2-3 words. Any idea why?

I solved it, with renaiming for example:
$messages["label_configuration"] = "Konfiguration";
to
$messages["label_configuration2"] = "Konfiguration";

and also edit the template. I had to do it for each plugin (giving a unique name).

thx in advance
tungsten
tungsten
 
Posts: 4
Joined: Mon Feb 06, 2006 2:14 am

Re: Admin Center translation

Postby jondaley on Mon Feb 06, 2006 10:52 am

tungsten wrote:$messages["manageAppearancePlugins"] = "Appearance Management";

When i change it in the locale of the plugins, nothing happens. Do i have to change it in ALL locales of ALL plugins in that category?

Interesting. Yes, you would have to change it in each plugin, because a plugin that is loaded later overwrites the first one, since each plugin doesn't realize that another plugin already set the category name.

(authimage plugin en)
$messages["label_configuration"] = "Configuration";

(authimage plugin de_DE)
$messages["label_configuration"] = "Konfiguration";

Displays the en locale. But the rest (below Configuration, for example
$messages["label_key"] = "Schlüssel";

is displayed in german again. So the plugin gets the translation from the english locale but only for the first 2-3 words. Any idea why?

I solved it, with renaiming for example:
$messages["label_configuration"] = "Konfiguration";
to
$messages["label_configuration2"] = "Konfiguration";

and also edit the template. I had to do it for each plugin (giving a unique name).

I don't understand what you are saying. You are getting half a page in English, and half in German? What is the language of your blog? Does the plugin have a translation into that language?
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby tungsten on Mon Feb 06, 2006 11:41 am

Some have some have not (I made a translation for the ones without)

It's not half-half, only the first 2 or 3 constants are in englisch, the others are in the language i've chosen (so german for me).

For example:

authimage:

The ones in english:
$messages["label_configuration"]
$messages["label_enable"]
$messages["label_expiredtime"]

In the template the first lines are:
{include file="$admintemplatepath/header.template"}
{include file="$admintemplatepath/navigation.template" showOpt=AuthImage title=$locale->tr("authimage_plugin")}
<form name="authimageluginConfig" method="post">
<fieldset class="inputField">
<legend>{$locale->tr("label_configuration")}</legend>

But it's not a template problem. When i rename the constant or put an own one over "label_configuration" it works.

Not a big problem, but maybe a small bug. atm i'm renaming some constant in the templates.
tungsten
 
Posts: 4
Joined: Mon Feb 06, 2006 2:14 am

Postby jondaley on Mon Feb 06, 2006 12:51 pm

I still don't understand. AuthImage has a german translation, so you shouldn't have had to modify anything. What is your URL?
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby jondaley on Tue Feb 07, 2006 11:10 am

Hrm. I have a blog on your site, set the language to german, and I see lots of german everywhere.

Now, where do you see the english instead?
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby jondaley on Tue Feb 07, 2006 11:13 am

In the PM you talk about the gravatar plugin. And these messages:
$messages["label_configuration"] = "Konfiguration";
$messages["label_enable"] = "Aktivieren";

Perhaps the problem is that label_configuration is a generic term, and it is conflicting with another plugin that either doesn't have a german locale, or the german locale defines it as "Configuration" instead.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby tungsten on Tue Feb 07, 2006 11:13 am

check your pm please :)
i send some further information where. i edited most of the stuff already.
tungsten
 
Posts: 4
Joined: Mon Feb 06, 2006 2:14 am

Postby jondaley on Tue Feb 07, 2006 11:20 am

tungsten wrote:check your pm please :)
i send some further information where. i edited most of the stuff already.


I don't see any more messages. I see four messages, the one telling me the URL, two talking about activating my account, and one talking about the locales.

In the one talking about the locale, you are referring to the gravatar plugin only.

You have not made german translations for all of the plugins on your site. My theory is that one of the other plugin's English translation is overwriting your gravator german translation. you say that the gravatar english translation is not conflicting with the german, and I agree.
Try changing all plugins "configuration" label to something else, and you will see it change, I'll bet.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby tungsten on Tue Feb 07, 2006 11:27 am

so its like the "Appearance Management" thing.
The contants from the plugins are global and not only for the specific plugin.

I'll check that. thx
tungsten
 
Posts: 4
Joined: Mon Feb 06, 2006 2:14 am

Postby jondaley on Tue Feb 07, 2006 11:40 am

Correct. I believe all strings are global. Probably all strings defined in the plugin should be prepended with the plugin name.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby phunkphorce on Sun Feb 12, 2006 3:33 pm

jondaley wrote:Correct. I believe all strings are global. Probably all strings defined in the plugin should be prepended with the plugin name.


That's a good idea.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Postby markwu on Sun Feb 12, 2006 9:21 pm

If we add the prefix for each plugin locale strings, then we will have problem (minor problem):

Different message element, but have the same locale message.

I use $messages["label_enable"] in each plugin to "redefine" the locale string, so it won't increase the memory use.

But if I we plan to change all plugin locales to $messages["xxxx_label_enable"], I think it waste the memory.

Another way to solve this is we seperate those common plugin locale strings into a new "global plugin locales file". Then, user can edit once and used everywhere. And user only deinfe the locale string they need in thier plugin local file.

** But we need to write done this very clearly. We never define this spec for our plugin developer. For examples, what kind of plugin should locate which menu,.... something like this ..

Mark
markwu
Lifetype Expert
 
Posts: 920
Joined: Wed Mar 31, 2004 1:59 pm

Postby jondaley on Mon Feb 13, 2006 9:00 am

About wasting memory, yes that is true. Probably your "common" global area for plugins should just be in the main locale files. It is harder to add stuff to that file, ie. if a plugin comes out after a version has been translated, but it is probably somewhat unlikely to need a common string when a plugin is added, since no other plugins will be using that string yet, and we could add the common string on the next version of lifetype.
jondaley
Lifetype Expert
 
Posts: 6169
Joined: Thu May 20, 2004 6:19 pm
Location: Pittsburgh, PA, USA
LifeType Version: 1.2.11 devel branch

Postby markwu on Mon Feb 13, 2006 10:08 am

I think I won't put those common locale strings in main locale file. It is becasue our "release" strategy..

"We just only allow the minor change (without any locales change) and bug fix in minor version" ...

So, I am thinking remain it as two files. For the core locales, I think we should not change very often, so, we can follow our release strategy

For, plugin common locale strings, we may change time to time ....

That's why I suggest we seperate them as two files ....

Mark
markwu
Lifetype Expert
 
Posts: 920
Joined: Wed Mar 31, 2004 1:59 pm

Postby phunkphorce on Mon Feb 13, 2006 10:10 am

what is really the amount of memory we can waste by repeating certain string? 200 or 300kb at most? I think that's acceptable anyway.
phunkphorce
Lifetype Expert
 
Posts: 9028
Joined: Mon Aug 25, 2003 6:34 am
Location: Suomessa

Next

Return to Localization

cron