[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread Derek Chen-Becker
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

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread Derek Chen-Becker
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:

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread Tim Perrett
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

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread marius d.
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,

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread Timothy Perrett
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

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread marius d.
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,

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread marius d.
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...

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread Tim Perrett
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 = {

[Lift] Re: Adding bundle factory to LiftRules

2009-02-27 Thread Tim Perrett
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...