shale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian.Priest" <Ian.Pri...@opsera.com>
Subject Possible Contribs
Date Fri, 13 Jul 2007 15:11:06 GMT
Hi,

 

I have a couple of possible contributions...

 

1.       Clay locale-aware import: When using clay to import an html
file, will attempt to load locale specific files in the style of a
message bundle. So if the file name is basename.html will attempt to
load (in order):

 

           baseName + "_" + language + "_" + country + "_" + variant +
".html"

          baseName + "_" + language + "_" + country + ".html"

          baseName + "_" + language + ".html"

          baseName.html

 

                Done by over-riding  protected ComponentBean
getRootElement() in Clay.java. Very handy for internationalisation!

 

2.       Property expansion just like in ant property files, but in
LoadBundle. Use LoadBundle to load a property file and use properties
internally in the file like this...

 

property.world=World

property.helloworld=Hello ${property.world}

 

                Done by some extra processing in the get() method of the
map. (If in the example above ${property.world} can't be found it'll
return "Hello ??property.world??")

 

Both changes are in project-specific extended classes, so not quite
"contrib-ready", but if there's enough interest in these new features
then I'll spend a couple of hours updating base classes and uploading.

 

It'd also be useful to know the proceedure for a contrib: raise a jira
and attach a patch file?

 

Cheers,

Ian.

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message