Take 3. Change the factory application to:
LiftRules.resourceBundleFactories.toList.find(_.isDefinedAt(locale)).toList.map(_.apply(locale))
Derek
On Fri, Feb 27, 2009 at 11:05 AM, Derek Chen-Becker
dchenbec...@gmail.comwrote:
Tim, I just noticed that the PF type should be:
type
OK, since we're using a PF, the Box[ResourceBundle] really isn't necessary,
either.
On Fri, Feb 27, 2009 at 11:12 AM, Derek Chen-Becker
dchenbec...@gmail.comwrote:
Take 3. Change the factory application to:
Ok, excellent. I know have a working implementation! Rock.
Any objections to submitting this into master? Im guessing the code
freeze is now off.
Cheers, Tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Lift
How would LiftRule.resourceNames work with
type ResourceBundleFactoryPF = PartialFunction[Locale,Box
[ResourceBundle]]
var resourceBundleFactories : RulesSeq[ResourceBundleFactory]
... from usability perspective ?
On Feb 27, 7:38 pm, Tim Perrett timo...@getintheloop.eu wrote:
Ok,
Don't they achieve different things? resourceNames just defines the base
name for which the default java system starts looking for localizations
right?
Cheers, Tim
On 27/02/2009 17:54, marius d. marius.dan...@gmail.com wrote:
How would LiftRule.resourceNames work with
type
Any reason why not use NamedPF.applyBox ?
On Feb 27, 7:12 pm, Derek Chen-Becker dchenbec...@gmail.com wrote:
Take 3. Change the factory application to:
LiftRules.resourceBundleFactories.toList.find(_.isDefinedAt(locale)).toList.map(_.apply(locale))
Derek
On Fri, Feb 27, 2009 at 11:05 AM,
Well yeah but I only havethis code from you:
def resourceBundles : List[ResourceBundle] =
...
case Nil = _resBundle.set(LiftRules.resourceNames.flatMap(name =
tryo {
List(ResourceBundle.getBundle(name, locale))
} openOr {
// I think this is right...
Marius and I have just chatted this over on IM - I've altered the code
to use NamedPF...
The code now reads:
/**
* Get the resource bundle for the current locale
*/
def resourceBundles: List[ResourceBundle] = {
_resBundle.value match {
case Nil = {
Its now committed into 1.1-SNAPSHOT
Cheers, Tim
On Feb 27, 6:56 pm, marius d. marius.dan...@gmail.com wrote:
I am :) ... nice work !
On Feb 27, 8:38 pm, Tim Perrett timo...@getintheloop.eu wrote:
Marius and I have just chatted this over on IM - I've altered the code
to use NamedPF...