ProtoUser i18n

9 views
Skip to first unread message

Adam Warski

unread,
Feb 1, 2010, 11:07:35 AM2/1/10
to Lift
Hello,

I'm using ProtoUser and all strings in the user menu, login, forgot password forms are localized except the "Sign Up" and "Edit user" forms. The problem is that in ProtoUser, the display names are defined as:

def firstNameDisplayName = ??("First Name")

instead using e.g. first.name. Sometimes the strings are in the resource bundles already (e.g. email, password), so it's just a matter of changing the keys. For others, new keys have to be added. I'd be of course happy to provide a patch with english & polish translations, but I read that you don't accept patches for some reason (although I can transfer all the IP for this big change to you ;) ).

Another thing is could the "localForm" method in ProtoUser stop being private (now it's private def localForm, line 628)? I just wanted to change the edit/signup forms decoration and for now had to copy the localForm into my code.

--
Adam Warski
http://www.warski.org
http://www.softwaremill.eu


David Pollak

unread,
Feb 1, 2010, 5:57:48 PM2/1/10
to lif...@googlegroups.com
We'll accept a patch for this issue. 





--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@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

Adam Warski

unread,
Feb 2, 2010, 6:07:29 AM2/2/10
to lif...@googlegroups.com

> We'll accept a patch for this issue.

Here's the patch.

0001-Localizing-display-names-of-fields-in-ProtoUser.patch

Jeppe Nejsum Madsen

unread,
Feb 2, 2010, 7:08:27 AM2/2/10
to lif...@googlegroups.com
Adam Warski <ad...@warski.org> writes:

>> We'll accept a patch for this issue.
>
> Here's the patch.

Note that this will break all existing translations. While having a
complete list of keys that can be translated is great, I don't really
think there's a reason to change the keys. E.g.

"First\ Name" is, while maybe not common, a valid key.

/Jeppe

Adam Warski

unread,
Feb 2, 2010, 7:29:03 AM2/2/10
to lif...@googlegroups.com
Hmm right, although e.g. "password" already exists as a key and it wouldn't be good to duplicate it as "Password".
Same about "Email".

Jeppe Nejsum Madsen

unread,
Feb 2, 2010, 9:13:12 AM2/2/10
to lif...@googlegroups.com
Adam Warski <ad...@warski.org> writes:

> Hmm right, although e.g. "password" already exists as a key and it wouldn't be good to duplicate it as "Password".
> Same about "Email".

Good point. Also, the spaces in keys seem to confuse people, so maybe
this is breakage that is worth it....

/Jeppe

Adam Warski

unread,
Feb 2, 2010, 9:53:37 AM2/2/10
to lif...@googlegroups.com

>> Hmm right, although e.g. "password" already exists as a key and it wouldn't be good to duplicate it as "Password".
>> Same about "Email".
>
> Good point. Also, the spaces in keys seem to confuse people, so maybe
> this is breakage that is worth it....


I guess I'll leave the decision up to David ;)

David Pollak

unread,
Feb 2, 2010, 12:06:09 PM2/2/10
to lif...@googlegroups.com
On Tue, Feb 2, 2010 at 6:53 AM, Adam Warski <ad...@warski.org> wrote:

>> Hmm right, although e.g. "password" already exists as a key and it wouldn't be good to duplicate it as "Password".
>> Same about "Email".
>
> Good point. Also, the spaces in keys seem to confuse people, so maybe
> this is breakage that is worth it....


I guess I'll leave the decision up to David ;)


I'm okay with breakage here.  Jeppe, Indrajit, or Tim, can you guys handle this issue going forward (making sure the patch is good, putting it on a branch, opening a ticket, putting it on review board, and sending out any breaking changes email)?
 
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.




--

Timothy Perrett

unread,
Feb 2, 2010, 12:11:58 PM2/2/10
to lif...@googlegroups.com
Sure - one of us will take this up... its minor.

I propose we agree a policy, and use that going forward... should keys have spaces? "no" would be my default response... (i tend to separate with full stops) if thats so, lets just clear that out now, and do a breaking changes ann.

Cheers, Tim

Indrajit Raychaudhuri

unread,
Feb 2, 2010, 2:10:03 PM2/2/10
to lif...@googlegroups.com
Adam, can you please (a) open a ticket and (b) create a gist
(http://gist.github.com/) of the patch and refer to it from the ticket?
We'll take it up from there.

Tim, +1 on not having spaces in properties.

Cheers, Indrajit

Timothy Perrett

unread,
Feb 2, 2010, 2:51:07 PM2/2/10
to lif...@googlegroups.com
Indrajit, I think you just volunteered to take this on good chap ;-)

Cheers, Tim

Indrajit Raychaudhuri

unread,
Feb 2, 2010, 2:53:44 PM2/2/10
to lif...@googlegroups.com
Yep, I did ;)

Cheers, Indrajit

Naftoli Gugenheim

unread,
Feb 2, 2010, 2:59:05 PM2/2/10
to lif...@googlegroups.com
Can you add that to the conventions in the naming wiki (property names should not have spaces) unless someone disagrees?
Thanks!

-------------------------------------

Indrajit Raychaudhuri

unread,
Feb 2, 2010, 3:06:37 PM2/2/10
to lif...@googlegroups.com
Makes sense. Yes, would do.

Jeppe Nejsum Madsen

unread,
Feb 2, 2010, 3:41:23 PM2/2/10
to lif...@googlegroups.com
Indrajit Raychaudhuri <indr...@gmail.com> writes:

> Yep, I did ;)

Awesome ;-)

/Jeppe

Adam Warski

unread,
Feb 3, 2010, 2:18:45 AM2/3/10
to lif...@googlegroups.com

Indrajit Raychaudhuri

unread,
Feb 3, 2010, 11:36:23 AM2/3/10
to lif...@googlegroups.com
Thanks Adam, I'll take this one up :)

- Indrajit

Indrajit Raychaudhuri

unread,
Feb 22, 2010, 8:51:31 AM2/22/10
to Lift
On RB: http://reviewboard.liftweb.net/r/223/

Cheers, Indrajit

On Feb 3, 9:36 pm, Indrajit Raychaudhuri <indraj...@gmail.com> wrote:
> Thanks Adam, I'll take this one up :)
>
> - Indrajit
>
> On 03/02/10 12:48 PM, Adam Warski wrote:
>
>
>
> > Sure:
>
> > (a)http://github.com/dpp/liftweb/issues/issue/320

> > (b)http://gist.github.com/293435

Reply all
Reply to author
Forward
0 new messages