You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Murray Altheim <mu...@altheim.com> on 2007/10/28 01:16:14 UTC

patch on userbox

Attached is a patch that breaks the greeting message into two parts
so that the line break can be part of the JSP rather than the i18n
file and permit templates to either add the line break or not, as
appropriate.

For example, the <br /> is not wanted if the template puts the
userbox at the top right, but if it's located at the top of the
favorites menu the <br /> is needed, otherwise the combination of
username and greeting is too wide for the available space.

In the English localization there is currently an inconsistency,
such that it doesn't include the <br /> in the i18n. This patch
would of course solve that issue.

In summary, the change is effectively:

-fav.greet.anonymous=G&#8217;day (anonymous guest)
-fav.greet.asserted=G&#8217;day, {0} (not logged in)
-fav.greet.authenticated=G&#8217;day, {0} (authenticated)
+fav.greet.anonymous=G&#8217;day
+fav.greet.asserted=G&#8217;day, {0}
+fav.greet.authenticated=G&#8217;day, {0}
+fav.status.anonymous=(anonymous guest)
+fav.status.asserted=(not logged in)
+fav.status.authenticated=(authenticated)

plus requisite changes in the Userbox.jsp. There's also a minor
addition to the ClassUtil to feed through the class name on error
messages.

In the patch there seems to be a lot more information than was
actually changed -- I'm guessing this is an encoding issue. I've got
vim set for UTF-8 so I'm not quite sure what's happening. Any advice
on this welcome (could fix the patch if necessary).

Thanks,

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: patch on userbox

Posted by Murray Altheim <mu...@altheim.com>.
Craig L Russell wrote:
> Hi Murray,
> 
> In my experience, changes that appear to affect most of the lines of a 
> file are usually related to line endings. If the file is unix and you 
> use windows, and svn doesn't have a rational setting for svn:eol-style 
> you will get this symptom.
> 
> Take a look at the svn:eol-style setting and if necessary set it to LF 
> or native and this problem goes away.

Thanks Craig -- usually in vim it'll mention if the file appears to be
DOS line endings, or it will show "^M" as Control-Ms, and it doesn't
appear to be the case with the i18n files. The only thing that is
indicated is "noeol", which I believe means no end-of-line at end of
file. If it means there are no linefeeds, that would perhaps explain it.

I'm BTW using vim on Ubuntu linux with everything set as UTF-8, and just
using the regular GNU diff.

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: patch on userbox

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Murray,

In my experience, changes that appear to affect most of the lines of  
a file are usually related to line endings. If the file is unix and  
you use windows, and svn doesn't have a rational setting for svn:eol- 
style you will get this symptom.

Take a look at the svn:eol-style setting and if necessary set it to  
LF or native and this problem goes away.

Craig

On Oct 27, 2007, at 4:16 PM, Murray Altheim wrote:

> In the patch there seems to be a lot more information than was
> actually changed -- I'm guessing this is an encoding issue. I've got
> vim set for UTF-8 so I'm not quite sure what's happening. Any advice
> on this welcome (could fix the patch if necessary).
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: patch on userbox

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> Ah, didn't know that. I can set vim for Latin1. I'm guessing there is
> a good reason for Latin1 (since the rest of everyhing is AFAIK UTF-8).

Yup.  Legacy.

It really sucks for non-western-european languages.

/Janne

Re: patch on userbox

Posted by Murray Altheim <mu...@altheim.com>.
Janne Jalkanen wrote:
>> In the patch there seems to be a lot more information than was
>> actually changed -- I'm guessing this is an encoding issue. I've got
>> vim set for UTF-8 so I'm not quite sure what's happening. Any advice
>> on this welcome (could fix the patch if necessary).
> 
> Urgh!
> 
> I don't know if that matters, but .property-files MUST be in Latin1 
> encoding.

Ah, didn't know that. I can set vim for Latin1. I'm guessing there is
a good reason for Latin1 (since the rest of everyhing is AFAIK UTF-8).

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: patch on userbox

Posted by Janne Jalkanen <Ja...@ecyrd.com>.
> In the patch there seems to be a lot more information than was
> actually changed -- I'm guessing this is an encoding issue. I've got
> vim set for UTF-8 so I'm not quite sure what's happening. Any advice
> on this welcome (could fix the patch if necessary).

Urgh!

I don't know if that matters, but .property-files MUST be in Latin1  
encoding.

/Janne