[Fix] Seaside-LangConfigPatch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Fix] Seaside-LangConfigPatch

Masashi UMEZAWA-2
Hi,

Why Seaside does not allow us to change xml:lang (or lang) attribute
in <html> tag?
(Or I'm missing something?)

Anyway, I wrote a patch for fixing this problem. Since it uses
configuration, you can change lang settings by each application.

Cheers,
--
[:masashi | ^umezawa]

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Seaside-LangConfigPatch.2.cs (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [Fix] Seaside-LangConfigPatch

Bany, Michel
Hi Masashi,
I do not see the point of having a new configuration value.
IMO a better idea would be to subclass WASession and to
implement #updateRoot: in your subclass.
(Do not forget to send #updateRoot: to super).
HTH
Michel.
       
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of Masashi UMEZAWA
> Sent: Sunday, July 02, 2006 3:59 PM
> To: The Squeak Enterprise Aubergines Server - general discussion.
> Subject: [Seaside] [Fix] Seaside-LangConfigPatch
>
> Hi,
>
> Why Seaside does not allow us to change xml:lang (or lang)
> attribute in <html> tag?
> (Or I'm missing something?)
>
> Anyway, I wrote a patch for fixing this problem. Since it
> uses configuration, you can change lang settings by each application.
>
> Cheers,
> --
> [:masashi | ^umezawa]
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Fix] Seaside-LangConfigPatch

Masashi UMEZAWA-2
Hi,

So, you are saying that we should subclass WASession each time for
each language? Suppose multi-lingual app. Both in Squeak and VW, we do
not need a language specific subclass for our normal window. (Just
setting the current Locale would change the messages in window).  I
can not understand why subclassing is better...

Regards,

2006/7/5, Bany, Michel <[hidden email]>:

> Hi Masashi,
> I do not see the point of having a new configuration value.
> IMO a better idea would be to subclass WASession and to
> implement #updateRoot: in your subclass.
> (Do not forget to send #updateRoot: to super).
> HTH
> Michel.
>
>
>
> > -----Original Message-----
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf
> > Of Masashi UMEZAWA
> > Sent: Sunday, July 02, 2006 3:59 PM
> > To: The Squeak Enterprise Aubergines Server - general discussion.
> > Subject: [Seaside] [Fix] Seaside-LangConfigPatch
> >
> > Hi,
> >
> > Why Seaside does not allow us to change xml:lang (or lang)
> > attribute in <html> tag?
> > (Or I'm missing something?)
> >
> > Anyway, I wrote a patch for fixing this problem. Since it
> > uses configuration, you can change lang settings by each application.
> >
> > Cheers,
> > --
> > [:masashi | ^umezawa]
> >
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
--
[:masashi | ^umezawa]
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: [Fix] Seaside-LangConfigPatch

Bany, Michel
In reply to this post by Masashi UMEZAWA-2
 

> So, you are saying that we should subclass WASession each
> time for each language?

I am not saying that. You can provide any computed value
for xml:lang in your #updateRoot: method. It does not
need to be a hard-coded constant.

As a matter of fact I was answering your initial question :
Yes, Seaside does allow you to change xml:lang and, more generally,
any attribute in the html element. The mechanism for that is to
subclass WASession and implement #updateRoot:

> I can not understand why subclassing is better...

With a configuration value, you simply assign a hard-coded value
to your application and you would probably need to define one
application for each language. IMO subclassing gives you more
flexibility.

Cheers,
Michel.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Fix] Seaside-LangConfigPatch

Masashi UMEZAWA-2
Hi,

2006/7/6, Bany, Michel <[hidden email]>:
>
>
> > So, you are saying that we should subclass WASession each
> > time for each language?
>
> I am not saying that. You can provide any computed value
> for xml:lang in your #updateRoot: method. It does not
> need to be a hard-coded constant.

OK. I see your point.

> As a matter of fact I was answering your initial question :
> Yes, Seaside does allow you to change xml:lang and, more generally,
> any attribute in the html element. The mechanism for that is to
> subclass WASession and implement #updateRoot:

Generally, yes. However, I think xml:lang is so special. Suppose that
someone wrote Seaside app (Wiki, Blog, etc) in English, and one
Japanese would like to run it for Japanese users.

Basically, he would like to do just 2 steps:
-provide a new Japanese message catalog for the app
-set the app's locale to Japanese

If he is a good-skilled Smalltalker, it would be easy to do an extra
step - subclass WASession and override #updateRoot:. But, if he is
not, he might give up.

Moreover, if the app already uses WASession subclasses for switching
databases (Magma, GOODS, etc). We need to subclass them all, (and need
to override #updateRoot: redundantly).

More badly, if the app is commercial and he cannot access to the
source code, it would be impossible to localize. Currently, most
applications allow us to localize without accessing source code. So,
it is not so cool.

> > I can not understand why subclassing is better...
>
> With a configuration value, you simply assign a hard-coded value
> to your application and you would probably need to define one
> application for each language. IMO subclassing gives you more
> flexibility.

Yes. But, in most cases, just setting one default lang would be OK.
Suppose Wiki or Blog again. The users typically write contents in
their mother tongue. The application is universal, but in deployment,
the contents are localized. Of course, by subclassing WASession, we
can dynamically change the xml:lang by each session basis. But it
seems to be over-engineered for localized sites. Balancing the
flexibility and handiness, I prefer the config approach.

Cheers,
--
[:masashi | ^umezawa]
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside