From: Alistair Y. <ali...@sm...> - 2005-07-12 20:46:15
|
Template friends, I've updated the res dir: res/templates/style_default/default -- each template has it's own directory under default, within which, it's strings file resides. I've also committed all the localised templates from style_default/defaul= t. A strange thing indeed though. Don't know what these are but these are wh= y I'm seeing more "new" templates: /tomcatadd/webapps/bodington/templates/style_default/default/CVS/Base what's that CVS/Base nonsense? Alistair --=20 Alistair Young Senior Software Engineer UHI@Sabhal M=F2r Ostaig Isle of Skye Scotland |
From: Alexis O'C. <ale...@co...> - 2005-07-13 09:30:20
|
Alistair Young wrote: > /tomcatadd/webapps/bodington/templates/style_default/default/CVS/Base > > what's that CVS/Base nonsense? > > Alistair > > I'm not sure what CVS/Base is. It is not an official CVS meta-file. It must be something your CVS client added. I'd say don't worry about it! I think people make out CVS to be more scary and confusing than it actually is. I got my CVS knowledge from reading the 'Cederqvist' (i.e. https://www.cvshome.org/docs/manual/cvs-1.11.20/cvs.html). It's the definitive resource for most things. Alexis P.S. Good work on the resources front incidentally! |
From: Alexis O'C. <ale...@co...> - 2005-07-13 10:31:45
|
Alistair Young wrote: > I've also committed all the localised templates from style_default/default. > The following templates do not compile at the moment: style_default\default\applettop.html style_default\default\error403.html style_default\default\login_anon.html style_default\default\login_step4.html The commonality seems to be that they contain localized calls to Facility methods, e.g. <target method="variable"><variable name="facility"/></target> <parameters> <variable name="request"/> <variable name="writer"/> <literal type="String"><localise id="page.title.text"></localise></literal> </parameters> I tried de-localizing such markup and it compiled OK. Is there some code missing to handle these cases? Alexis P.S. The 'compile-templates' target of the build.xml is very handy in this regard. Adding the attribute 'failonerror=no' to the template-compiler element will show all these up, otherwise it just baulks at the first failure. |
From: Alistair Y. <ali...@sm...> - 2005-07-13 10:51:53
|
hmm, what compile error do you get Alexis? I tested this with the "Enter web site" text with a Facility call and it was ok. What is that literal for? I noticed that a lot of Facility calls have a literal element but it's not localised text, it's some sort of #define if you know what I mean. I'm updating i81n.Localiser to strip whitespace from the resources attribute - line breaks for legibility cause problems! Alistair On 13 Jul 2005, at 11:31, Alexis O'Connor wrote: > Alistair Young wrote: > >> I've also committed all the localised templates from style_default/ >> default. >> > > The following templates do not compile at the moment: > > style_default\default\applettop.html > style_default\default\error403.html > style_default\default\login_anon.html > style_default\default\login_step4.html > > The commonality seems to be that they contain localized calls to > Facility methods, e.g. > > <target method="variable"><variable name="facility"/></target> > <parameters> > <variable name="request"/> > <variable name="writer"/> > <literal type="String"><localise id="page.title.text"></ > localise></literal> > </parameters> > > I tried de-localizing such markup and it compiled OK. Is there some > code missing to handle these cases? > > > Alexis > > > P.S. The 'compile-templates' target of the build.xml is very handy > in this regard. Adding the attribute 'failonerror=no' to the > template-compiler element will show all these up, otherwise it just > baulks at the first failure. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Alexis O'C. <ale...@co...> - 2005-07-13 11:36:54
|
Alistair Young wrote: > hmm, what compile error do you get Alexis? I tested this with the > "Enter web site" text with a Facility call and it was ok. What is that > literal for? I noticed that a lot of Facility calls have a literal > element but it's not localised text, it's some sort of #define if you > know what I mean. > Well running the compile-templates target I get the following error message on those 4 files I mentioned: "Technical error trying to insert iteractive item." This is the message of the exception thrown at: org.bodington.servlet.template.XmlTemplate.java:1341 As an aside, yes, it occured to me that most calls to Facility will be using strings as arguments, not as strings that are displayed to the user. Alexis |
From: Colin T. <col...@co...> - 2005-07-13 12:14:28
|
Alistair Young wrote: > res/templates/style_default/default > -- each template has it's own directory under default, within which, it's > strings file resides. We had a discussion here, I'll try to summarise. (The ideas only came up when we started doing some work on the localisation.) - All the properties files have the same name, which makes editing a collection of them confusing. - Having additional folders within the folders makes it slightly more difficult to match templates to properties files. Would there be any problems if we: - name properties files with the same name as the template they refer to. - have the properties files in the same folder as the templates. They would appear in a listing along with the template, and any other properties files that relate to that template. Admittedly that means the style_default/default folder could have loads of files in it, but that's OK innit? Colin ____________________________________ Colin Tatham VLE Team Oxford University Computing Services http://www.oucs.ox.ac.uk/ltg/vle/ http://bodington.org |
From: Alistair Y. <ali...@sm...> - 2005-07-13 12:57:44
|
> All the properties files have the same name, which makes editing a > collection of them confusing. not sure if I agree. Each properties file is distinguished by it's locale (language) and directory (template it's for) The properties files have to be in the classpath so there would have to be a lot of build.xml work if you want to keep them with the templates. I presume you mean the templates and not the template classes? I'd just say leave them where they are. It's neater and easy to find the strings for a template as the structure exactly mirrors the template dirs structure. What about the generic strings? Why have a res folder and also loads of properties scattered throughout style_* (not just default) folders? The plan was also to have entities (such as "Bodington") in the res folder too. Alistair On 13 Jul 2005, at 13:15, Colin Tatham wrote: > > Alistair Young wrote: > > >> res/templates/style_default/default >> -- each template has it's own directory under default, within >> which, it's >> strings file resides. >> > > We had a discussion here, I'll try to summarise. > > (The ideas only came up when we started doing some work on the > localisation.) > > - All the properties files have the same name, which makes editing > a collection of them confusing. > - Having additional folders within the folders makes it slightly > more difficult to match templates to properties files. > > Would there be any problems if we: > - name properties files with the same name as the template they > refer to. > - have the properties files in the same folder as the templates. > They would appear in a listing along with the template, and any > other properties files that relate to that template. > > Admittedly that means the style_default/default folder could have > loads of files in it, but that's OK innit? > > Colin > > > ____________________________________ > Colin Tatham > VLE Team > Oxford University Computing Services > > http://www.oucs.ox.ac.uk/ltg/vle/ > http://bodington.org > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Colin T. <col...@co...> - 2005-07-13 12:52:47
|
I was actually getting a bit confused there... I didn't mean to suggest that the properties files all get added to the present templates folder, although that was what I ended up suggesting... Renaming the properties files? Removing the individual folders for each template? Colin ____________________________________ Colin Tatham VLE Team Oxford University Computing Services http://www.oucs.ox.ac.uk/ltg/vle/ http://bodington.org Colin Tatham wrote: > > Alistair Young wrote: > >> res/templates/style_default/default >> -- each template has it's own directory under default, within which, it's >> strings file resides. > > > We had a discussion here, I'll try to summarise. > > (The ideas only came up when we started doing some work on the > localisation.) > > - All the properties files have the same name, which makes editing a > collection of them confusing. > - Having additional folders within the folders makes it slightly more > difficult to match templates to properties files. > > Would there be any problems if we: > - name properties files with the same name as the template they refer to. > - have the properties files in the same folder as the templates. They > would appear in a listing along with the template, and any other > properties files that relate to that template. > > Admittedly that means the style_default/default folder could have loads > of files in it, but that's OK innit? > > Colin > > > ____________________________________ > Colin Tatham > VLE Team > Oxford University Computing Services > > http://www.oucs.ox.ac.uk/ltg/vle/ > http://bodington.org > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > core and dual graphics technology at this free one hour event hosted by > HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Alistair Y. <ali...@sm...> - 2005-07-13 13:03:10
|
> Renaming the properties files? Removing the individual folders for > each template? why bother? hasta manyana babe. It looks good to me as is Alistair On 13 Jul 2005, at 13:54, Colin Tatham wrote: > > I was actually getting a bit confused there... I didn't mean to > suggest that the properties files all get added to the present > templates folder, although that was what I ended up suggesting... > > Renaming the properties files? Removing the individual folders for > each template? > > > Colin > ____________________________________ > Colin Tatham > VLE Team > Oxford University Computing Services > > http://www.oucs.ox.ac.uk/ltg/vle/ > http://bodington.org > > > Colin Tatham wrote: > >> Alistair Young wrote: >> >>> res/templates/style_default/default >>> -- each template has it's own directory under default, within >>> which, it's >>> strings file resides. >>> >> We had a discussion here, I'll try to summarise. >> (The ideas only came up when we started doing some work on the >> localisation.) >> - All the properties files have the same name, which makes editing >> a collection of them confusing. >> - Having additional folders within the folders makes it slightly >> more difficult to match templates to properties files. >> Would there be any problems if we: >> - name properties files with the same name as the template they >> refer to. >> - have the properties files in the same folder as the templates. >> They would appear in a listing along with the template, and any >> other properties files that relate to that template. >> Admittedly that means the style_default/default folder could have >> loads of files in it, but that's OK innit? >> Colin >> ____________________________________ >> Colin Tatham >> VLE Team >> Oxford University Computing Services >> http://www.oucs.ox.ac.uk/ltg/vle/ >> http://bodington.org >> ------------------------------------------------------- >> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >> happening >> July 14 at 8am PDT/11am EDT. We invite you to explore the latest >> in dual >> core and dual graphics technology at this free one hour event >> hosted by HP, AMD, and NVIDIA. To register visit http:// >> www.hp.com/go/dualwebinar >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Colin T. <col...@co...> - 2005-07-13 13:27:59
|
> why bother? hasta manyana babe. It looks good to me as is Better to fix it now rather than try do it later. Having 100's of properties files with the same name is *bound* to cause confusion at some point (like you have 3 open in your editor at once, and they all have the same name in the tag at the top of the editor?). Alistair Young wrote: >> Renaming the properties files? Removing the individual folders for >> each template? > > why bother? hasta manyana babe. It looks good to me as is > > Alistair > > > On 13 Jul 2005, at 13:54, Colin Tatham wrote: > >> >> I was actually getting a bit confused there... I didn't mean to >> suggest that the properties files all get added to the present >> templates folder, although that was what I ended up suggesting... >> >> Renaming the properties files? Removing the individual folders for >> each template? >> >> >> Colin >> ____________________________________ >> Colin Tatham >> VLE Team >> Oxford University Computing Services >> >> http://www.oucs.ox.ac.uk/ltg/vle/ >> http://bodington.org >> >> >> Colin Tatham wrote: >> >>> Alistair Young wrote: >>> >>>> res/templates/style_default/default >>>> -- each template has it's own directory under default, within >>>> which, it's >>>> strings file resides. >>>> >>> We had a discussion here, I'll try to summarise. >>> (The ideas only came up when we started doing some work on the >>> localisation.) >>> - All the properties files have the same name, which makes editing a >>> collection of them confusing. >>> - Having additional folders within the folders makes it slightly >>> more difficult to match templates to properties files. >>> Would there be any problems if we: >>> - name properties files with the same name as the template they >>> refer to. >>> - have the properties files in the same folder as the templates. >>> They would appear in a listing along with the template, and any >>> other properties files that relate to that template. >>> Admittedly that means the style_default/default folder could have >>> loads of files in it, but that's OK innit? >>> Colin >>> ____________________________________ >>> Colin Tatham >>> VLE Team >>> Oxford University Computing Services >>> http://www.oucs.ox.ac.uk/ltg/vle/ >>> http://bodington.org >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >>> happening >>> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in >>> dual >>> core and dual graphics technology at this free one hour event hosted >>> by HP, AMD, and NVIDIA. To register visit http:// >>> www.hp.com/go/dualwebinar >>> _______________________________________________ >>> Bodington-developers mailing list >>> Bod...@li... >>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >> happening >> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual >> core and dual graphics technology at this free one hour event hosted >> by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ >> go/dualwebinar >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > core and dual graphics technology at this free one hour event hosted by > HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Alistair Y. <ali...@sm...> - 2005-07-13 13:36:27
|
> Better to fix it now it ain't "broken"! I see your point about an editor but that's the editor's problem, not the properties files' Is it worth putting this to the vote as it's a lot of work. Who will do it if it's seen as a problem? Alistair On 13 Jul 2005, at 14:29, Colin Tatham wrote: > > why bother? hasta manyana babe. It looks good to me as is > > Better to fix it now rather than try do it later. > Having 100's of properties files with the same name is *bound* to > cause confusion at some point (like you have 3 open in your editor > at once, and they all have the same name in the tag at the top of > the editor?). > > > Alistair Young wrote: > >>> Renaming the properties files? Removing the individual folders >>> for each template? >>> >> why bother? hasta manyana babe. It looks good to me as is >> Alistair >> On 13 Jul 2005, at 13:54, Colin Tatham wrote: >> >>> >>> I was actually getting a bit confused there... I didn't mean to >>> suggest that the properties files all get added to the present >>> templates folder, although that was what I ended up suggesting... >>> >>> Renaming the properties files? Removing the individual folders >>> for each template? >>> >>> >>> Colin >>> ____________________________________ >>> Colin Tatham >>> VLE Team >>> Oxford University Computing Services >>> >>> http://www.oucs.ox.ac.uk/ltg/vle/ >>> http://bodington.org >>> >>> >>> Colin Tatham wrote: >>> >>> >>>> Alistair Young wrote: >>>> >>>> >>>>> res/templates/style_default/default >>>>> -- each template has it's own directory under default, within >>>>> which, it's >>>>> strings file resides. >>>>> >>>>> >>>> We had a discussion here, I'll try to summarise. >>>> (The ideas only came up when we started doing some work on the >>>> localisation.) >>>> - All the properties files have the same name, which makes >>>> editing a collection of them confusing. >>>> - Having additional folders within the folders makes it >>>> slightly more difficult to match templates to properties files. >>>> Would there be any problems if we: >>>> - name properties files with the same name as the template they >>>> refer to. >>>> - have the properties files in the same folder as the >>>> templates. They would appear in a listing along with the >>>> template, and any other properties files that relate to that >>>> template. >>>> Admittedly that means the style_default/default folder could >>>> have loads of files in it, but that's OK innit? >>>> Colin >>>> ____________________________________ >>>> Colin Tatham >>>> VLE Team >>>> Oxford University Computing Services >>>> http://www.oucs.ox.ac.uk/ltg/vle/ >>>> http://bodington.org >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by the 'Do More With Dual!' >>>> webinar happening >>>> July 14 at 8am PDT/11am EDT. We invite you to explore the >>>> latest in dual >>>> core and dual graphics technology at this free one hour event >>>> hosted by HP, AMD, and NVIDIA. To register visit http:// >>>> www.hp.com/go/dualwebinar >>>> _______________________________________________ >>>> Bodington-developers mailing list >>>> Bod...@li... >>>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>>> >>>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by the 'Do More With Dual!' >>> webinar happening >>> July 14 at 8am PDT/11am EDT. We invite you to explore the latest >>> in dual >>> core and dual graphics technology at this free one hour event >>> hosted by HP, AMD, and NVIDIA. To register visit http:// >>> www.hp.com/ go/dualwebinar >>> _______________________________________________ >>> Bodington-developers mailing list >>> Bod...@li... >>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>> >>> >> ------------------------------------------------------- >> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >> happening >> July 14 at 8am PDT/11am EDT. We invite you to explore the latest >> in dual >> core and dual graphics technology at this free one hour event >> hosted by HP, AMD, and NVIDIA. To register visit http:// >> www.hp.com/go/dualwebinar >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Colin T. <col...@co...> - 2005-07-13 13:43:42
|
Alistair Young wrote: >> Better to fix it now > > it ain't "broken"! True, I just meant better to change it now, before we embark on this (and all the future) template conversion efforts. > I see your point about an editor but that's the editor's problem, not > the properties files' > > Is it worth putting this to the vote as it's a lot of work. Is it a lot of work? Doesn't it just involve renaming the properties files, and the references? (Could have a default behaviour, that if the properties file isn't named at all, it looks for one with the same name as the template -- that's from The Bucket :-) Colin Who will do > it if it's seen as a problem? > > Alistair > > > On 13 Jul 2005, at 14:29, Colin Tatham wrote: > >> > why bother? hasta manyana babe. It looks good to me as is >> >> Better to fix it now rather than try do it later. >> Having 100's of properties files with the same name is *bound* to >> cause confusion at some point (like you have 3 open in your editor at >> once, and they all have the same name in the tag at the top of the >> editor?). >> >> >> Alistair Young wrote: >> >>>> Renaming the properties files? Removing the individual folders for >>>> each template? >>>> >>> why bother? hasta manyana babe. It looks good to me as is >>> Alistair >>> On 13 Jul 2005, at 13:54, Colin Tatham wrote: >>> >>>> >>>> I was actually getting a bit confused there... I didn't mean to >>>> suggest that the properties files all get added to the present >>>> templates folder, although that was what I ended up suggesting... >>>> >>>> Renaming the properties files? Removing the individual folders for >>>> each template? >>>> >>>> >>>> Colin >>>> ____________________________________ >>>> Colin Tatham >>>> VLE Team >>>> Oxford University Computing Services >>>> >>>> http://www.oucs.ox.ac.uk/ltg/vle/ >>>> http://bodington.org >>>> >>>> >>>> Colin Tatham wrote: >>>> >>>> >>>>> Alistair Young wrote: >>>>> >>>>> >>>>>> res/templates/style_default/default >>>>>> -- each template has it's own directory under default, within >>>>>> which, it's >>>>>> strings file resides. >>>>>> >>>>>> >>>>> We had a discussion here, I'll try to summarise. >>>>> (The ideas only came up when we started doing some work on the >>>>> localisation.) >>>>> - All the properties files have the same name, which makes >>>>> editing a collection of them confusing. >>>>> - Having additional folders within the folders makes it slightly >>>>> more difficult to match templates to properties files. >>>>> Would there be any problems if we: >>>>> - name properties files with the same name as the template they >>>>> refer to. >>>>> - have the properties files in the same folder as the templates. >>>>> They would appear in a listing along with the template, and any >>>>> other properties files that relate to that template. >>>>> Admittedly that means the style_default/default folder could have >>>>> loads of files in it, but that's OK innit? >>>>> Colin >>>>> ____________________________________ >>>>> Colin Tatham >>>>> VLE Team >>>>> Oxford University Computing Services >>>>> http://www.oucs.ox.ac.uk/ltg/vle/ >>>>> http://bodington.org >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by the 'Do More With Dual!' >>>>> webinar happening >>>>> July 14 at 8am PDT/11am EDT. We invite you to explore the latest >>>>> in dual >>>>> core and dual graphics technology at this free one hour event >>>>> hosted by HP, AMD, and NVIDIA. To register visit http:// >>>>> www.hp.com/go/dualwebinar >>>>> _______________________________________________ >>>>> Bodington-developers mailing list >>>>> Bod...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>>>> >>>>> >>>> >>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >>>> happening >>>> July 14 at 8am PDT/11am EDT. We invite you to explore the latest >>>> in dual >>>> core and dual graphics technology at this free one hour event >>>> hosted by HP, AMD, and NVIDIA. To register visit http:// >>>> www.hp.com/ go/dualwebinar >>>> _______________________________________________ >>>> Bodington-developers mailing list >>>> Bod...@li... >>>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>>> >>>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >>> happening >>> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in >>> dual >>> core and dual graphics technology at this free one hour event hosted >>> by HP, AMD, and NVIDIA. To register visit http:// >>> www.hp.com/go/dualwebinar >>> _______________________________________________ >>> Bodington-developers mailing list >>> Bod...@li... >>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>> >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >> happening >> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual >> core and dual graphics technology at this free one hour event hosted >> by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ >> go/dualwebinar >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual > core and dual graphics technology at this free one hour event hosted by > HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Alistair Y. <ali...@sm...> - 2005-07-13 13:52:36
|
> Could have a default behaviour, that if the properties file isn't > named at all, it looks for one with the same name as the template The Localiser doesn't know the name of the template - it's a system- wide localiser so that won't work > Doesn't it just involve renaming the properties files all the directories under res/templates/style_default need to be deleted, all the properties need to be moved up one level to res/ templates/style_default and then renamed to the name of the template they work with. A lot of cvs work. The references aren't that bad as there aren't that many templates to be done. If it really bugs you go ahead. I'm easy but I don't have time to do it. Alistair On 13 Jul 2005, at 14:45, Colin Tatham wrote: > Alistair Young wrote: > >>> Better to fix it now >>> >> it ain't "broken"! >> > > True, I just meant better to change it now, before we embark on > this (and all the future) template conversion efforts. > > > >> I see your point about an editor but that's the editor's problem, >> not the properties files' >> Is it worth putting this to the vote as it's a lot of work. >> > > Is it a lot of work? Doesn't it just involve renaming the > properties files, and the references? (Could have a default > behaviour, that if the properties file isn't named at all, it looks > for one with the same name as the template -- that's from The > Bucket :-) > > Colin > > > Who will do > >> it if it's seen as a problem? >> Alistair >> On 13 Jul 2005, at 14:29, Colin Tatham wrote: >> >>> > why bother? hasta manyana babe. It looks good to me as is >>> >>> Better to fix it now rather than try do it later. >>> Having 100's of properties files with the same name is *bound* >>> to cause confusion at some point (like you have 3 open in your >>> editor at once, and they all have the same name in the tag at >>> the top of the editor?). >>> >>> >>> Alistair Young wrote: >>> >>> >>>>> Renaming the properties files? Removing the individual folders >>>>> for each template? >>>>> >>>>> >>>> why bother? hasta manyana babe. It looks good to me as is >>>> Alistair >>>> On 13 Jul 2005, at 13:54, Colin Tatham wrote: >>>> >>>> >>>>> >>>>> I was actually getting a bit confused there... I didn't mean >>>>> to suggest that the properties files all get added to the >>>>> present templates folder, although that was what I ended up >>>>> suggesting... >>>>> >>>>> Renaming the properties files? Removing the individual folders >>>>> for each template? >>>>> >>>>> >>>>> Colin >>>>> ____________________________________ >>>>> Colin Tatham >>>>> VLE Team >>>>> Oxford University Computing Services >>>>> >>>>> http://www.oucs.ox.ac.uk/ltg/vle/ >>>>> http://bodington.org >>>>> >>>>> >>>>> Colin Tatham wrote: >>>>> >>>>> >>>>> >>>>>> Alistair Young wrote: >>>>>> >>>>>> >>>>>> >>>>>>> res/templates/style_default/default >>>>>>> -- each template has it's own directory under default, >>>>>>> within which, it's >>>>>>> strings file resides. >>>>>>> >>>>>>> >>>>>>> >>>>>> We had a discussion here, I'll try to summarise. >>>>>> (The ideas only came up when we started doing some work on >>>>>> the localisation.) >>>>>> - All the properties files have the same name, which makes >>>>>> editing a collection of them confusing. >>>>>> - Having additional folders within the folders makes it >>>>>> slightly more difficult to match templates to properties files. >>>>>> Would there be any problems if we: >>>>>> - name properties files with the same name as the template >>>>>> they refer to. >>>>>> - have the properties files in the same folder as the >>>>>> templates. They would appear in a listing along with the >>>>>> template, and any other properties files that relate to that >>>>>> template. >>>>>> Admittedly that means the style_default/default folder could >>>>>> have loads of files in it, but that's OK innit? >>>>>> Colin >>>>>> ____________________________________ >>>>>> Colin Tatham >>>>>> VLE Team >>>>>> Oxford University Computing Services >>>>>> http://www.oucs.ox.ac.uk/ltg/vle/ >>>>>> http://bodington.org >>>>>> ------------------------------------------------------- >>>>>> This SF.Net email is sponsored by the 'Do More With Dual!' >>>>>> webinar happening >>>>>> July 14 at 8am PDT/11am EDT. We invite you to explore the >>>>>> latest in dual >>>>>> core and dual graphics technology at this free one hour >>>>>> event hosted by HP, AMD, and NVIDIA. To register visit >>>>>> http:// www.hp.com/go/dualwebinar >>>>>> _______________________________________________ >>>>>> Bodington-developers mailing list >>>>>> Bod...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> ------------------------------------------------------- >>>>> This SF.Net email is sponsored by the 'Do More With Dual!' >>>>> webinar happening >>>>> July 14 at 8am PDT/11am EDT. We invite you to explore the >>>>> latest in dual >>>>> core and dual graphics technology at this free one hour event >>>>> hosted by HP, AMD, and NVIDIA. To register visit http:// >>>>> www.hp.com/ go/dualwebinar >>>>> _______________________________________________ >>>>> Bodington-developers mailing list >>>>> Bod...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>>>> >>>>> >>>>> >>>> ------------------------------------------------------- >>>> This SF.Net email is sponsored by the 'Do More With Dual!' >>>> webinar happening >>>> July 14 at 8am PDT/11am EDT. We invite you to explore the >>>> latest in dual >>>> core and dual graphics technology at this free one hour event >>>> hosted by HP, AMD, and NVIDIA. To register visit http:// >>>> www.hp.com/go/dualwebinar >>>> _______________________________________________ >>>> Bodington-developers mailing list >>>> Bod...@li... >>>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>>> >>>> >>> >>> >>> ------------------------------------------------------- >>> This SF.Net email is sponsored by the 'Do More With Dual!' >>> webinar happening >>> July 14 at 8am PDT/11am EDT. We invite you to explore the latest >>> in dual >>> core and dual graphics technology at this free one hour event >>> hosted by HP, AMD, and NVIDIA. To register visit http:// >>> www.hp.com/ go/dualwebinar >>> _______________________________________________ >>> Bodington-developers mailing list >>> Bod...@li... >>> https://lists.sourceforge.net/lists/listinfo/bodington-developers >>> >>> >> ------------------------------------------------------- >> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >> happening >> July 14 at 8am PDT/11am EDT. We invite you to explore the latest >> in dual >> core and dual graphics technology at this free one hour event >> hosted by HP, AMD, and NVIDIA. To register visit http:// >> www.hp.com/go/dualwebinar >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Matthew B. <mat...@co...> - 2005-07-13 14:36:56
|
Alistair Young wrote: >> Could have a default behaviour, that if the properties file isn't >> named at all, it looks for one with the same name as the template > > The Localiser doesn't know the name of the template - it's a system- > wide localiser so that won't work But the template compiler knows the name of the template. If the template compiler expanded in the default resource names (from the template name and loction) this could save allot of typing (and typos). -- +--Matthew Buckett-----------------------------------------+ | VLE Developer, Learning Technologies Group | | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | +------------Computing Services, University of Oxford------+ |
From: Alistair Y. <ali...@sm...> - 2005-07-13 14:41:34
|
what about the classpath part of the properties file - are you suggesting hard coding that into the template compiler? Alistair On 13 Jul 2005, at 15:36, Matthew Buckett wrote: > Alistair Young wrote: > >>> Could have a default behaviour, that if the properties file >>> isn't named at all, it looks for one with the same name as the >>> template >>> >> The Localiser doesn't know the name of the template - it's a >> system- wide localiser so that won't work >> > > But the template compiler knows the name of the template. If the > template compiler expanded in the default resource names (from the > template name and loction) this could save allot of typing (and > typos). > > -- > +--Matthew Buckett-----------------------------------------+ > | VLE Developer, Learning Technologies Group | > | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | > +------------Computing Services, University of Oxford------+ > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Matthew B. <mat...@co...> - 2005-07-13 14:52:06
|
Alistair Young wrote: > what about the classpath part of the properties file - are you > suggesting hard coding that into the template compiler? I'm suggesting setting the default value to the path of the template (converted to the resource file classpath) but still allow a different resource file to be specified if needed. Shall I hack up a patch that might explain this a little clearer? -- +--Matthew Buckett-----------------------------------------+ | VLE Developer, Learning Technologies Group | | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | +------------Computing Services, University of Oxford------+ |
From: Alistair Y. <ali...@sm...> - 2005-07-13 15:00:30
|
I'd rather you sent the source file - patches don't work too well here What was the problem with facility calls? they worked here ok. Presumably you know as you patched something? Can you explain why they weren't compiling? Alistair On 13 Jul 2005, at 15:52, Matthew Buckett wrote: > Alistair Young wrote: > >> what about the classpath part of the properties file - are you >> suggesting hard coding that into the template compiler? >> > > I'm suggesting setting the default value to the path of the > template (converted to the resource file classpath) but still allow > a different resource file to be specified if needed. > > Shall I hack up a patch that might explain this a little clearer? > > -- > +--Matthew Buckett-----------------------------------------+ > | VLE Developer, Learning Technologies Group | > | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | > +------------Computing Services, University of Oxford------+ > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in > dual > core and dual graphics technology at this free one hour event > hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/ > go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Matthew B. <mat...@co...> - 2005-07-13 15:06:43
|
Alistair Young wrote: > I'd rather you sent the source file - patches don't work too well here The patch should apply cleanly to bodington_head. > What was the problem with facility calls? they worked here ok. > Presumably you know as you patched something? Can you explain why they > weren't compiling? Just grab a copy of Bodington HEAD and try building with skip.compile.templates unset. -- +--Matthew Buckett-----------------------------------------+ | VLE Developer, Learning Technologies Group | | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | +------------Computing Services, University of Oxford------+ |
From: Matthew B. <mat...@co...> - 2005-07-13 15:46:44
Attachments:
XmlTemplate.java
|
Alistair Young wrote: > I'd rather you sent the source file - patches don't work too well here Attached. -- +--Matthew Buckett-----------------------------------------+ | VLE Developer, Learning Technologies Group | | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | +------------Computing Services, University of Oxford------+ |
From: Alistair Y. <ali...@sm...> - 2005-07-13 19:30:12
|
Thanks Mathew, I copied this into my tree with no effect. I'm not convinced the problem lies here. Template compilation used to work. I think it was using the ba= t file before. It's using an ant task now. I'm getting a NullPointerException for style_0/recycler/main.html when it XmlTemplate tries to compile: <literal type=3D"String"></literal> There isn't any localisation in this template. The lack of a string causes the exception. Which leads me to think that: <literal type=3D"String"><localise id=3D"enter.website" /></literal> in style_default/default/login_anon.html has the same problem - I verified it has a NullPointerException too. XmlTemplate.getCharacterData() replaces the <localise> element in a <literal> element with the text that the Localiser returns. This seems to point to the Localiser not being either available or not finding the properties file when XmlTemplate is invoked from the ant task= . That wouldn't explain why <literal type=3D"String"></literal> causes a NullPointerException now. It didn't before. any ideas? Alistair --=20 Alistair Young Senior Software Engineer UHI@Sabhal M=F2r Ostaig Isle of Skye Scotland > Alistair Young wrote: >> I'd rather you sent the source file - patches don't work too well here > > Attached. > > -- > +--Matthew Buckett-----------------------------------------+ > | VLE Developer, Learning Technologies Group | > | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | > +------------Computing Services, University of Oxford------+ > |
From: Matthew B. <mat...@co...> - 2005-07-13 20:26:56
|
Alistair Young wrote: > Thanks Mathew, > > I copied this into my tree with no effect. I'm not convinced the problem > lies here. Template compilation used to work. I think it was using the bat > file before. It's using an ant task now. Ok. But with an up to date checkout of bodington HEAD (without my patch) do you see this error when attempting to compile the templates through the ant task? [template-compiler] Compiling 459 templates to /home/buckett/workspace/bodington/build/bodington/WEB-INF/template_classes [template-compiler] Error(s) found with "style_default/default/applettop.html": [template-compiler] Technical error trying to insert iteractive item. > I'm getting a NullPointerException for style_0/recycler/main.html when it > XmlTemplate tries to compile: > <literal type="String"></literal> > There isn't any localisation in this template. Is this with my patch applied? > The lack of a string causes the exception. Which leads me to think that: > <literal type="String"><localise id="enter.website" /></literal> > in style_default/default/login_anon.html > has the same problem - I verified it has a NullPointerException too. I don't see the NPE. > XmlTemplate.getCharacterData() replaces the <localise> element in a > <literal> element with the text that the Localiser returns. Ok thanks, I hadn't spotted that, thanks. So you hardcode the resource properties in the .java file that the compiler produces? > This seems to point to the Localiser not being either available or not > finding the properties file when XmlTemplate is invoked from the ant task. Although if I set the build not to compile templates I was getting the same error when Bodington was deployed localy. > That wouldn't explain why <literal type="String"></literal> causes a > NullPointerException now. It didn't before. Indeed. > any ideas? I'm looking..... Are you on Jabber or IRC? -- +--Matthew Buckett-----------------------------------------+ | VLE Developer, Learning Technologies Group | | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | +------------Computing Services, University of Oxford------+ |
From: Alistair Y. <ali...@sm...> - 2005-07-13 20:52:15
|
> [template-compiler] Error(s) found with > "style_default/default/applettop.html": > [template-compiler] Technical error trying to insert iteractive item. got that without the patch. With the patch I couldn't get that far as it barfed on style_0/recycler/main.html instead. Without the patch, removing the localised literal fixed the problem. However, it shouldn't have been localised in the first place. This is what I meant by #define. I should have said enumeration. The template is calling Facility and passing what is essentially an enum to get the Facility method to do something. >> I'm getting a NullPointerException for style_0/recycler/main.html when > Is this with my patch applied? yes > I don't see the NPE. sorry, I sort of hacked my way into it - XmlTemplate.compileCall() catche= s a RuntimeException, which turns out to be the NPE > So you hardcode the resource > properties in the .java file that the compiler produces? yes. There was a debate ages ago whether to substitute a <localise> element with the actual text or write code into the template class to dynamically call the Localiser. We choose the dynamic method as that lets you update the properties file without recompiling the template. > Although if I set the build not to compile templates I was getting the > same error when Bodington was deployed localy. interesting. Ant has deployed it ok here. It's localised as we had problems with the Localiser and whitespace, which we've fixed. The literals are being localised ok here. Ant doesn't have your patch though. > Are you on Jabber or IRC? nope! never got that far! playing with the cat just now :) Maybe I'll have more ideas by the morning. Thanks for looking into it. Alistair --=20 Alistair Young Senior Software Engineer UHI@Sabhal M=F2r Ostaig Isle of Skye Scotland > Alistair Young wrote: >> Thanks Mathew, >> >> I copied this into my tree with no effect. I'm not convinced the probl= em >> lies here. Template compilation used to work. I think it was using the >> bat >> file before. It's using an ant task now. > > Ok. But with an up to date checkout of bodington HEAD (without my patch= ) > do you see this error when attempting to compile the templates through > the ant task? > > [template-compiler] Compiling 459 templates to > /home/buckett/workspace/bodington/build/bodington/WEB-INF/template_clas= ses > [template-compiler] Error(s) found with > "style_default/default/applettop.html": > [template-compiler] Technical error trying to insert iteractive item. > >> I'm getting a NullPointerException for style_0/recycler/main.html when >> it >> XmlTemplate tries to compile: >> <literal type=3D"String"></literal> >> There isn't any localisation in this template. > > Is this with my patch applied? > >> The lack of a string causes the exception. Which leads me to think tha= t: >> <literal type=3D"String"><localise id=3D"enter.website" /></literal> >> in style_default/default/login_anon.html >> has the same problem - I verified it has a NullPointerException too. > > I don't see the NPE. > >> XmlTemplate.getCharacterData() replaces the <localise> element in a >> <literal> element with the text that the Localiser returns. > > Ok thanks, I hadn't spotted that, thanks. So you hardcode the resource > properties in the .java file that the compiler produces? > >> This seems to point to the Localiser not being either available or not >> finding the properties file when XmlTemplate is invoked from the ant >> task. > > Although if I set the build not to compile templates I was getting the > same error when Bodington was deployed localy. > >> That wouldn't explain why <literal type=3D"String"></literal> causes a >> NullPointerException now. It didn't before. > > Indeed. > >> any ideas? > > I'm looking..... Are you on Jabber or IRC? > > -- > +--Matthew Buckett-----------------------------------------+ > | VLE Developer, Learning Technologies Group | > | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | > +------------Computing Services, University of Oxford------+ > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dua= l > core and dual graphics technology at this free one hour event hosted by > HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Alistair Y. <ali...@sm...> - 2005-07-14 09:22:14
|
I've found the probem. TemplateBuilderTask.iterateTemplates() doesn't set the language of =20 the templates. That's where the NPE is coming from. In BuildingServlet.doProcessing(), Template objects are used and =20 XmlTemplate is obtained indirectly at runtime but the ant task uses =20 XmlTemplate directly, thus bypassing the language initialisation. Adding this line to TemplateBuilderTask.iterateTemplates(): template.setLanguage("en"); fixes the problem At runtime this is called via Template.setProcessorLanguage() "en" is a hard code though. Alexis, what's your opinion on adding a =20 language option to build.properties and setting it to "en" by =20 default. If you want to compile bod in another language you change =20 the language setting in build.properties? XmlTemplate doesn't need patched, just =20 TemplateBuilderTask.iterateTemplates() Alistair On 13 Jul 2005, at 21:52, Alistair Young wrote: >> [template-compiler] Error(s) found with >> "style_default/default/applettop.html": >> [template-compiler] Technical error trying to insert iteractive item. >> > got that without the patch. With the patch I couldn't get that far =20 > as it > barfed on style_0/recycler/main.html instead. Without the patch, =20 > removing > the localised literal fixed the problem. However, it shouldn't have =20= > been > localised in the first place. This is what I meant by #define. I =20 > should > have said enumeration. The template is calling Facility and passing =20= > what > is essentially an enum to get the Facility method to do something. > > >>> I'm getting a NullPointerException for style_0/recycler/main.html =20= >>> when >>> >> Is this with my patch applied? >> > yes > > >> I don't see the NPE. >> > sorry, I sort of hacked my way into it - XmlTemplate.compileCall() =20 > catches > a RuntimeException, which turns out to be the NPE > > >> So you hardcode the resource >> properties in the .java file that the compiler produces? >> > yes. There was a debate ages ago whether to substitute a <localise> > element with the actual text or write code into the template class to > dynamically call the Localiser. We choose the dynamic method as =20 > that lets > you update the properties file without recompiling the template. > > >> Although if I set the build not to compile templates I was getting =20= >> the >> same error when Bodington was deployed localy. >> > interesting. Ant has deployed it ok here. It's localised as we had > problems with the Localiser and whitespace, which we've fixed. The > literals are being localised ok here. Ant doesn't have your patch =20 > though. > > >> Are you on Jabber or IRC? >> > nope! never got that far! playing with the cat just now :) > > Maybe I'll have more ideas by the morning. > > Thanks for looking into it. > > Alistair > > > --=20 > Alistair Young > Senior Software Engineer > UHI@Sabhal M=F2r Ostaig > Isle of Skye > Scotland > > >> Alistair Young wrote: >> >>> Thanks Mathew, >>> >>> I copied this into my tree with no effect. I'm not convinced the =20 >>> problem >>> lies here. Template compilation used to work. I think it was =20 >>> using the >>> bat >>> file before. It's using an ant task now. >>> >> >> Ok. But with an up to date checkout of bodington HEAD (without my =20 >> patch) >> do you see this error when attempting to compile the templates =20 >> through >> the ant task? >> >> [template-compiler] Compiling 459 templates to >> /home/buckett/workspace/bodington/build/bodington/WEB-INF/=20 >> template_classes >> [template-compiler] Error(s) found with >> "style_default/default/applettop.html": >> [template-compiler] Technical error trying to insert iteractive item. >> >> >>> I'm getting a NullPointerException for style_0/recycler/main.html =20= >>> when >>> it >>> XmlTemplate tries to compile: >>> <literal type=3D"String"></literal> >>> There isn't any localisation in this template. >>> >> >> Is this with my patch applied? >> >> >>> The lack of a string causes the exception. Which leads me to =20 >>> think that: >>> <literal type=3D"String"><localise id=3D"enter.website" /></literal> >>> in style_default/default/login_anon.html >>> has the same problem - I verified it has a NullPointerException too. >>> >> >> I don't see the NPE. >> >> >>> XmlTemplate.getCharacterData() replaces the <localise> element in a >>> <literal> element with the text that the Localiser returns. >>> >> >> Ok thanks, I hadn't spotted that, thanks. So you hardcode the =20 >> resource >> properties in the .java file that the compiler produces? >> >> >>> This seems to point to the Localiser not being either available =20 >>> or not >>> finding the properties file when XmlTemplate is invoked from the ant >>> task. >>> >> >> Although if I set the build not to compile templates I was getting =20= >> the >> same error when Bodington was deployed localy. >> >> >>> That wouldn't explain why <literal type=3D"String"></literal> causes = a >>> NullPointerException now. It didn't before. >>> >> >> Indeed. >> >> >>> any ideas? >>> >> >> I'm looking..... Are you on Jabber or IRC? >> >> -- >> +--Matthew Buckett-----------------------------------------+ >> | VLE Developer, Learning Technologies Group | >> | Tel: +44 (0) 1865 283660 http://www.oucs.ox.ac.uk/ | >> +------------Computing Services, University of Oxford------+ >> >> >> ------------------------------------------------------- >> This SF.Net email is sponsored by the 'Do More With Dual!' webinar >> happening >> July 14 at 8am PDT/11am EDT. We invite you to explore the latest =20 >> in dual >> core and dual graphics technology at this free one hour event =20 >> hosted by >> HP, >> AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar >> _______________________________________________ >> Bodington-developers mailing list >> Bod...@li... >> https://lists.sourceforge.net/lists/listinfo/bodington-developers >> >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the 'Do More With Dual!' webinar =20 > happening > July 14 at 8am PDT/11am EDT. We invite you to explore the latest in =20= > dual > core and dual graphics technology at this free one hour event =20 > hosted by HP, > AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar > _______________________________________________ > Bodington-developers mailing list > Bod...@li... > https://lists.sourceforge.net/lists/listinfo/bodington-developers > |
From: Alexis O'C. <ale...@co...> - 2005-07-15 10:01:04
|
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 language > 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+ ;-). |
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 > |