You need to log in before you can comment on or make changes to this bug.
From chameleon user list correspondence: > I have another question about language template handling, and shared > resources. The wait image is declared as many times as there are > languages in all templates. If you change something in one template, > it affects that template. But when it comes to styling (text buttons, > nav > buttons) only those resources defined in the initial template are > loaded. So...if you start the session in English, the style shared > resoures defined in english apply. Styling defined differently in other > language templates has no effect. BUT it is possible to change a > stylesheet between languages. Um .... I see the problem. I think the caching mechanism is perhaps a little too aggressive. Right now, it caches the actual generated images on a per-template basis, but it will actually only load a shared resource once per session if caching is used. I think it can be made to work on a per-template basis, but this will cause the session to grow a little bigger and reduce performance (perhaps). > > I guess I'm saying that this is inconsistent and hard to follow. It > would be my preference to have chameleon accept all shared resources > as they are in a template, regardless of when they are loaded. Is > something that can be changed easily, say by me? Is it interesting > enough to others to hope for a change in a future release? I would actually classify this as a bug. I'll try to address it in one of the beta releases.
Changed target to 1.99 beta 3.
shared resources for generating text buttons are now cached on a per-template basis so this particular situation should not occur again. Liz, please verify when beta 3 is released ...
will do. Thanks!
ok, this bug has not been fixed. the bilingual application only uses the first template loaded shared resources. In this cases the english template is used and not the french. http://localhost/chameleon/samples/sample_bilingual.phtml I confermed this by: * making the TextButton normal buttons red ff0000 in the english template. * loaded app and notice red buttons on both english and french applications. * I then opened sample_bilingual.phtml and changed the following line: from: $oApp->CWCInitialize( dirname(__FILE__).'/sample_bilingual_en.html', $szMapFile ); to: $oApp->CWCInitialize( dirname(__FILE__).'/sample_bilingual_fr.html', $szMapFile ); This will allow the application to load the french template first. Since the french template did not have red buttons and was loaded first the english button became grey from the french textbutton shared resource. The idea of having a pre template session does not seem to be true.
fixed in cvs. The problem occurred if the sharedresource included <usetextbuttoncache value="false"/> If the textbutton caching was turned on, then a per-template cache was used. If the caching was off, then a new button would be generated, but it would be generated on a cached set of parameters in the session, these were cached per shared resource but not also by template.
beta 3 20041101 verified on windows. following comment#4 regression test. Works great!
Ok, maybe there are some issues. It is why I'm asking Chris advices on this comment be Paul work on it. I changed the "labelcolor" in the TextButtons shared resource to be "ff1111". "usetextbuttoncache" is set to false or to true 1. When I load the "sample_bilingual.phtml" application, the following buttons are red: "French", "Update", all tool buttons, all buttons in popup. When I switch to the French template, only popup buttons are red. 2. I made the changes proposed by Chris in comment #4. In the French template all buttons are black which I think is good. When I switch to the English template, the following buttons are red: "French", "Update", all tool buttons. No popup button is red. Chris what do you think?
Paul, is looking into this issue. I did not check the popups. Setting to Reopen
There is one outstanding problem, which is that the sharedresource used for the popup of a particular widget (note that it is widget-specific) will only be defined once, when the widget is first processed. Fixed in cvs. Now popups will use the sharedresource definitions from the current template rather than the first template loaded.
ok, the popupstyleresource is being used on a per template basis. However, If you follow the test sample in comment #4 to baiscally change the default initialized template from english to french: from: $oApp->CWCInitialize( dirname(__FILE__).'/sample_bilingual_en.html', $szMapFile ); to: $oApp->CWCInitialize( dirname(__FILE__).'/sample_bilingual_fr.html', $szMapFile ); The popups language on the buttons is always english. But when the default initialized template is set to english, the french template popups buttons get the french text. If this is an issue created out of this fix and it is a minor fix than this should be fixed for beta 3. If it is a much bigger issue a new bug should be created to address this issue.
Chris, sorry I noticed this before but forgot to comment on it. This is not the correct way to initialize chameleon to a different language. I will go over what you have done more carefully for RC1, but the generally accepted way of initializing to a different language would be to initialize with the english template but pass LANGUAGE=fr-CA on the URL to sample_bilingual.phtml, as in: http://localhost/chameleon/samples/sample_bilingual.phtml?language=fr-CA However, there may be a bug if you initialize with the french template but the language is en-CA (note that this is the wrong way to use chameleon, but I still need to fix it).
paul, so what you are saying is that inorder to define the order of the language templates you must call the service instance from the index.phtml file even though this sample application is not technically using the service instance???? I am a little confused. You may have to show me.
I think we can accept this as fixed (the original issue is fully fixed now) and I will look at Chris' situation and file a separate bug if necessary.