Re: [Rife-users] i18n patch
Geert, I cleaned up your patch quite a bit since you didn't really respect the coding standard of the project. In the future, please try to adhere to it very closely, I'm not sure I'll always be motivated to go through all the files like this and adapt them. You also forgot copyright statements, which I added. Please, also be careful when you add Javadoc statements, add @since tags that refer to the next release (1.4.1 now) and not to 1.0. I committed everything to a separate branch since I think it needs some more work. The branch can be found here: https://svn.rifers.org/rife/branches/i18n OK. I'll check each point to do better next time. I think I'll have more questions on the Rife coding standards. First ones: - is there a special order in the import instructions, especialy between rife ones and java ones ? - in ElementSupport, you remove all the try/catch of the new methods: is this because there is no action associated with the catch? Or because the EngineException catching was not enough specific? Proposition: to start a wiki page on rife coding standard with the rules I can learn from the corrections you did in my code. If you send me a login and password directly (not to the list), I'll open up commit access to that branch for you. ok I would be interested in the opinion of other users about these functionalities, please let us know what you think about it and if you have any suggestions. Here are some things that need to be done imho: * add Javadocs on every public method and class Even if there are implementations of interface methods? * add a package-level Javadoc to the new i18n package and explain the purpose and the architecture ok * work on you existing Javadocs, since some don't explain very well what goes on or are still in French and not in English oups! * add some comments in-line your code when you use an algorithm to explain what the purpose is of each step (the StringUtils encode stuff), don't say what the code does, explain it in a high level ok * I'm not sure about the fixed property names and input names on ElementSupport, it seems a bit hackish to me. I think it would be better to inject an instance of TranslatorSupport. I know that RIFE's IoC doesn't support the creation of references or invocation of factories in-line yet in XML, but it will be added soon. Imho it would be better to totally decouple the actual fact of having properties or inputs from the base element support. I put the constant values here as imo they are not associated at the TranslatorSupport interface but at a specific implemantation, i.e. ElementSupport. If we want to decouple TranslatorSupport implementation from ElementSupport, how to get then property specific to an element? ElementContext.getActiveElement() ? * For properties, I'm also trying to use plausible name for real properties as much as possible. These will be injected into the element instance if the setters are present and setL10N_LOCALE_PROVIDER(String) doesn't look very nice. I just used similar names and formats as what I found in Template and Rife Config. Do you want something like L10N_LOCALE_PROVIDER >>> L10nLocaleProvider * I'm not entirely sure about "boolean atTheEnd, boolean withDefault" for the addResourceBundle methods either. We're trying to reduce boolean flags as little as possible since without reading the Javadocs, it's impossible to know what the method call does once it's written. Do you think it's important to have these attributes present? If so, can you give me an example why and preferably a better API for achieving similar functionalities? "boolean atTheEnd" is to put the items either at the begining or at the end of the list. "atTheEnd" at true is for the lowest priority. It's a lowest/highest choice. May be we can use some constants like Translator.HIGH_PRIORITY_RESOURCESBUNDLE/Translator.LOW_PRIORITY_RESOURCESBUNDLE "boolean withDefault" : it is to ask that at least a default resource bundle, if available, should be added. An other way would be to provide as parameter eitheir null value or the default resourcebundle to be used, even if it's always Localization.getResourceBundles(new String[] {null}, getLocales()) Pierre Best regards, Geert On 29-mrt-06, at 15:14, Raoul Pierre wrote: Geert, See herewith file. Pierre Hi Pierre, can you please send the patches in a zip file, they get inline in the message and I can't apply them. Best regards, Geert On 28-mrt-06, at 15:06, Raoul Pierre wrote: Hello, Herewith, patch files for i18n. To use request, user or required locales, put in config.xml the parameter "I18N_FACTORY_IMPL" with value "com.uwyn.rife.i18n.versatile.VersatileI18n" (by default Rife behavior is as before). Each element can specify a locale to be used in priority with "L10N_REQUIRED_LANGUAGE" property (and if needed "L10N_RE
Re: [Rife-users] Re: i18n patch
Sounds great! Looking forward to read whatever you have. On 30-mrt-06, at 18:28, Frederic Daoud wrote: Hi Frederic, no, such a document hasn't been written yet. When I find the time I will put something on the wiki about it. If you have some time and want to have a go at it, go right ahead, I'll jump in to help or correct when needed. Best regards, Geert Sure, I'd like to help. Coding standards are very important to me, in my projects, professional and personal, so I have a lot of respect for others that try to establish and follow standards as well. I'll try to start writing a document soon, and as you said, you can correct me where needed. Thanks for your response. Frederic Hi Geert, Is there a document with the RIFE coding standards? I've looked through the RIFE source code quite a bit (sometimes it's the best way to learn things!), so I could already see some standards being used. However I was wondering if there was an official document. Thanks, Frederic ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] Re: i18n patch
> Hi Frederic, > > no, such a document hasn't been written yet. When I find the time I > will put something on the wiki about it. If you have some time and > want to have a go at it, go right ahead, I'll jump in to help or > correct when needed. > > Best regards, > > Geert Sure, I'd like to help. Coding standards are very important to me, in my projects, professional and personal, so I have a lot of respect for others that try to establish and follow standards as well. I'll try to start writing a document soon, and as you said, you can correct me where needed. Thanks for your response. Frederic > > > Hi Geert, > > > > Is there a document with the RIFE coding standards? > > > > I've looked through the RIFE source code quite a bit (sometimes it's > > the best way to learn things!), so I could already see some standards > > being used. However I was wondering if there was an official document. > > > > Thanks, > > > > Frederic > > ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] Re: i18n patch
Hi Frederic, no, such a document hasn't been written yet. When I find the time I will put something on the wiki about it. If you have some time and want to have a go at it, go right ahead, I'll jump in to help or correct when needed. Best regards, Geert On 30-mrt-06, at 18:04, Frederic Daoud wrote: I cleaned up your patch quite a bit since you didn't really respect the coding standard of the project. In the future, please try to adhere to it very closely [...] Hi Geert, Is there a document with the RIFE coding standards? I've looked through the RIFE source code quite a bit (sometimes it's the best way to learn things!), so I could already see some standards being used. However I was wondering if there was an official document. Thanks, Frederic ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] Re: i18n patch
> I cleaned up your patch quite a bit since you didn't really respect > the coding standard of the project. In the future, please try to > adhere to it very closely [...] Hi Geert, Is there a document with the RIFE coding standards? I've looked through the RIFE source code quite a bit (sometimes it's the best way to learn things!), so I could already see some standards being used. However I was wondering if there was an official document. Thanks, Frederic ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] encoding problem
Hi Lars, Do you explicitly change the encoding in your browser and fix it to a particular encoding instead of leaving it on automatic? Please check that. Best regards, Geert On 30-mrt-06, at 17:46, Lars Grupe wrote: Hi, My sites have the following header wit charset="utf-8" ( with "iso-8859-1" I have the same problem) acrocheck™ Term Design media="screen, projection" title="Basic Style" /> I use the following form as input: In my suggestion I call the function: String suggestion = getParameter("suggestion"); If I enter 'Höhe' in the form, I get a string 'Höhe'. There is something wrong! Cheers, Lars ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] encoding problem
Hi, My sites have the following header wit charset="utf-8" ( with "iso-8859-1" I have the same problem) acrocheck™ Term Design I use the following form as input: In my suggestion I call the function: String suggestion = getParameter("suggestion"); If I enter 'Höhe' in the form, I get a string 'Höhe'. There is something wrong! Cheers, Lars ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
[Rife-users] "Rife"
Has everyone seen this ? :) http://www.eweek.com/article2/0,1895,1943819,00.asp Bevin said he named the project RIFE because he liked the word. "It means 'prevalent to an increasing degree,'" he said. "And when you mangle the letters around you get 'FIRE,' which is the RIFE logo." fred ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] i18n patch
Hi Pierre, I cleaned up your patch quite a bit since you didn't really respect the coding standard of the project. In the future, please try to adhere to it very closely, I'm not sure I'll always be motivated to go through all the files like this and adapt them. You also forgot copyright statements, which I added. Please, also be careful when you add Javadoc statements, add @since tags that refer to the next release (1.4.1 now) and not to 1.0. I committed everything to a separate branch since I think it needs some more work. The branch can be found here: https://svn.rifers.org/rife/branches/i18n If you send me a login and password directly (not to the list), I'll open up commit access to that branch for you. I would be interested in the opinion of other users about these functionalities, please let us know what you think about it and if you have any suggestions. Here are some things that need to be done imho: * add Javadocs on every public method and class * add a package-level Javadoc to the new i18n package and explain the purpose and the architecture * work on you existing Javadocs, since some don't explain very well what goes on or are still in French and not in English * add some comments in-line your code when you use an algorithm to explain what the purpose is of each step (the StringUtils encode stuff), don't say what the code does, explain it in a high level * I'm not sure about the fixed property names and input names on ElementSupport, it seems a bit hackish to me. I think it would be better to inject an instance of TranslatorSupport. I know that RIFE's IoC doesn't support the creation of references or invocation of factories in-line yet in XML, but it will be added soon. Imho it would be better to totally decouple the actual fact of having properties or inputs from the base element support. * For properties, I'm also trying to use plausible name for real properties as much as possible. These will be injected into the element instance if the setters are present and setL10N_LOCALE_PROVIDER(String) doesn't look very nice. * I'm not entirely sure about "boolean atTheEnd, boolean withDefault" for the addResourceBundle methods either. We're trying to reduce boolean flags as little as possible since without reading the Javadocs, it's impossible to know what the method call does once it's written. Do you think it's important to have these attributes present? If so, can you give me an example why and preferably a better API for achieving similar functionalities? Best regards, Geert On 29-mrt-06, at 15:14, Raoul Pierre wrote: Geert, See herewith file. Pierre Hi Pierre, can you please send the patches in a zip file, they get inline in the message and I can't apply them. Best regards, Geert On 28-mrt-06, at 15:06, Raoul Pierre wrote: Hello, Herewith, patch files for i18n. To use request, user or required locales, put in config.xml the parameter "I18N_FACTORY_IMPL" with value "com.uwyn.rife.i18n.versatile.VersatileI18n" (by default Rife behavior is as before). Each element can specify a locale to be used in priority with "L10N_REQUIRED_LANGUAGE" property (and if needed "L10N_REQUIRED_COUNTRY") Otherwise user locale is used if specified with "L10N_USER_LANGUAGE" input (and if needed "L10N_USER_COUNTRY") . If no required or user locale is specified, then the request locales are used, if available. Each element can have its own resource bundle: use L10N_REQUIRED_RESOURCEBUNDLE property Regards Pierre -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] localized login template
Hi Pierre, just put it where you think it's the most appropriate, it can easily be moved if needed afterwards. Best regards, Geert On 30-mrt-06, at 13:28, Raoul Pierre wrote: Geert, Have you any suggestion for the best place to put it in wiki? Atm a lot about i18n is under Cook book Templates page. So may be a new entry "Translator" there, even if it's possible to use it in other context. Pierre Hi Pierre, maybe it would be a good idea for you to write a small documentation piece about the features you implemented, as I do for the release notes. This would make it easier for everybody and I can also just integrate them in the release notes of the next version. Feel free to use the wiki for doing this. Best regards, Geert On 30-mrt-06, at 12:21, Raoul Pierre wrote: Lars, Should the path 'l10n/authentication/login' point to my login template? No, to your resource bundle to be used by the template associated to the element. Pierre ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] localized login template
Geert, Have you any suggestion for the best place to put it in wiki? Atm a lot about i18n is under Cook book Templates page. So may be a new entry "Translator" there, even if it's possible to use it in other context. Pierre Hi Pierre, maybe it would be a good idea for you to write a small documentation piece about the features you implemented, as I do for the release notes. This would make it easier for everybody and I can also just integrate them in the release notes of the next version. Feel free to use the wiki for doing this. Best regards, Geert On 30-mrt-06, at 12:21, Raoul Pierre wrote: Lars, Should the path 'l10n/authentication/login' point to my login template? No, to your resource bundle to be used by the template associated to the element. Pierre ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] localized login template
Hi Pierre, maybe it would be a good idea for you to write a small documentation piece about the features you implemented, as I do for the release notes. This would make it easier for everybody and I can also just integrate them in the release notes of the next version. Feel free to use the wiki for doing this. Best regards, Geert On 30-mrt-06, at 12:21, Raoul Pierre wrote: Lars, Should the path 'l10n/authentication/login' point to my login template? No, to your resource bundle to be used by the template associated to the element. Pierre ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users -- Geert Bevin Uwyn bvba GTalk: [EMAIL PROTECTED] "Use what you need" Avenue de Scailmont 34 Skype: gbevin http://www.uwyn.com 7170 Manage, Belgium AIM: geertbevin gbevin at uwyn dot com Tel: +32 64 84 80 03 Mobile: +32 477 302 599 PGP Fingerprint : 4E21 6399 CD9E A384 6619 719A C8F4 D40D 309F D6A9 Public PGP key : available at servers pgp.mit.edu, wwwkeys.pgp.net ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] localized login template
Lars, Should the path 'l10n/authentication/login' point to my login template? No, to your resource bundle to be used by the template associated to the element. Pierre ___ Rife-users mailing list Rife-users@uwyn.com http://lists.uwyn.com/mailman/listinfo/rife-users
Re: [Rife-users] localized login template
The patch is not integrated yet, I hope to do so today. On 30-mrt-06, at 12:12, Lars Grupe wrote: Hi Pierre, Thanks for your answer. I'm not sure if the patch is in the nightly snapshots. I tested it with 'rife-1.4.1-snapshot-jdk15-20060329.jar' but it doesn't work. Should the path 'l10n/authentication/login' point to my login template? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Raoul Pierre Sent: 30 March 2006 11:42 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] localized login template Lars, With the patch I submitted yesterday to Geert about RIFE-258, it will only need to add l10n/authentication/login< /property> in Regards Pierre Hi Geert, Sorry I can't see how the 'Embedded element priorities' can solve this problem. In the config-base.xml the DEFAULT_RESOURCEBUNDLE is set: com.acrolinx.termmanagemen t.elements . localization.Resource That's working for all my templates except the login template. In my site file I have the following elements defined (among others): The administration.xml looks like: login/login admin derby common.xml: login.html: main.html: ... ... ... The will not be replaced by the string from the resourcebundle. There is no embedded element, or? Or where should I change the priority? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 30 March 2006 11:00 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] localized login template Yes, you can tailor to priority of embedded elements now: http://rifers.org/blogs/gbevin/2006/3/2/ rife_1_4_released#1_4_highlight04 On 30-mrt-06, at 10:53, Lars Grupe wrote: Hi Geert, Is this old problem from November now resolved too? Where can I find information about how L10N should be implemented now? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 25 November 2005 20:51 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] localized login template Hi Lars, hmmm, good point, there is no solution for that at the moment. This needs some thinking and I'd like to find a solution for it since it seems to be an important oversight. I don't have any real solutions in mind at the moment. If you think of something, shoot, I'll ponder about it too. Best regards, Geert On 25-nov-05, at 19:52, Lars Grupe wrote: Hi Geert. Ok, that's working now, many thx again. :) Now I think I have only one problem. I added some strings to the login template which should be localized. If I understand it correct the built-in element rife/authenticated/memory.xml is used to print the template that is given in the 'template_name' property. Is there a way to submit a path to the resource bundle and a name of a global variable where the locale should be taken from? Or do you know another solution for my problem? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 25 November 2005 15:03 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] Embedded elements submissions execution order Hi Lars, this will work if you make it a globalcookie. This also makes sense, since you generally would want the user's language preference to be remembered. Best regards, Geert On 25-nov-05, at 14:53, Lars Grupe wrote: Hi Geert, No, it's not a cookie it's a globalvar, that is defined in the site as follows: I think the problem is not depedent on the type of global var I use. I will show you an part of my log file: [DEBUG] [2005-11-25 14:36:25,187] [init] Home.processElement <-- main element [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageSelection.processElement <-- embedded element [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageChanged.processElement [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageSelection.processElement [DEBUG] [2005-11-25 14:36:25,234] [init] MainMenu.processElement Now the user selects a new language by clicking on a link the will start a submission of the embedded element. [DEBUG] [2005-11-25 14:36:28,750] [init] Home.processElement <-- main element [DEBUG] [2005-11-25 14:36:28,765] [init] Language selected <-- submission of embedded element [DEBUG] [2005-11-25 14:36:28,765] [init] LanguageChanged.processElement [DEBUG] [2005-11-25 14:36:28,765] [init] LanguageSelection.processElement [DEBUG] [2005-11-25 14:36:28,781] [init] MainMenu.processElement In the second main element
RE: [Rife-users] localized login template
Hi Pierre, Thanks for your answer. I'm not sure if the patch is in the nightly snapshots. I tested it with 'rife-1.4.1-snapshot-jdk15-20060329.jar' but it doesn't work. Should the path 'l10n/authentication/login' point to my login template? Cheers, Lars > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Raoul Pierre > Sent: 30 March 2006 11:42 > To: RIFE users list : questions, bug reports and suggestions. > Subject: Re: [Rife-users] localized login template > > > Lars, > > With the patch I submitted yesterday to Geert about RIFE-258, it will > only need to add > > name="L10N_REQUIRED_RESOURCEBUNDLE">l10n/authentication/login< > /property> > > in > > > > Regards > > Pierre > > > >Hi Geert, > > > >Sorry I can't see how the 'Embedded element priorities' can > solve this > >problem. > > > >In the config-base.xml the DEFAULT_RESOURCEBUNDLE is set: > > >name="L10N_DEFAULT_RESOURCEBUNDLE">com.acrolinx.termmanagemen > t.elements > >. > >localization.Resource > > > >That's working for all my templates except the login template. > > > >In my site file I have the following elements defined (among others): > > >inherits="AUTH_ADMIN"> > > > > > > > > > > >file="elements/authentication/administration.xml"/> > > > > > >The administration.xml looks like: > > > >login/login > >admin > > > > derby > > > > > > > >common.xml: > > > > > > > > > > > > > > > > > > > >login.html: > > > > > > > > > > > > > > > >main.html: > >... > > > > > > > >... > > > > > > > > > > > >... > > > >The will not be replaced by > >the string from the resourcebundle. > > > >There is no embedded element, or? Or where should I change the > >priority? > > > > > >Cheers, > >Lars > > > > > > > >>-Original Message- > >>From: [EMAIL PROTECTED] > >>[mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > >>Sent: 30 March 2006 11:00 > >>To: RIFE users list : questions, bug reports and suggestions. > >>Subject: Re: [Rife-users] localized login template > >> > >> > >>Yes, you can tailor to priority of embedded elements now: > >>http://rifers.org/blogs/gbevin/2006/3/2/ > >>rife_1_4_released#1_4_highlight04 > >> > >>On 30-mrt-06, at 10:53, Lars Grupe wrote: > >> > >> > >> > >>>Hi Geert, > >>> > >>>Is this old problem from November now resolved too? > >>>Where can I find information about how L10N should be > >>> > >>> > >>implemented now? > >> > >> > >>>Cheers, > >>>Lars > >>> > >>> > >>> > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > Sent: 25 November 2005 20:51 > To: RIFE users list : questions, bug reports and suggestions. > Subject: Re: [Rife-users] localized login template > > > Hi Lars, > > hmmm, good point, there is no solution for that at the moment. > > This needs some thinking and I'd like to find a solution > > > >>for it since > >> > >> > it seems to be an important oversight. I don't have any real > solutions in mind at the moment. If you think of > something, shoot, > I'll ponder about it too. > > Best regards, > > Geert > > On 25-nov-05, at 19:52, Lars Grupe wrote: > > > > >Hi Geert. > > > >Ok, that's working now, many thx again. :) > > > >Now I think I have only one problem. > >I added some strings to the login template which should be > > > > > localized. > > > >If I understand it correct the built-in element > >rife/authenticated/memory.xml is used to print the > > > > > >>template that is > >> > >> > >given in the 'template_name' property. Is there a way to > > > > > submit a path > > > >to the resource bundle and a name of a global variable where the > >locale should be taken from? > > > >Or do you know another solution for my problem? > > > >Cheers, > >Lars > > > > > > > >>-Original Message- > >>From: [EMAIL PROTECTED] > >>[mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > >>Sent: 25 November 2005 15:03 > >>To: RIFE users list : questions, bug reports and suggestions. > >>Subject: Re: [Rife-users] Embedded elements submissions > >> > >> > >>execution > >> > >> > >>order > >> > >> > >>Hi Lars, > >> > >>this will work if you make it a globalcookie. > >> > >>This also makes sense, since you generally would want the user's > >>language preference to be remembered. > >> > >>Best regards, > >> > >>Geert > >> > >>On 25-nov-05, at 14:53, Lars Grupe wrote: > >> > >> > >> >
Re: [Rife-users] localized login template
Lars, With the patch I submitted yesterday to Geert about RIFE-258, it will only need to add name="L10N_REQUIRED_RESOURCEBUNDLE">l10n/authentication/login in Regards Pierre Hi Geert, Sorry I can't see how the 'Embedded element priorities' can solve this problem. In the config-base.xml the DEFAULT_RESOURCEBUNDLE is set: com.acrolinx.termmanagement.elements. localization.Resource That's working for all my templates except the login template. In my site file I have the following elements defined (among others): file="elements/authentication/administration.xml"/> The administration.xml looks like: login/login admin derby common.xml: login.html: main.html: ... ... ... The will not be replaced by the string from the resourcebundle. There is no embedded element, or? Or where should I change the priority? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 30 March 2006 11:00 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] localized login template Yes, you can tailor to priority of embedded elements now: http://rifers.org/blogs/gbevin/2006/3/2/ rife_1_4_released#1_4_highlight04 On 30-mrt-06, at 10:53, Lars Grupe wrote: Hi Geert, Is this old problem from November now resolved too? Where can I find information about how L10N should be implemented now? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 25 November 2005 20:51 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] localized login template Hi Lars, hmmm, good point, there is no solution for that at the moment. This needs some thinking and I'd like to find a solution for it since it seems to be an important oversight. I don't have any real solutions in mind at the moment. If you think of something, shoot, I'll ponder about it too. Best regards, Geert On 25-nov-05, at 19:52, Lars Grupe wrote: Hi Geert. Ok, that's working now, many thx again. :) Now I think I have only one problem. I added some strings to the login template which should be localized. If I understand it correct the built-in element rife/authenticated/memory.xml is used to print the template that is given in the 'template_name' property. Is there a way to submit a path to the resource bundle and a name of a global variable where the locale should be taken from? Or do you know another solution for my problem? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 25 November 2005 15:03 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] Embedded elements submissions execution order Hi Lars, this will work if you make it a globalcookie. This also makes sense, since you generally would want the user's language preference to be remembered. Best regards, Geert On 25-nov-05, at 14:53, Lars Grupe wrote: Hi Geert, No, it's not a cookie it's a globalvar, that is defined in the site as follows: I think the problem is not depedent on the type of global var I use. I will show you an part of my log file: [DEBUG] [2005-11-25 14:36:25,187] [init] Home.processElement <-- main element [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageSelection.processElement <-- embedded element [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageChanged.processElement [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageSelection.processElement [DEBUG] [2005-11-25 14:36:25,234] [init] MainMenu.processElement Now the user selects a new language by clicking on a link the will start a submission of the embedded element. [DEBUG] [2005-11-25 14:36:28,750] [init] Home.processElement <-- main element [DEBUG] [2005-11-25 14:36:28,765] [init] Language selected <-- submission of embedded element [DEBUG] [2005-11-25 14:36:28,765] [init] LanguageChanged.processElement [DEBUG] [2005-11-25 14:36:28,765] [init] LanguageSelection.processElement [DEBUG] [2005-11-25 14:36:28,781] [init] MainMenu.processElement In the second main element line I would like to know to which language was selected in the embedded element. But the submission is called later, what I understand. But now the global variable has been changed but the page is displayed in the old lan
RE: [Rife-users] localized login template
Hi Geert, Sorry I can't see how the 'Embedded element priorities' can solve this problem. In the config-base.xml the DEFAULT_RESOURCEBUNDLE is set: com.acrolinx.termmanagement.elements. localization.Resource That's working for all my templates except the login template. In my site file I have the following elements defined (among others): The administration.xml looks like: login/login admin derby common.xml: login.html: main.html: ... ... ... The will not be replaced by the string from the resourcebundle. There is no embedded element, or? Or where should I change the priority? Cheers, Lars > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > Sent: 30 March 2006 11:00 > To: RIFE users list : questions, bug reports and suggestions. > Subject: Re: [Rife-users] localized login template > > > Yes, you can tailor to priority of embedded elements now: > http://rifers.org/blogs/gbevin/2006/3/2/ > rife_1_4_released#1_4_highlight04 > > On 30-mrt-06, at 10:53, Lars Grupe wrote: > > > Hi Geert, > > > > Is this old problem from November now resolved too? > > Where can I find information about how L10N should be > implemented now? > > > > Cheers, > > Lars > > > >> -Original Message- > >> From: [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > >> Sent: 25 November 2005 20:51 > >> To: RIFE users list : questions, bug reports and suggestions. > >> Subject: Re: [Rife-users] localized login template > >> > >> > >> Hi Lars, > >> > >> hmmm, good point, there is no solution for that at the moment. > >> > >> This needs some thinking and I'd like to find a solution > for it since > >> it seems to be an important oversight. I don't have any real > >> solutions in mind at the moment. If you think of something, shoot, > >> I'll ponder about it too. > >> > >> Best regards, > >> > >> Geert > >> > >> On 25-nov-05, at 19:52, Lars Grupe wrote: > >> > >>> Hi Geert. > >>> > >>> Ok, that's working now, many thx again. :) > >>> > >>> Now I think I have only one problem. > >>> I added some strings to the login template which should be > >> localized. > >>> If I understand it correct the built-in element > >>> rife/authenticated/memory.xml is used to print the > template that is > >>> given in the 'template_name' property. Is there a way to > >> submit a path > >>> to the resource bundle and a name of a global variable where the > >>> locale should be taken from? > >>> > >>> Or do you know another solution for my problem? > >>> > >>> Cheers, > >>> Lars > >>> > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > Sent: 25 November 2005 15:03 > To: RIFE users list : questions, bug reports and suggestions. > Subject: Re: [Rife-users] Embedded elements submissions > execution > order > > > Hi Lars, > > this will work if you make it a globalcookie. > > This also makes sense, since you generally would want the user's > language preference to be remembered. > > Best regards, > > Geert > > On 25-nov-05, at 14:53, Lars Grupe wrote: > > > Hi Geert, > > > > No, it's not a cookie it's a globalvar, that is defined in > the site as > > follows: > > > > > > I think the problem is not depedent on the type of global > >> var I use. > > > > I will show you an part of my log file: > > > > [DEBUG] [2005-11-25 14:36:25,187] [init] Home.processElement > > <-- main element > > [DEBUG] [2005-11-25 14:36:25,234] [init] > > LanguageSelection.processElement <-- embedded element [DEBUG] > > [2005-11-25 14:36:25,234] [init] LanguageChanged.processElement > > [DEBUG] [2005-11-25 14:36:25,234] [init] > > LanguageSelection.processElement [DEBUG] [2005-11-25 > 14:36:25,234] > > [init] MainMenu.processElement > > > > Now the user selects a new language by clicking on a link > >> the will > > start a submission of the embedded element. > > > > [DEBUG] [2005-11-25 14:36:28,750] [init] Home.processElement > > <-- main element > > [DEBUG] [2005-11-25 14:36:28,765] [init] Language selected > > <-- submission of embedded element > > [DEBUG] [2005-11-25 14:36:28,765] [init] > > LanguageChanged.processElement [DEBUG] [2005-11-25 > 14:36:28,765] > > [init] LanguageSelection.processElement [DEBUG] [2005-11-25 > > 14:36:28,781] [init] MainMenu.processElement > > > > In the second main element line I would like to know to > which language > > was selected in the embedded element. But the submission > >> is called > > later,
Re: [Rife-users] localized login template
Yes, you can tailor to priority of embedded elements now: http://rifers.org/blogs/gbevin/2006/3/2/ rife_1_4_released#1_4_highlight04 On 30-mrt-06, at 10:53, Lars Grupe wrote: Hi Geert, Is this old problem from November now resolved too? Where can I find information about how L10N should be implemented now? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 25 November 2005 20:51 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] localized login template Hi Lars, hmmm, good point, there is no solution for that at the moment. This needs some thinking and I'd like to find a solution for it since it seems to be an important oversight. I don't have any real solutions in mind at the moment. If you think of something, shoot, I'll ponder about it too. Best regards, Geert On 25-nov-05, at 19:52, Lars Grupe wrote: Hi Geert. Ok, that's working now, many thx again. :) Now I think I have only one problem. I added some strings to the login template which should be localized. If I understand it correct the built-in element rife/authenticated/memory.xml is used to print the template that is given in the 'template_name' property. Is there a way to submit a path to the resource bundle and a name of a global variable where the locale should be taken from? Or do you know another solution for my problem? Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 25 November 2005 15:03 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] Embedded elements submissions execution order Hi Lars, this will work if you make it a globalcookie. This also makes sense, since you generally would want the user's language preference to be remembered. Best regards, Geert On 25-nov-05, at 14:53, Lars Grupe wrote: Hi Geert, No, it's not a cookie it's a globalvar, that is defined in the site as follows: I think the problem is not depedent on the type of global var I use. I will show you an part of my log file: [DEBUG] [2005-11-25 14:36:25,187] [init] Home.processElement <-- main element [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageSelection.processElement <-- embedded element [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageChanged.processElement [DEBUG] [2005-11-25 14:36:25,234] [init] LanguageSelection.processElement [DEBUG] [2005-11-25 14:36:25,234] [init] MainMenu.processElement Now the user selects a new language by clicking on a link the will start a submission of the embedded element. [DEBUG] [2005-11-25 14:36:28,750] [init] Home.processElement <-- main element [DEBUG] [2005-11-25 14:36:28,765] [init] Language selected <-- submission of embedded element [DEBUG] [2005-11-25 14:36:28,765] [init] LanguageChanged.processElement [DEBUG] [2005-11-25 14:36:28,765] [init] LanguageSelection.processElement [DEBUG] [2005-11-25 14:36:28,781] [init] MainMenu.processElement In the second main element line I would like to know to which language was selected in the embedded element. But the submission is called later, what I understand. But now the global variable has been changed but the page is displayed in the old language. Another click will change the language on the page. So that is not what I would like to have: E.g.: On an English page you click on 'German' and the page is shown again in 'English', if you choose another link, than the language of the page will be 'German'. So my problem is, if I could manage that with a embedded element? I would like to prevent from writing a changeLanguage submission for each element. Cheers, Lars -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin Sent: 25 November 2005 13:06 To: RIFE users list : questions, bug reports and suggestions. Subject: Re: [Rife-users] Embedded elements submissions execution order Hi Lars, I don't mind answering your questions ;-) Embedded elements are only processed once you obtain an instance of the template in which they are embedded. What global variable are you changing, a cookie? Geert On 25-nov-05, at 13:01, Lars Grupe wrote: Hi Geert, I'm sorry to bother you with my questions. I have an embedded elements, that show some links on my page. For better understanding: Follow a link should change the language of the site. If a link is followed than the called submission changes a global variable. My problem is that the submission of the embedded element is called after the processElement function of my main element. Should the submission of the embedded element force a reload of the page? And how can I do this? Or is there another option to execute the submission of the embedded element before the processElement function of the main element is called? Cheers, Lars ___ Rife-users maili
RE: [Rife-users] localized login template
Hi Geert, Is this old problem from November now resolved too? Where can I find information about how L10N should be implemented now? Cheers, Lars > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > Sent: 25 November 2005 20:51 > To: RIFE users list : questions, bug reports and suggestions. > Subject: Re: [Rife-users] localized login template > > > Hi Lars, > > hmmm, good point, there is no solution for that at the moment. > > This needs some thinking and I'd like to find a solution for > it since > it seems to be an important oversight. I don't have any real > solutions in mind at the moment. If you think of something, shoot, > I'll ponder about it too. > > Best regards, > > Geert > > On 25-nov-05, at 19:52, Lars Grupe wrote: > > > Hi Geert. > > > > Ok, that's working now, many thx again. :) > > > > Now I think I have only one problem. > > I added some strings to the login template which should be > localized. > > If I understand it correct the built-in element > > rife/authenticated/memory.xml is used to print the template that is > > given in the 'template_name' property. Is there a way to > submit a path > > to the resource bundle and a name of a global variable where the > > locale > > should be taken from? > > > > Or do you know another solution for my problem? > > > > Cheers, > > Lars > > > >> -Original Message- > >> From: [EMAIL PROTECTED] > >> [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > >> Sent: 25 November 2005 15:03 > >> To: RIFE users list : questions, bug reports and suggestions. > >> Subject: Re: [Rife-users] Embedded elements submissions execution > >> order > >> > >> > >> Hi Lars, > >> > >> this will work if you make it a globalcookie. > >> > >> This also makes sense, since you generally would want the user's > >> language preference to be remembered. > >> > >> Best regards, > >> > >> Geert > >> > >> On 25-nov-05, at 14:53, Lars Grupe wrote: > >> > >>> Hi Geert, > >>> > >>> No, it's not a cookie it's a globalvar, that is defined in > >> the site as > >>> follows: > >>> > >>> > >>> I think the problem is not depedent on the type of global > var I use. > >>> > >>> I will show you an part of my log file: > >>> > >>> [DEBUG] [2005-11-25 14:36:25,187] [init] Home.processElement > >>> <-- main element > >>> [DEBUG] [2005-11-25 14:36:25,234] [init] > >>> LanguageSelection.processElement <-- embedded element [DEBUG] > >>> [2005-11-25 14:36:25,234] [init] LanguageChanged.processElement > >>> [DEBUG] [2005-11-25 14:36:25,234] [init] > >>> LanguageSelection.processElement > >>> [DEBUG] [2005-11-25 14:36:25,234] [init] MainMenu.processElement > >>> > >>> Now the user selects a new language by clicking on a link > the will > >>> start a submission of the embedded element. > >>> > >>> [DEBUG] [2005-11-25 14:36:28,750] [init] Home.processElement > >>> <-- main element > >>> [DEBUG] [2005-11-25 14:36:28,765] [init] Language selected > >>> <-- submission of embedded element > >>> [DEBUG] [2005-11-25 14:36:28,765] [init] > >>> LanguageChanged.processElement [DEBUG] [2005-11-25 14:36:28,765] > >>> [init] LanguageSelection.processElement > >>> [DEBUG] [2005-11-25 14:36:28,781] [init] MainMenu.processElement > >>> > >>> In the second main element line I would like to know to > >> which language > >>> was selected in the embedded element. But the submission > is called > >>> later, what I understand. But now the global variable has > >> been changed > >>> but the page is displayed in the old language. Another click will > >>> change the language on the page. So that is not what I > would like to > >>> have: > >>> E.g.: On an English page you click on 'German' and the > page is shown > >>> again in 'English', if you choose another link, than the > language of > >>> the page will be 'German'. > >>> > >>> So my problem is, if I could manage that with a embedded > element? I > >>> would like to prevent from writing a changeLanguage > submission for > >>> each element. > >>> > >>> Cheers, > >>> Lars > >>> > >>> > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Geert Bevin > Sent: 25 November 2005 13:06 > To: RIFE users list : questions, bug reports and suggestions. > Subject: Re: [Rife-users] Embedded elements submissions > execution > order > > > Hi Lars, > > I don't mind answering your questions ;-) > > Embedded elements are only processed once you obtain an > >> instance of > the template in which they are embedded. > > What global variable are you changing, a cookie? > > Geert > > On 25-nov-05, at 13:01, Lars Grupe wrote: > > > Hi Geert, > > > > I'm sorry to bother you with my questions. > > > > I have an embedded elements, that show some links on my > page. For > > better understanding: Follow a link should