Re: [i18n] Entry qualifier
So I ended up configuring EMMA with Ant. The coverage of the test cases I have written so far (all classes except XMLMessageProvider) is now 100%. (While setting up EMMA with Ant, I ran into the ClassNotFoundError again, and remembered this occurs when the EMMA instrumentation does not take interfaces - which are not instrumented - into account. So I assume the EMMA maven plugin needs to be reconfigured somehow. However that is done...) At 2005-04-21 07:10, you wrote: At 2005-04-20 23:05, you wrote: There were server errors earlier today. Did you ever get this to run? Nope. Tried Maven + Emma too, without luck. It either produced coverage data OR an empty report; never used the data to create a report. I should probably read up on how Maven works (or simply add Emma to Ant), but I would prefer to spend my time on the code rather than the setup. Mattias Jiderhamn At 2005-04-20 09:47, Mattias J wrote: B.t.w James: Thought I'd run your new Maven config to see the coverage of the tests I've added. Though I have not checked out .../commons-build/sandbox-project.xml and currently I cannot access the SVN server. Sorry if this is because I'm a newbie with Maven, but I am not able to get this to work. I have downloaded the commons-build SVN-files and can build and test with Maven. But if i run maven jcoverage all the tests fail, most with java.lang.NoClassDefFoundError, assumably because either the instrumented classes or some jcoverage libraries are not on the classpath. What do I need to do to my environment to get this working? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 19.04.05 21:34:01: LocalizedExceptionExample (and subsequent property files) look like good candidates for src/test. Also, someone might want to commit the missing files that make this class work/load properly. I seem to be missing some property files (that are used internally). I'll have a look at this next week (when I'm back home). Did i miss to check in some files? Shame on me... What's the status of this project? I recall some discussion a while back about i18n, but don't remember the specifics? Are there any design or architecture docs available? This component is so tiny that the javadoc should be pretty self explaining. But I agree that we might need to add some more documentation (tutorials). Seems like i18n is reinventing the wheel over and over. I see we are using of Sax, when Digester is the most viable choice, given the typical clients of this framework. I see where ResourceBundle is used, yet a much more robust solution is already provided through Commons Resources. Any chance we can change this to use the above frameworks? My primary goal was to keep this component simple. It has no dependencies to other jars and that is a big plug for the daily use. Remember my thread about the missing ability in the java world to deal with different versions of the same class. So using digester/resources could cause a lot of trouble to bigger projects using a different version of these components. I know that we have some overlapping with Commons Resources, but the I18n is dealing with bundles of messages and introduces LocalizedExceptions using these bundles. As I needed this already in different projects seriously dealing with internationalization, personally I still think this component is reasonable. Cheers, Daniel -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Daniel Florey [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 10:34 AM Subject: Re: [i18n] Entry qualifier Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 19.04.05 16:05:57: I'm wrapping up development of a new Struts plug-in that integrates CommonsResources and is backward compatible with Struts 1.1. After that I can throw some time your way. I'm getting pretty good with Maven and JUnit stuff is always a valued resource. If you guys are not already doing so, adding a JCoverage report (which is trivial if using Maven) is one of the best ways ensure code completeness, efficiency, and guarantees your changes won't break anything. Eventually, I'll be adding an i18n plug-in and sample app for Struts that demonstrates a best practices for using i18n in a Struts-based app. I could use some help with that if any of you want to return the favor ;) This is great news! If I find some time I'd like to assist you. It would be a great benefit to have the capability of LocalizedException and all of this in Struts. Cheers, Daniel By the way, thanks for all the hard work! -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Mattias J [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 9:22 AM Subject: Re: [i18n] Entry qualifier What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. At 2005-04-19 15:13, you wrote: If I can help ... I still alive Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Date: Tue, 19 Apr 2005 13:34:41 +0200 ''From: Daniel Florey [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Subject: Re: [i18n] Entry qualifier '' '' I have created unit tests for MessageManager and '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' Should I post them to the list? '' Would you like them in a ZIP archive Daniel? '' ''I'm back home next week, so if you would pass them to me in a ZIP this would
RE: [i18n] Entry qualifier
Hi Daniel, Daniel Florey wrote on Wednesday, April 20, 2005 9:24 AM: [snip] My primary goal was to keep this component simple. It has no dependencies to other jars and that is a big plug for the daily use. +1 This was the main reason I chose i18n. No deps, no new problems. Remember my thread about the missing ability in the java world to deal with different versions of the same class. So using digester/resources could cause a lot of trouble to bigger projects using a different version of these components. I know that we have some overlapping with Commons Resources, but the I18n is dealing with bundles of messages and introduces LocalizedExceptions using these bundles. As I needed this already in different projects seriously dealing with internationalization, personally I still think this component is reasonable. I really liked this light-weight approach. I had a need of localized MBeanInfo (see contribution) and with i18n's concept, I was able to write also just a little Bundle impl, that is based on some conventions for the provided resources. BTW: Just because I did not mension this in Bugzilla - the contribution does not have external deps either. Onle the javadoc has a link to MBeanInfo, the code does use no JMX fucntionality at all. Regards, Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
At 2005-04-20 09:23, you wrote: Seems like i18n is reinventing the wheel over and over. I see we are using of Sax, when Digester is the most viable choice, given the typical clients of this framework. I see where ResourceBundle is used, yet a much more robust solution is already provided through Commons Resources. Any chance we can change this to use the above frameworks? My primary goal was to keep this component simple. It has no dependencies to other jars and that is a big plug for the daily use. +1 Even though I am quite fond of Digester, I also see the benefits of zero runtime dependencies. I suggest sticking with pure SAX. I know that we have some overlapping with Commons Resources, but the I18n is dealing with bundles of messages and introduces LocalizedExceptions using these bundles. The way i18n bundles several submessages under a common key is what makes it so great. I hope to be able to add a DatabaseMessageProvider, which gets different messages (title, details etc) from different columns in the database table. Hopefully the benefits will be even more clear then. B.t.w James: Thought I'd run your new Maven config to see the coverage of the tests I've added. Though I have not checked out ../commons-build/sandbox-project.xml and currently I cannot access the SVN server. Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 20.04.05 09:38:37: Hi Daniel, Daniel Florey wrote on Wednesday, April 20, 2005 9:24 AM: [snip] My primary goal was to keep this component simple. It has no dependencies to other jars and that is a big plug for the daily use. +1 This was the main reason I chose i18n. No deps, no new problems. Remember my thread about the missing ability in the java world to deal with different versions of the same class. So using digester/resources could cause a lot of trouble to bigger projects using a different version of these components. I know that we have some overlapping with Commons Resources, but the I18n is dealing with bundles of messages and introduces LocalizedExceptions using these bundles. As I needed this already in different projects seriously dealing with internationalization, personally I still think this component is reasonable. I really liked this light-weight approach. I had a need of localized MBeanInfo (see contribution) and with i18n's concept, I was able to write also just a little Bundle impl, that is based on some conventions for the provided resources. BTW: Just because I did not mension this in Bugzilla - the contribution does not have external deps either. Onle the javadoc has a link to MBeanInfo, the code does use no JMX fucntionality at all. Regards, Jörg Hi Joerg (sorry - keine Umlaute hier in Jordanien...), thanks for your contribution! I'll take a look at it next week. Do you have commit access in the sandbox? Cheers, Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 20.04.05 09:38:37: Hi Daniel, Daniel Florey wrote on Wednesday, April 20, 2005 9:24 AM: [snip] My primary goal was to keep this component simple. It has no dependencies to other jars and that is a big plug for the daily use. +1 This was the main reason I chose i18n. No deps, no new problems. Remember my thread about the missing ability in the java world to deal with different versions of the same class. So using digester/resources could cause a lot of trouble to bigger projects using a different version of these components. I know that we have some overlapping with Commons Resources, but the I18n is dealing with bundles of messages and introduces LocalizedExceptions using these bundles. As I needed this already in different projects seriously dealing with internationalization, personally I still think this component is reasonable. I really liked this light-weight approach. I had a need of localized MBeanInfo (see contribution) and with i18n's concept, I was able to write also just a little Bundle impl, that is based on some conventions for the provided resources. This looks really usefull to me. Shall we add an i18n-contrib.jar that contains all the optional extensions? I'd like to keep the core i18n.jar as small as possible... Cheers, Daniel BTW: Just because I did not mension this in Bugzilla - the contribution does not have external deps either. Onle the javadoc has a link to MBeanInfo, the code does use no JMX fucntionality at all. Regards, Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [i18n] Entry qualifier
Hi Daniel, Daniel Florey wrote on Wednesday, April 20, 2005 10:14 AM: Hi Joerg (sorry - keine Umlaute hier in Jordanien...), Does not really matter, most people use o instead of oe as replacement anyway :) thanks for your contribution! I'll take a look at it next week. Do you have commit access in the sandbox? Sorry, no. - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [i18n] Entry qualifier
Hi Daniel, I really liked this light-weight approach. I had a need of localized MBeanInfo (see contribution) and with i18n's concept, I was able to write also just a little Bundle impl, that is based on some conventions for the provided resources. This looks really usefull to me. Shall we add an i18n-contrib.jar that contains all the optional extensions? I'd like to keep the core i18n.jar as small as possible... Then you'll need some definition for this. IMHO MBeanInfoDescriptionBundle is as light as the rest without any deps and this does normally qualify an inclusion into the core. Another beast is the proposed DatabaseMessageProvider of Mattias. If it uses external deps it is qualified for a separate contrib package ... but just my 2c. - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [i18n] Entry qualifier
At 2005-04-20 12:06, you wrote: Shall we add an i18n-contrib.jar that contains all the optional extensions? I'd like to keep the core i18n.jar as small as possible... Then you'll need some definition for this. IMHO MBeanInfoDescriptionBundle is as light as the rest without any deps and this does normally qualify an inclusion into the core. I agree. Current jar is only 16k. Even twice the size should be small enough for most people. Another beast is the proposed DatabaseMessageProvider of Mattias. If it uses external deps it is qualified for a separate contrib package ... but just my 2c. I intend to avoid external dependencies by using pure java.sql.* with the option of javax.sql.DataSource. Though the test cases will certainly have other dependencies. Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [i18n] Entry qualifier
Hi Mattias, Mattias J wrote on Wednesday, April 20, 2005 12:18 PM: Another beast is the proposed DatabaseMessageProvider of Mattias. If it uses external deps it is qualified for a separate contrib package ... but just my 2c. I intend to avoid external dependencies by using pure java.sql.* with the option of javax.sql.DataSource. Though the test cases will certainly have other dependencies. +1 I hoped so :) - Jörg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Seems like i18n is reinventing the wheel over and over. I see we are using of Sax, when Digester is the most viable choice, given the typical clients of this framework. I see where ResourceBundle is used, yet a much more robust solution is already provided through Commons Resources. Any chance we can change this to use the above frameworks? My primary goal was to keep this component simple. It has no dependencies to other jars and that is a big plug for the daily use. Remember my thread about the missing ability in the java world to deal with different versions of the same class. So using digester/resources could cause a lot of trouble to bigger projects using a different version of these components. I know that we have some overlapping with Commons Resources, but the I18n is dealing with bundles of messages and introduces LocalizedExceptions using these bundles. As I needed this already in different projects seriously dealing with internationalization, personally I still think this component is reasonable. Cheers, Daniel I'm sorry that you feel that way. I disagree, but not enough to discuss it any further. I know this is your (your == you guys) baby, and I'm not looking to rock the boat. So, I'll put this effort on the back burner for now. Not that I'm disinterested, I've just got tons of other items on my hot-list that are begging for me to work on. Thanks again. -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
At 2005-04-20 09:47, Mattias J wrote: B.t.w James: Thought I'd run your new Maven config to see the coverage of the tests I've added. Though I have not checked out .../commons-build/sandbox-project.xml and currently I cannot access the SVN server. Sorry if this is because I'm a newbie with Maven, but I am not able to get this to work. I have downloaded the commons-build SVN-files and can build and test with Maven. But if i run maven jcoverage all the tests fail, most with java.lang.NoClassDefFoundError, assumably because either the instrumented classes or some jcoverage libraries are not on the classpath. What do I need to do to my environment to get this working? Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
There were server errors earlier today. Did you ever get this to run? -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Mattias J [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org; Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Wednesday, April 20, 2005 3:49 PM Subject: Re: [i18n] Entry qualifier At 2005-04-20 09:47, Mattias J wrote: B.t.w James: Thought I'd run your new Maven config to see the coverage of the tests I've added. Though I have not checked out .../commons-build/sandbox-project.xml and currently I cannot access the SVN server. Sorry if this is because I'm a newbie with Maven, but I am not able to get this to work. I have downloaded the commons-build SVN-files and can build and test with Maven. But if i run maven jcoverage all the tests fail, most with java.lang.NoClassDefFoundError, assumably because either the instrumented classes or some jcoverage libraries are not on the classpath. What do I need to do to my environment to get this working? Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
At 2005-04-20 21:49, you wrote: Seems like i18n is reinventing the wheel over and over. I see we are using of Sax, when Digester is the most viable choice, given the typical clients of this framework. I see where ResourceBundle is used, yet a much more robust solution is already provided through Commons Resources. Any chance we can change this to use the above frameworks? My primary goal was to keep this component simple. It has no dependencies to other jars and that is a big plug for the daily use. Remember my thread about the missing ability in the java world to deal with different versions of the same class. So using digester/resources could cause a lot of trouble to bigger projects using a different version of these components. I know that we have some overlapping with Commons Resources, but the I18n is dealing with bundles of messages and introduces LocalizedExceptions using these bundles. As I needed this already in different projects seriously dealing with internationalization, personally I still think this component is reasonable. I'm sorry that you feel that way. I disagree, but not enough to discuss it any further. I know this is your (your == you guys) baby, and I'm not looking to rock the boat. So, I'll put this effort on the back burner for now. Not that I'm disinterested, I've just got tons of other items on my hot-list that are begging for me to work on. Or... MessageProviders depending with external dependencies such as Digester and Commons Resources could get into the before mentioned i18n-contrib.jar...? Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
At 2005-04-20 23:05, you wrote: There were server errors earlier today. Did you ever get this to run? Nope. Tried Maven + Emma too, without luck. It either produced coverage data OR an empty report; never used the data to create a report. I should probably read up on how Maven works (or simply add Emma to Ant), but I would prefer to spend my time on the code rather than the setup. Mattias Jiderhamn At 2005-04-20 09:47, Mattias J wrote: B.t.w James: Thought I'd run your new Maven config to see the coverage of the tests I've added. Though I have not checked out .../commons-build/sandbox-project.xml and currently I cannot access the SVN server. Sorry if this is because I'm a newbie with Maven, but I am not able to get this to work. I have downloaded the commons-build SVN-files and can build and test with Maven. But if i run maven jcoverage all the tests fail, most with java.lang.NoClassDefFoundError, assumably because either the instrumented classes or some jcoverage libraries are not on the classpath. What do I need to do to my environment to get this working? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 18.04.05 20:08:29: Will Ant be abandoned in favor of Maven or should I update the Ant script to include the unit tests? (I have no experience with Maven) We should keep both (ant/maven) working. There is a maven task that will automatically generate an ant script, but I've never used it. Maven is a great tool as it can also handle website generation, test reports, changelog etc. So it's worth to have a look at it! What indentation do you use for XML? I find both tabs and 2 spaces, even in the same file. (There is also a tab on line 80 in LocalizedBundle.java) Uuups, this should be fixed. What do you prefer for indenting xml files? I have set up the environment and started working on some unit tests. I think one of them caught a bug in MessageHandler. My guess is try { String text = getText(id, entry, arguments, locale); return MessageFormat.format(text, arguments); } catch (MessageNotFoundException e) { return defaultText; } should read try { return getText(id, entry, arguments, locale); } catch (MessageNotFoundException e) { return MessageFormat.format(defaultText, arguments); } right? Right again, you are the man! Keep on your great work, I look forward to incorporate your changes. Daniel (B.t.w. is there a tutorial on creating SVN patches somewhere?) Mattias Jiderhamn At 2005-04-18 13:24, Daniel Florey wrote: Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 18.04.05 11:29:38: At 2005-04-18 11:11, Daniel Florey wrote: My though was to re-use the basename or id used when installing ResourceBundle or XML providers. For example, after issuing ResourceBundleMessageProvider.install(errorMessages); I would like to be able to qualify the newly installed messages with MessageBundle msg = new MessageBundle(errorMessages, unexpectedError); but also keep the existing alternative with MessageBundle msg = new MessageBundle(unexpectedError); // unexpectedError from any source Do you want this to be able to install different resources with the same message key or is it mainly because of implementation details (performance)? Primarily multiple entries with same key, secondarily performance. This may seem like a minor change at a first glance, but to also improve performance my thought was to to change the MessageManager class from holding a list of provider instances - which in turn can contain multiple resources (and thus assumes one instance per provider class) - to holding a Map from basename/id/namespace/qualifier to provider instance, where each instance only contains a single resource (i.e. XML-file/ResourceBundle). Though I planned on backwards compatibilty, by looping over the Map values - instead of the List entries - in the current MessageManager.getText() method. (Did I make myself clear?) I try my best to get your point... At the moment there is only one MessageProvider holding many resources. You want to change this to many MessageProviders holding one resource each in order to improve performance? Yes. Instead of having to loop through the providers - catching exceptions from those who do not contain the entry, which is quite costly performance wise - and get the first match, I want to be able to point out the source which I expect to hold the entry. But then again, todays behaviour should be kept as the default behaviour when not using a basename/namespace qualification. I currently don't have access to the sources as I'm on a project in Jordan (You can browse them online, http://jakarta.apache.org/commons/sandbox/i18n/xref/index.html is quite easy to navigate) but as soon as I'm back home I'll try to have a closer look at this. Should I try to create a patch suggestion which you could look at then? Yes, this would be great! It would be very (very) appreciated, if you could provide some testcases... I started to write some a while ago, but never managed to complete them. If we would have a complete testsuite we could refactor without the fear to break something ;-) If we get the testsuite done and improve the documentation, we hopefully can move the component to commons proper soon... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
Re: [i18n] Entry qualifier
At 2005-04-19 10:35, Daniel Florey wrote: We should keep both (ant/maven) working. There is a maven task that will automatically generate an ant script, but I've never used it. Maven is a great tool as it can also handle website generation, test reports, changelog etc. So it's worth to have a look at it! I probably should, some day, but right now I want to focus on the tests and changes so I'll stick with Ant meanwhile. What indentation do you use for XML? I find both tabs and 2 spaces, even in the same file. (There is also a tab on line 80 in LocalizedBundle.java) Uuups, this should be fixed. What do you prefer for indenting xml files? I prefer spaces. Personally I use 2 spaces to save up on columns/width. Keep on your great work, I look forward to incorporate your changes. I have created unit tests for MessageManager and LocalizedBundle/-Error/-Exception/-RuntimeException. Should I post them to the list? Would you like them in a ZIP archive Daniel? Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 19.04.05 11:27:33: At 2005-04-19 10:35, Daniel Florey wrote: We should keep both (ant/maven) working. There is a maven task that will automatically generate an ant script, but I've never used it. Maven is a great tool as it can also handle website generation, test reports, changelog etc. So it's worth to have a look at it! I probably should, some day, but right now I want to focus on the tests and changes so I'll stick with Ant meanwhile. What indentation do you use for XML? I find both tabs and 2 spaces, even in the same file. (There is also a tab on line 80 in LocalizedBundle.java) Uuups, this should be fixed. What do you prefer for indenting xml files? I prefer spaces. Personally I use 2 spaces to save up on columns/width. Keep on your great work, I look forward to incorporate your changes. I have created unit tests for MessageManager and LocalizedBundle/-Error/-Exception/-RuntimeException. Should I post them to the list? Would you like them in a ZIP archive Daniel? I'm back home next week, so if you would pass them to me in a ZIP this would be the easiest way yo go. Thanks Daniel Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
If I can help ... I still alive Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Date: Tue, 19 Apr 2005 13:34:41 +0200 ''From: Daniel Florey [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Subject: Re: [i18n] Entry qualifier '' '' ''Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb ''am 19.04.05 11:27:33: '' '' At 2005-04-19 10:35, Daniel Florey wrote: '' We should keep both (ant/maven) working. There is a maven task that will '' '' automatically generate an ant script, but I've never used it. '' Maven is a great tool as it can also handle website generation, test '' reports, changelog etc. So it's worth to have a look at it! '' '' I probably should, some day, but right now I want to focus on the tests ''and '' changes so I'll stick with Ant meanwhile. '' '' What indentation do you use for XML? I find both tabs and 2 spaces, '' '' even in '' the same file. (There is also a tab on line 80 in LocalizedBundle.java) '' '' Uuups, this should be fixed. What do you prefer for indenting xml files? '' '' I prefer spaces. Personally I use 2 spaces to save up on columns/width. '' '' Keep on your great work, I look forward to incorporate your changes. '' '' I have created unit tests for MessageManager and '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' Should I post them to the list? '' Would you like them in a ZIP archive Daniel? '' ''I'm back home next week, so if you would pass them to me in a ZIP this would ''be the easiest way yo go. ''Thanks ''Daniel '' '' ''Mattias Jiderhamn '' '' '' - '' To unsubscribe, e-mail: [EMAIL PROTECTED] '' For additional commands, e-mail: [EMAIL PROTECTED] '' '' '' ''__ ''Verschicken Sie romantische, coole und witzige Bilder per SMS! ''Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 '' '' ''- ''To unsubscribe, e-mail: [EMAIL PROTECTED] ''For additional commands, e-mail: [EMAIL PROTECTED] '' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. At 2005-04-19 15:13, you wrote: If I can help ... I still alive Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Date: Tue, 19 Apr 2005 13:34:41 +0200 ''From: Daniel Florey [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Subject: Re: [i18n] Entry qualifier '' '' I have created unit tests for MessageManager and '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' Should I post them to the list? '' Would you like them in a ZIP archive Daniel? '' ''I'm back home next week, so if you would pass them to me in a ZIP this would ''be the easiest way yo go. ''Thanks ''Daniel '' '' ''Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Hi Mattias, the owner of this project is Daniel. I only try to contribute. I do some suggestions to changes 3 or 4 months ago: some in object relationship, in code, in xml format and in error but Daniel not seens to like (or understand me, I dono, my english is not good enogh to try to explain all). Well, the final product of this try is a particular version of i18n (out of jakarta, to solve my problem). I'm in same situation as you: trying to help ... Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Date: Tue, 19 Apr 2005 15:22:34 +0200 ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''From: Mattias J [EMAIL PROTECTED] ''Subject: Re: [i18n] Entry qualifier '' '' ''What I currently need is better unit tests in ''ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. ''After those are set up, I will begin some refactoring. If you would like ''to ''help out on those unit tests it would be great. '' ''Please inform me if you get your hands at it, and which one you start with, '' ''so I don't do the same thing. ''Also please e-mail them to me if you are done before Daniel is back and ''able to check it in. '' ''At 2005-04-19 15:13, you wrote: ''If I can help ... '' ''I still alive '' ''Woody '' '' '' ''-- Mensagem Original -- '' ''Reply-To: Jakarta Commons Developers List '' commons-dev@jakarta.apache.org '' ''Date: Tue, 19 Apr 2005 13:34:41 +0200 '' ''From: Daniel Florey [EMAIL PROTECTED] '' ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org '' ''Subject: Re: [i18n] Entry qualifier '' '' '' '' I have created unit tests for MessageManager and '' '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' '' Should I post them to the list? '' '' Would you like them in a ZIP archive Daniel? '' '' '' ''I'm back home next week, so if you would pass them to me in a ZIP this ''would '' ''be the easiest way yo go. '' ''Thanks '' ''Daniel '' '' '' '' '' ''Mattias Jiderhamn '' '' ''- ''To unsubscribe, e-mail: [EMAIL PROTECTED] ''For additional commands, e-mail: [EMAIL PROTECTED] '' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
I'm wrapping up development of a new Struts plug-in that integrates CommonsResources and is backward compatible with Struts 1.1. After that I can throw some time your way. I'm getting pretty good with Maven and JUnit stuff is always a valued resource. If you guys are not already doing so, adding a JCoverage report (which is trivial if using Maven) is one of the best ways ensure code completeness, efficiency, and guarantees your changes won't break anything. Eventually, I'll be adding an i18n plug-in and sample app for Struts that demonstrates a best practices for using i18n in a Struts-based app. I could use some help with that if any of you want to return the favor ;) By the way, thanks for all the hard work! -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Mattias J [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 9:22 AM Subject: Re: [i18n] Entry qualifier What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. At 2005-04-19 15:13, you wrote: If I can help ... I still alive Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Date: Tue, 19 Apr 2005 13:34:41 +0200 ''From: Daniel Florey [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Subject: Re: [i18n] Entry qualifier '' '' I have created unit tests for MessageManager and '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' Should I post them to the list? '' Would you like them in a ZIP archive Daniel? '' ''I'm back home next week, so if you would pass them to me in a ZIP this would ''be the easiest way yo go. ''Thanks ''Daniel '' '' ''Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 19.04.05 16:05:57: I'm wrapping up development of a new Struts plug-in that integrates CommonsResources and is backward compatible with Struts 1.1. After that I can throw some time your way. I'm getting pretty good with Maven and JUnit stuff is always a valued resource. If you guys are not already doing so, adding a JCoverage report (which is trivial if using Maven) is one of the best ways ensure code completeness, efficiency, and guarantees your changes won't break anything. Eventually, I'll be adding an i18n plug-in and sample app for Struts that demonstrates a best practices for using i18n in a Struts-based app. I could use some help with that if any of you want to return the favor ;) This is great news! If I find some time I'd like to assist you. It would be a great benefit to have the capability of LocalizedException and all of this in Struts. Cheers, Daniel By the way, thanks for all the hard work! -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Mattias J [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 9:22 AM Subject: Re: [i18n] Entry qualifier What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. At 2005-04-19 15:13, you wrote: If I can help ... I still alive Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Date: Tue, 19 Apr 2005 13:34:41 +0200 ''From: Daniel Florey [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Subject: Re: [i18n] Entry qualifier '' '' I have created unit tests for MessageManager and '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' Should I post them to the list? '' Would you like them in a ZIP archive Daniel? '' ''I'm back home next week, so if you would pass them to me in a ZIP this would ''be the easiest way yo go. ''Thanks ''Daniel '' '' ''Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
I have now added more tests to ResourceBundleMessageProviderTest. If I find time tomorrow, I might look at adding coverage or more XMLMessageProvider tests. Though I do not have commit access to SVN, so I assume I cannot get hold of the Clover license. Daniel: Since you are not home until next week, I will continue work and then mail you what I've got. Mattias Jiderhamn At 2005-04-19 15:22, Mattias J wrote: What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 19.04.05 17:07:46: I have now added more tests to ResourceBundleMessageProviderTest. If I find time tomorrow, I might look at adding coverage or more XMLMessageProvider tests. Though I do not have commit access to SVN, so I assume I cannot get hold of the Clover license. Daniel: Since you are not home until next week, I will continue work and then mail you what I've got. +1 Thanks for your work!! Mattias Jiderhamn At 2005-04-19 15:22, Mattias J wrote: What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Here's what I got when I added jcoverage (locally) and ran a dist. http://people.apache.org/~jmitchell/i18n-docs/ more specifically, look at the reports... http://people.apache.org/~jmitchell/i18n-docs/jcoverage/index.html This is a good starting point. You can see where new tests are needed for every possible line to be hit. I'll look at adding more tests for any classes that you guys are not working on. Some coordination would be good. Perhaps on the wiki ??? -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Daniel Florey [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 11:34 AM Subject: Re: [i18n] Entry qualifier Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 19.04.05 17:07:46: I have now added more tests to ResourceBundleMessageProviderTest. If I find time tomorrow, I might look at adding coverage or more XMLMessageProvider tests. Though I do not have commit access to SVN, so I assume I cannot get hold of the Clover license. Daniel: Since you are not home until next week, I will continue work and then mail you what I've got. +1 Thanks for your work!! Mattias Jiderhamn At 2005-04-19 15:22, Mattias J wrote: What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Each marked line is the point to test, is this? I see 2 types of marks: one in green and other in brown. What means each one? Woody http://people.apache.org/~jmitchell/i18n-docs/jcoverage/index.html '' ''This is a good starting point. You can see where new tests are needed for '' ''every possible line to be hit. '' ''I'll look at adding more tests for any classes that you guys are not working '' ''on. Some coordination would be good. Perhaps on the wiki ??? ''-- ''James Mitchell ''Software Engineer / Open Source Evangelist ''Consulting / Mentoring / Freelance ''EdgeTech, Inc. ''678.910.8017 ''AIM: jmitchtx ''Yahoo: jmitchtx ''MSN: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Green means there were no issues with that line. At the beginning of the line, you'll see a number, that is how many times a thread passed thru that piece of code. -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 2:45 PM Subject: Re: [i18n] Entry qualifier Each marked line is the point to test, is this? I see 2 types of marks: one in green and other in brown. What means each one? Woody http://people.apache.org/~jmitchell/i18n-docs/jcoverage/index.html '' ''This is a good starting point. You can see where new tests are needed for '' ''every possible line to be hit. '' ''I'll look at adding more tests for any classes that you guys are not working '' ''on. Some coordination would be good. Perhaps on the wiki ??? ''-- ''James Mitchell ''Software Engineer / Open Source Evangelist ''Consulting / Mentoring / Freelance ''EdgeTech, Inc. ''678.910.8017 ''AIM: jmitchtx ''Yahoo: jmitchtx ''MSN: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
LocalizedExceptionExample (and subsequent property files) look like good candidates for src/test. Also, someone might want to commit the missing files that make this class work/load properly. I seem to be missing some property files (that are used internally). What's the status of this project? I recall some discussion a while back about i18n, but don't remember the specifics? Are there any design or architecture docs available? Seems like i18n is reinventing the wheel over and over. I see we are using of Sax, when Digester is the most viable choice, given the typical clients of this framework. I see where ResourceBundle is used, yet a much more robust solution is already provided through Commons Resources. Any chance we can change this to use the above frameworks? -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Daniel Florey [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 10:34 AM Subject: Re: [i18n] Entry qualifier Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 19.04.05 16:05:57: I'm wrapping up development of a new Struts plug-in that integrates CommonsResources and is backward compatible with Struts 1.1. After that I can throw some time your way. I'm getting pretty good with Maven and JUnit stuff is always a valued resource. If you guys are not already doing so, adding a JCoverage report (which is trivial if using Maven) is one of the best ways ensure code completeness, efficiency, and guarantees your changes won't break anything. Eventually, I'll be adding an i18n plug-in and sample app for Struts that demonstrates a best practices for using i18n in a Struts-based app. I could use some help with that if any of you want to return the favor ;) This is great news! If I find some time I'd like to assist you. It would be a great benefit to have the capability of LocalizedException and all of this in Struts. Cheers, Daniel By the way, thanks for all the hard work! -- James Mitchell Software Engineer / Open Source Evangelist Consulting / Mentoring / Freelance EdgeTech, Inc. 678.910.8017 AIM: jmitchtx Yahoo: jmitchtx MSN: [EMAIL PROTECTED] - Original Message - From: Mattias J [EMAIL PROTECTED] To: Jakarta Commons Developers List commons-dev@jakarta.apache.org Sent: Tuesday, April 19, 2005 9:22 AM Subject: Re: [i18n] Entry qualifier What I currently need is better unit tests in ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. After those are set up, I will begin some refactoring. If you would like to help out on those unit tests it would be great. Please inform me if you get your hands at it, and which one you start with, so I don't do the same thing. Also please e-mail them to me if you are done before Daniel is back and able to check it in. At 2005-04-19 15:13, you wrote: If I can help ... I still alive Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Date: Tue, 19 Apr 2005 13:34:41 +0200 ''From: Daniel Florey [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Subject: Re: [i18n] Entry qualifier '' '' I have created unit tests for MessageManager and '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' Should I post them to the list? '' Would you like them in a ZIP archive Daniel? '' ''I'm back home next week, so if you would pass them to me in a ZIP this would ''be the easiest way yo go. ''Thanks ''Daniel '' '' ''Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
James, I remember one discussion 3 or 4 months ago where Oliver Zeigermann (xmlio) saids something about stop the development of xmlio (used by i18n) in favor of digester 2.0. Woody ''-- Mensagem Original -- ''Reply-To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''From: James Mitchell [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Subject: Re: [i18n] Entry qualifier ''Date: Tue, 19 Apr 2005 15:33:33 -0400 '' '' ''LocalizedExceptionExample (and subsequent property files) look like good '' ''candidates for src/test. '' ''Also, someone might want to commit the missing files that make this class '' ''work/load properly. I seem to be missing some property files (that are used '' ''internally). '' ''What's the status of this project? I recall some discussion a while back '' ''about i18n, but don't remember the specifics? Are there any design or ''architecture docs available? '' ''Seems like i18n is reinventing the wheel over and over. I see we are using '' ''of Sax, when Digester is the most viable choice, given the typical clients '' ''of this framework. I see where ResourceBundle is used, yet a much more ''robust solution is already provided through Commons Resources. Any chance '' ''we can change this to use the above frameworks? '' '' ''-- ''James Mitchell ''Software Engineer / Open Source Evangelist ''Consulting / Mentoring / Freelance ''EdgeTech, Inc. ''678.910.8017 ''AIM: jmitchtx ''Yahoo: jmitchtx ''MSN: [EMAIL PROTECTED] '' '' '' '' ''- Original Message - ''From: Daniel Florey [EMAIL PROTECTED] ''To: Jakarta Commons Developers List commons-dev@jakarta.apache.org ''Sent: Tuesday, April 19, 2005 10:34 AM ''Subject: Re: [i18n] Entry qualifier '' '' '' Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb '' '' am 19.04.05 16:05:57: '' '' I'm wrapping up development of a new Struts plug-in that integrates '' CommonsResources and is backward compatible with Struts 1.1. After that '' '' I '' can throw some time your way. '' '' I'm getting pretty good with Maven and JUnit stuff is always a valued '' resource. If you guys are not already doing so, adding a JCoverage '' report '' (which is trivial if using Maven) is one of the best ways ensure code '' completeness, efficiency, and guarantees your changes won't break '' anything. '' '' Eventually, I'll be adding an i18n plug-in and sample app for Struts that '' demonstrates a best practices for using i18n in a Struts-based app. I '' '' could '' use some help with that if any of you want to return the favor ;) '' '' This is great news! If I find some time I'd like to assist you. It would '' '' be a great benefit to have the capability of LocalizedException and all ''of '' this in Struts. '' '' Cheers, '' Daniel '' '' '' By the way, thanks for all the hard work! '' '' '' '' -- '' James Mitchell '' Software Engineer / Open Source Evangelist '' Consulting / Mentoring / Freelance '' EdgeTech, Inc. '' 678.910.8017 '' AIM: jmitchtx '' Yahoo: jmitchtx '' MSN: [EMAIL PROTECTED] '' '' '' '' '' - Original Message - '' From: Mattias J [EMAIL PROTECTED] '' To: Jakarta Commons Developers List commons-dev@jakarta.apache.org '' Sent: Tuesday, April 19, 2005 9:22 AM '' Subject: Re: [i18n] Entry qualifier '' '' '' What I currently need is better unit tests in '' ResourceBundleMessageProviderTest.java and XMLMessageProviderTest.java. '' After those are set up, I will begin some refactoring. If you would '' '' like '' to help out on those unit tests it would be great. '' '' Please inform me if you get your hands at it, and which one you start '' with, so I don't do the same thing. '' Also please e-mail them to me if you are done before Daniel is back ''and '' able to check it in. '' '' At 2005-04-19 15:13, you wrote: '' If I can help ... '' '' I still alive '' '' Woody '' '' '' ''-- Mensagem Original -- '' ''Reply-To: Jakarta Commons Developers List '' commons-dev@jakarta.apache.org '' ''Date: Tue, 19 Apr 2005 13:34:41 +0200 '' ''From: Daniel Florey [EMAIL PROTECTED] '' ''To: Jakarta Commons Developers List '' commons-dev@jakarta.apache.org '' ''Subject: Re: [i18n] Entry qualifier '' '' '' '' I have created unit tests for MessageManager and '' '' LocalizedBundle/-Error/-Exception/-RuntimeException. '' '' Should I post them to the list? '' '' Would you like them in a ZIP archive Daniel? '' '' '' ''I'm back home next week, so if you would pass them to me in a ZIP '' this '' would '' ''be the easiest way yo go. '' ''Thanks '' ''Daniel '' '' '' '' '' ''Mattias Jiderhamn '' '' '' - '' To unsubscribe, e-mail: [EMAIL PROTECTED] '' For additional commands, e-mail: [EMAIL PROTECTED
Re: [i18n] Entry qualifier (was Re: Status?)
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 18.04.05 10:56:58: At 2005-04-18 10:33, Daniel Florey wrote: i18n is appealing to me because it allows for multiple properties (such as title and details) under a common key. We solve very similar problems in our project, but I would like to use a generic API reusable among several projects. Although I see some changes I would like to make ti i18n. For example, I'd like the ability to qualify the entry with a source (i.e. base name). This requires some other changes of the internal structure. Do you want to introduce something like a namespace for message keys? I've been thinking of something comparable in the past but dropped it as it would introduce addintional complexity. You can add namespaces by prefixing the message-keys. My though was to re-use the basename or id used when installing ResourceBundle or XML providers. For example, after issuing ResourceBundleMessageProvider.install(errorMessages); I would like to be able to qualify the newly installed messages with MessageBundle msg = new MessageBundle(errorMessages, unexpectedError); but also keep the existing alternative with MessageBundle msg = new MessageBundle(unexpectedError); // unexpectedError from any source Do you want this to be able to install different resources with the same message key or is it mainly because of implementation details (performance)? This may seem like a minor change at a first glance, but to also improve performance my thought was to to change the MessageManager class from holding a list of provider instances - which in turn can contain multiple resources (and thus assumes one instance per provider class) - to holding a Map from basename/id/namespace/qualifier to provider instance, where each instance only contains a single resource (i.e. XML-file/ResourceBundle). Though I planned on backwards compatibilty, by looping over the Map values - instead of the List entries - in the current MessageManager.getText() method. (Did I make myself clear?) I try my best to get your point... At the moment there is only one MessageProvider holding many resources. You want to change this to many MessageProviders holding one resource each in order to improve performance? I currently don't have access to the sources as I'm on a project in Jordan, but as soon as I'm back home I'll try to have a closer look at this. Always keep in mind that it should be very simple to use the component. Do you have sandbox commit access? Cheers, Daniel I'm also considering adding a DatabaseMessageProvider as a starting point for database resouces (which is what I will be using primarily). Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
At 2005-04-18 11:11, Daniel Florey wrote: My though was to re-use the basename or id used when installing ResourceBundle or XML providers. For example, after issuing ResourceBundleMessageProvider.install(errorMessages); I would like to be able to qualify the newly installed messages with MessageBundle msg = new MessageBundle(errorMessages, unexpectedError); but also keep the existing alternative with MessageBundle msg = new MessageBundle(unexpectedError); // unexpectedError from any source Do you want this to be able to install different resources with the same message key or is it mainly because of implementation details (performance)? Primarily multiple entries with same key, secondarily performance. This may seem like a minor change at a first glance, but to also improve performance my thought was to to change the MessageManager class from holding a list of provider instances - which in turn can contain multiple resources (and thus assumes one instance per provider class) - to holding a Map from basename/id/namespace/qualifier to provider instance, where each instance only contains a single resource (i.e. XML-file/ResourceBundle). Though I planned on backwards compatibilty, by looping over the Map values - instead of the List entries - in the current MessageManager.getText() method. (Did I make myself clear?) I try my best to get your point... At the moment there is only one MessageProvider holding many resources. You want to change this to many MessageProviders holding one resource each in order to improve performance? Yes. Instead of having to loop through the providers - catching exceptions from those who do not contain the entry, which is quite costly performance wise - and get the first match, I want to be able to point out the source which I expect to hold the entry. But then again, todays behaviour should be kept as the default behaviour when not using a basename/namespace qualification. I currently don't have access to the sources as I'm on a project in Jordan (You can browse them online, http://jakarta.apache.org/commons/sandbox/i18n/xref/index.html is quite easy to navigate) but as soon as I'm back home I'll try to have a closer look at this. Should I try to create a patch suggestion which you could look at then? Always keep in mind that it should be very simple to use the component. Sure. As I said, I intend to be backwards compatible with currenty usage. Though possibly the installation of resources may look slightly different. Do you have sandbox commit access? Nope. Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 18.04.05 11:29:38: At 2005-04-18 11:11, Daniel Florey wrote: My though was to re-use the basename or id used when installing ResourceBundle or XML providers. For example, after issuing ResourceBundleMessageProvider.install(errorMessages); I would like to be able to qualify the newly installed messages with MessageBundle msg = new MessageBundle(errorMessages, unexpectedError); but also keep the existing alternative with MessageBundle msg = new MessageBundle(unexpectedError); // unexpectedError from any source Do you want this to be able to install different resources with the same message key or is it mainly because of implementation details (performance)? Primarily multiple entries with same key, secondarily performance. This may seem like a minor change at a first glance, but to also improve performance my thought was to to change the MessageManager class from holding a list of provider instances - which in turn can contain multiple resources (and thus assumes one instance per provider class) - to holding a Map from basename/id/namespace/qualifier to provider instance, where each instance only contains a single resource (i.e. XML-file/ResourceBundle). Though I planned on backwards compatibilty, by looping over the Map values - instead of the List entries - in the current MessageManager.getText() method. (Did I make myself clear?) I try my best to get your point... At the moment there is only one MessageProvider holding many resources. You want to change this to many MessageProviders holding one resource each in order to improve performance? Yes. Instead of having to loop through the providers - catching exceptions from those who do not contain the entry, which is quite costly performance wise - and get the first match, I want to be able to point out the source which I expect to hold the entry. But then again, todays behaviour should be kept as the default behaviour when not using a basename/namespace qualification. I currently don't have access to the sources as I'm on a project in Jordan (You can browse them online, http://jakarta.apache.org/commons/sandbox/i18n/xref/index.html is quite easy to navigate) but as soon as I'm back home I'll try to have a closer look at this. Should I try to create a patch suggestion which you could look at then? Yes, this would be great! It would be very (very) appreciated, if you could provide some testcases... I started to write some a while ago, but never managed to complete them. If we would have a complete testsuite we could refactor without the fear to break something ;-) If we get the testsuite done and improve the documentation, we hopefully can move the component to commons proper soon... Cheers, Daniel Always keep in mind that it should be very simple to use the component. Sure. As I said, I intend to be backwards compatible with currenty usage. Though possibly the installation of resources may look slightly different. Do you have sandbox commit access? Nope. Mattias Jiderhamn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min. weltweit telefonieren! http://freephone.web.de/?mc=021201 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Will Ant be abandoned in favor of Maven or should I update the Ant script to include the unit tests? (I have no experience with Maven) What indentation do you use for XML? I find both tabs and 2 spaces, even in the same file. (There is also a tab on line 80 in LocalizedBundle.java) I have set up the environment and started working on some unit tests. I think one of them caught a bug in MessageHandler. My guess is try { String text = getText(id, entry, arguments, locale); return MessageFormat.format(text, arguments); } catch (MessageNotFoundException e) { return defaultText; } should read try { return getText(id, entry, arguments, locale); } catch (MessageNotFoundException e) { return MessageFormat.format(defaultText, arguments); } right? (B.t.w. is there a tutorial on creating SVN patches somewhere?) Mattias Jiderhamn At 2005-04-18 13:24, Daniel Florey wrote: Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 18.04.05 11:29:38: At 2005-04-18 11:11, Daniel Florey wrote: My though was to re-use the basename or id used when installing ResourceBundle or XML providers. For example, after issuing ResourceBundleMessageProvider.install(errorMessages); I would like to be able to qualify the newly installed messages with MessageBundle msg = new MessageBundle(errorMessages, unexpectedError); but also keep the existing alternative with MessageBundle msg = new MessageBundle(unexpectedError); // unexpectedError from any source Do you want this to be able to install different resources with the same message key or is it mainly because of implementation details (performance)? Primarily multiple entries with same key, secondarily performance. This may seem like a minor change at a first glance, but to also improve performance my thought was to to change the MessageManager class from holding a list of provider instances - which in turn can contain multiple resources (and thus assumes one instance per provider class) - to holding a Map from basename/id/namespace/qualifier to provider instance, where each instance only contains a single resource (i.e. XML-file/ResourceBundle). Though I planned on backwards compatibilty, by looping over the Map values - instead of the List entries - in the current MessageManager.getText() method. (Did I make myself clear?) I try my best to get your point... At the moment there is only one MessageProvider holding many resources. You want to change this to many MessageProviders holding one resource each in order to improve performance? Yes. Instead of having to loop through the providers - catching exceptions from those who do not contain the entry, which is quite costly performance wise - and get the first match, I want to be able to point out the source which I expect to hold the entry. But then again, todays behaviour should be kept as the default behaviour when not using a basename/namespace qualification. I currently don't have access to the sources as I'm on a project in Jordan (You can browse them online, http://jakarta.apache.org/commons/sandbox/i18n/xref/index.html is quite easy to navigate) but as soon as I'm back home I'll try to have a closer look at this. Should I try to create a patch suggestion which you could look at then? Yes, this would be great! It would be very (very) appreciated, if you could provide some testcases... I started to write some a while ago, but never managed to complete them. If we would have a complete testsuite we could refactor without the fear to break something ;-) If we get the testsuite done and improve the documentation, we hopefully can move the component to commons proper soon... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [i18n] Entry qualifier
Mattias J wrote: Will Ant be abandoned in favor of Maven or should I update the Ant script to include the unit tests? (I have no experience with Maven) What indentation do you use for XML? I find both tabs and 2 spaces, even in the same file. (There is also a tab on line 80 in LocalizedBundle.java) I have set up the environment and started working on some unit tests. I think one of them caught a bug in MessageHandler. My guess is try { String text = getText(id, entry, arguments, locale); return MessageFormat.format(text, arguments); } catch (MessageNotFoundException e) { return defaultText; } should read try { return getText(id, entry, arguments, locale); } catch (MessageNotFoundException e) { return MessageFormat.format(defaultText, arguments); } right? (B.t.w. is there a tutorial on creating SVN patches somewhere?) The superb free online book Version Control with Subversion has a section about it at: http://svnbook.red-bean.com/en/1.0/ch03s05.html#svn-ch-3-sect-4.3.2 -- Dennis Lundberg Mattias Jiderhamn At 2005-04-18 13:24, Daniel Florey wrote: Jakarta Commons Developers List commons-dev@jakarta.apache.org schrieb am 18.04.05 11:29:38: At 2005-04-18 11:11, Daniel Florey wrote: My though was to re-use the basename or id used when installing ResourceBundle or XML providers. For example, after issuing ResourceBundleMessageProvider.install(errorMessages); I would like to be able to qualify the newly installed messages with MessageBundle msg = new MessageBundle(errorMessages, unexpectedError); but also keep the existing alternative with MessageBundle msg = new MessageBundle(unexpectedError); // unexpectedError from any source Do you want this to be able to install different resources with the same message key or is it mainly because of implementation details (performance)? Primarily multiple entries with same key, secondarily performance. This may seem like a minor change at a first glance, but to also improve performance my thought was to to change the MessageManager class from holding a list of provider instances - which in turn can contain multiple resources (and thus assumes one instance per provider class) - to holding a Map from basename/id/namespace/qualifier to provider instance, where each instance only contains a single resource (i.e. XML-file/ResourceBundle). Though I planned on backwards compatibilty, by looping over the Map values - instead of the List entries - in the current MessageManager.getText() method. (Did I make myself clear?) I try my best to get your point... At the moment there is only one MessageProvider holding many resources. You want to change this to many MessageProviders holding one resource each in order to improve performance? Yes. Instead of having to loop through the providers - catching exceptions from those who do not contain the entry, which is quite costly performance wise - and get the first match, I want to be able to point out the source which I expect to hold the entry. But then again, todays behaviour should be kept as the default behaviour when not using a basename/namespace qualification. I currently don't have access to the sources as I'm on a project in Jordan (You can browse them online, http://jakarta.apache.org/commons/sandbox/i18n/xref/index.html is quite easy to navigate) but as soon as I'm back home I'll try to have a closer look at this. Should I try to create a patch suggestion which you could look at then? Yes, this would be great! It would be very (very) appreciated, if you could provide some testcases... I started to write some a while ago, but never managed to complete them. If we would have a complete testsuite we could refactor without the fear to break something ;-) If we get the testsuite done and improve the documentation, we hopefully can move the component to commons proper soon... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]