From: Alistair Y. <ali...@sm...> - 2005-07-15 10:20:29
|
Thanks Alexis. I'm not sure what you mean by language agnostic. Bod is now an i18n application so the template compiler must be language aware. By that I mean the compiler has to know which language variant to build. The old style of template class naming is gone: template_useroptions.class -> template_useroptions_en.class so the template compiler has to know the language. As the default is "en" in build.properties 99% of people won't even know about languages or need to change anything. It's the 1% of deployers who want it in another language who will have to modify the default. Just as long as they have the resource files to back it up. There's nothing stopping someone changing the language to "ru" and gettin= g an unusable bod. A way to stop that happening would be for the build to check res/generic/languages_en.properties - this lists the available languages for that version of bod. If what they choose in build.properties isn't in res/generic/languages_en.properties then the build should abort and slap them on the back of the head :) Alistair --=20 Alistair Young Senior Software Engineer UHI@Sabhal M=F2r Ostaig Isle of Skye Scotland > Alistair Young wrote: >> >> "en" is a hard code though. Alexis, what's your opinion on adding a >> language option to build.properties and setting it to "en" by default= . >> If you want to compile bod in another language you change the languag= e >> setting in build.properties? >> >> XmlTemplate doesn't need patched, just >> TemplateBuilderTask.iterateTemplates() >> >> Alistair >> > > OK, this is now in CVS. > > What I did: > > TemplateBuilderTask.java: added 'language' property. This calls > XmlTemplate.setLanguage(String). > > build.xml: set the language attribute of the template-compiler task via > the property 'build.templates.language'. > > sample.build.properties: added a placeholder for the property > 'build.templates.language'. > > The defaults in the files above for 'language' are 'en'. > > > Alexis > > P.S. Prehaps we could make template compilation language-agnostic for > v2.8+ ;-). > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dcl= ick > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |