Its now committed into 1.1-SNAPSHOT
Cheers, Tim
On Feb 27, 6:56 pm, "marius d." wrote:
> I am :) ... nice work !
>
> On Feb 27, 8:38 pm, Tim Perrett wrote:
>
> > Marius and I have just chatted this over on IM - I've altered the code
> > to use NamedPF...
>
> > The code now reads:
>
> > /**
>
I am :) ... nice work !
On Feb 27, 8:38 pm, Tim Perrett wrote:
> 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[ResourceBundl
Is "ignorance" an acceptable answer? ;)
Fixing it up now.
On Fri, Feb 27, 2009 at 12:02 PM, marius d. wrote:
>
> Any reason why not use NamedPF.applyBox ?
>
> On Feb 27, 7:12 pm, Derek Chen-Becker wrote:
> > Take 3. Change the factory application to:
> >
> >
> LiftRules.resourceBundleFactorie
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 => {
_resBundle.set
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...
LiftRules.resourceBundleFactories.toList.
Any reason why not use NamedPF.applyBox ?
On Feb 27, 7:12 pm, Derek Chen-Becker 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, Derek Chen-Bec
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." wrote:
>
> How would LiftRule.resourceNames work with
>
> type ResourceBundleFactoryPF = Parti
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 wrote:
> Ok, excellent. I know have a working
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" gr
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
wrote:
> Take 3. Change the factory application to:
>
>
> LiftRules.resourceBundleFactories.toList.find(_.isDefinedAt(locale)).toList.map(_.apply(locale))
>
> De
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
wrote:
> Tim, I just noticed that the PF type should be:
>
> type ResourceBundleFactoryPF =
> Par
Tim, I just noticed that the PF type should be:
type ResourceBundleFactoryPF =
PartialFunction[(String,Locale),Box[ResourceBundle]]
The reason we wanted to use PFs was to allow specialization for a specific
language. I'm wondering whether the string parameter is really necessary,
since really tha
12 matches
Mail list logo