On Sun, Dec 27, 2009 at 9:30 AM, Marius <[email protected]> wrote:
> In \liftweb\lift-examples\hellolift\src\main\scala\com\hellolift\model
> \User.scala ... one of the Lift examples
>
> There is something like:
>
> object User extends User with MetaMegaProtoUser[User] {
> override def dbTableName = "users"
> override def screenWrap = Full(<lift:surround with="default"
> at="content">
> <lift:bind /></lift:surround>) // LiftNote: 6
> override def signupFields = firstName :: lastName :: email ::
> locale :: timezone :: password :: blogtitle :: Nil
> override val skipEmailValidation = true // LiftNote: 4
>
> override val basePath: List[String] = "user_mgt" :: "usr" :: Nil
> }
>
> Have you tried setting the signupField list to use only the override
> def signupFields = firstName :: password :: Nil ?
This will only change what appears when the user registers. There will
still be columns in the database for the fields you left out, and
there will be entries for them on the user's settings page (last time
I checked; I will check again).
>> - I'd like to use ProtoUser, but need to change the labels for some of the
>> fields in the registration form because I want to localize the site. Please
>> remember that ProtoUser uses "S.??", which makes it impossible to add
>> translations and/or change the default wordings from the outside. How do I
>> proceed with the least amount of hacks (like by writing
>> field.displayName.replace("First Name", S.?("...")) + overriding the correct
>> functions with slightly changed versions of their original code)?
>
> Why it makes it impossible? You can take lift-core.properties file and
> put it in your WEB-INF/classes/i18n. Another approach is to tell Lift
> from where it should take the core resource bundle. Thus in your boot
> youcan say:
>
> LiftRules.liftCoreResourceName = "my_bundles"
>
> this is currently set to "i18n.lift-core"
I did not know this, and it wasn't possible AFAIK last I tried (6
months ago), so thank you for the information. This deserves more
documentation, and I'd be happy to help out if I can.
Something that would be useful would be a tool that lists all of the
available translation strings inside of LiftCore so that you don't
have to search the source code for them. Also, why is something like
"First Name" used for the translation key, and why is there a method
called S.? and S.?? in the first place if the resource system can be
unified anyways?
Hoping to hear other responses to the issues I mentioned, as well.
David Flemström
--
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en.