On Tue, Mar 2, 2010 at 12:27 AM, Jeppe Nejsum Madsen <je...@ingolfs.dk>wrote:
> David Pollak <feeder.of.the.be...@gmail.com> writes: > > > If the mechanism was something more along the lines of: > > > > display name calculator: (Mapper[_], Locale, String) => Box[String] // we > > could use Lift's factory mechanism here > > I'm completely blank as to the factory mechanism, but this might be a > good excuse to get started :-) Do you mean something like this in > MapperRules: > > val displayNameCalculator: FactoryMaker[(Mapper[_], Locale, String) => > Box[String]] = new FactoryMaker((_,_,_) => Empty) {} > > Yeah. > Is there a need for the Boxed return type? Seems cleaner to just return > the passed name. But either is fine with me :-) > > > > Then you have lots of room to keep the current implementation as the > default > > if there is no actual name calculated. Further, the calculation is not > > based on the currently logged in user, so you could cache the results (or > > not if you're in development mode). > > I assume in the implementation that Mapper would have to use S.locale to > supply the locale? Or should this also be abstracted? > S.locale is just fine. > > > My issue is that I like to not push functions like this towards external > > files, but allow external files (and other resources) to be consulted > > depending on the localization mechanism chosen for the given project. > > Not sure I understand this correctly (probably a language thing :-) Do > you mean that you don't like to have this hard coded to e.g. S.?() or > more that the config hooks should provide enough parameters that you're > free to choose something other than S.?() > Both. > > I think my original proposal solved the former, but probably (due to > lack of locale) not the latter. > > /Jeppe > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.