Skip to Content.
Sympa Menu

devel - Re: [sympa-developpers] [sympa-commits] sympa[8124] branches/sympa-6.2-branch: [*feature] Per-language css. tt2 will override any portion of main css, not fully

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: IKEDA Soji <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-developpers] [sympa-commits] sympa[8124] branches/sympa-6.2-branch: [*feature] Per-language css. tt2 will override any portion of main css, not fully
  • Date: Wed, 12 Dec 2012 12:02:24 +0900

I second, too.

Although I'm not familiar with Arabic and Hebrew, a few or more
adjustments might be needed on codes. AFAIK MediaWiki provides
good example:
http://www.mediawiki.org/wiki/Directionality_support

Thanks,

On Tue, 11 Dec 2012 11:04:19 +0100
Etienne MELEARD <address@concealed> wrote:

> I second that !
>
> The other thing I can think of is right aligned languages (arabic).
>
> Cheers,
>
> Etienne
>
>
> Le 11/12/12 10:51, David Verdin a écrit :
> > Great feature for i18n, Soji,
> >
> > As we speak about it: I understood, aa long time ago, that a properly
> > localized application was supposed to adapt its layout to the selected
> > languages.
> > Souldn't we, for example, switch places between side menus and main
> > panel in the web interface?
> >
> > Cheers,
> >
> > David
> >
> > Le 07/12/12 20:18, address@concealed a écrit :
> >> sympa[8124] branches/sympa-6.2-branch: [*feature] Per-language
> >> css.tt2 will override any portion of main css, not fully
> >>
> >> Revision
> >> 8124
> >> Author
> >> sikeda
> >> Date
> >> 2012-12-07 20:18:15 +0100 (ven. 07 déc. 2012)
> >>
> >>
> >> Log Message
> >>
> >> [*feature] Per-language css.tt2 will override any portion of main css,
> >> not fully
> >> replacing it. So they may be used for locale-specific customization.
> >> Background: Default css.tt2 specifies the font families covering Western
> >> scripts (Latin, Cyrilic, ...). East Asian users may prefer consistent
> >> font
> >> family supporting Western along with Eastern scripts (Han, Hangul, ...).
> >>
> >>
> >> Modified Paths
> >>
> >> * branches/sympa-6.2-branch/web_tt2/Makefile.am
> >> <#branchessympa62branchweb_tt2Makefileam>
> >> * branches/sympa-6.2-branch/web_tt2/crash.tt2
> >> <#branchessympa62branchweb_tt2crashtt2>
> >> * branches/sympa-6.2-branch/web_tt2/css.tt2
> >> <#branchessympa62branchweb_tt2csstt2>
> >> * branches/sympa-6.2-branch/web_tt2/main.tt2
> >> <#branchessympa62branchweb_tt2maintt2>
> >> * branches/sympa-6.2-branch/wwsympa/wwsympa.fcgi.in
> >> <#branchessympa62branchwwsympawwsympafcgiin>
> >>
> >>
> >> Added Paths
> >>
> >> * branches/sympa-6.2-branch/web_tt2/ja_JP/
> >> * branches/sympa-6.2-branch/web_tt2/ja_JP/css.tt2
> >> <#branchessympa62branchweb_tt2ja_JPcsstt2>
> >> * branches/sympa-6.2-branch/web_tt2/ko_KR/
> >> * branches/sympa-6.2-branch/web_tt2/ko_KR/css.tt2
> >> <#branchessympa62branchweb_tt2ko_KRcsstt2>
> >> * branches/sympa-6.2-branch/web_tt2/zh_CN/
> >> * branches/sympa-6.2-branch/web_tt2/zh_CN/css.tt2
> >> <#branchessympa62branchweb_tt2zh_CNcsstt2>
> >> * branches/sympa-6.2-branch/web_tt2/zh_TW/
> >> * branches/sympa-6.2-branch/web_tt2/zh_TW/css.tt2
> >> <#branchessympa62branchweb_tt2zh_TWcsstt2>
> >>
> >>
> >> Diff
> >>
> >>
> >> Modified: branches/sympa-6.2-branch/web_tt2/Makefile.am (8123
> >> => 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/Makefile.am 2012-12-07 14:50:24
> >> UTC (rev 8123)
> >> +++ branches/sympa-6.2-branch/web_tt2/Makefile.am 2012-12-07 19:18:15
> >> UTC (rev 8124)
> >> @@ -162,9 +162,17 @@
> >> view_template.tt2 \
> >> your_lists.tt2
> >>
> >> -EXTRA_DIST = $(webtemplate_DATA)
> >> +localetemplates = ja_JP/css.tt2 ko_KR/css.tt2 zh_CN/css.tt2
> >> zh_TW/css.tt2
> >>
> >> +EXTRA_DIST = $(webtemplate_DATA) $(localetemplates)
> >> +
> >> install-data-hook:
> >> + for t in $(localetemplates); do \
> >> + dir=`dirname $$t`; \
> >> + [ -n "$$dir" ] && \
> >> + install -d -m 755 $(DESTDIR)$(webtemplatedir)/$$dir; \
> >> + $(INSTALL_DATA) $$t $(DESTDIR)$(webtemplatedir)/$$dir; \
> >> + done
> >> cd $(DESTDIR)$(webtemplatedir); \
> >> $(LN_S) -f review.tt2 search.tt2; \
> >> $(LN_S) -f lists.tt2 which.tt2; \
> >>
> >>
> >> Modified: branches/sympa-6.2-branch/web_tt2/crash.tt2 (8123
> >> => 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/crash.tt2 2012-12-07 14:50:24
> >> UTC (rev 8123)
> >> +++ branches/sympa-6.2-branch/web_tt2/crash.tt2 2012-12-07 19:18:15
> >> UTC (rev 8124)
> >> @@ -8,17 +8,21 @@
> >>
> >> <title> [% main_title %] - [% action %] </title>
> >>
> >> -[% IF custom_css || session.custom_css %]
> >> +[% IF custom_css %]
> >> <style type="text/css">
> >> -[% PROCESS css.tt2 %]
> >> +[% custom_css %]
> >> </style>
> >> -
> >> [% ELSE %]
> >> <link rel="stylesheet" href="[% css_url %]/style.css" type="text/css"
> >> media="screen" title="Sympa CSS" />
> >> [% END %]
> >>
> >> [% PROCESS css_ie.tt2 %]
> >>
> >> +[% TRY %]
> >> +[% PROCESS "$locale/css.tt2" %]
> >> +[% CATCH %]
> >> +[% END %]
> >> +
> >> <!-- the following CSS have to be improved before to be used -->
> >> <!-- <link rel="stylesheet" href="[% css_url %]/print.css"
> >> type="text/css" media="print" />
> >> -->
> >> <!-- <link rel="alternative stylesheet" href="[% css_url
> >> %]/fullPage.css" type="text/css" media="screen" title="View Full Page"
> >> /> -->
> >>
> >>
> >> Modified: branches/sympa-6.2-branch/web_tt2/css.tt2 (8123 =>
> >> 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/css.tt2 2012-12-07 14:50:24
> >> UTC (rev 8123)
> >> +++ branches/sympa-6.2-branch/web_tt2/css.tt2 2012-12-07 19:18:15
> >> UTC (rev 8124)
> >> @@ -1,12 +1,4 @@
> >> -[% IF css == 'style.css' || custom_css || session.custom_css %]
> >> -[% IF custom_css || session.custom_css %]
> >> -[% FOREACH color IN ['color_0' 'color_1' 'color_2' 'color_3''color_4'
> >> 'color_5' 'color_6' 'color_7' 'color_8''color_9' 'color_10' 'color_11'
> >> 'color_12' 'color_13' 'color_14' 'color_15'] %]
> >> - [% IF session.$color %]
> >> - [% $color = session.$color %]
> >> - [% END %]
> >> - /* [% $color %] */
> >> -[% END %]
> >> -[% END %]
> >> +[% IF css == 'style.css' || session.custom_css %]
> >>
> >> @media screen { }
> >> * {
> >>
> >>
> >> Added: branches/sympa-6.2-branch/web_tt2/ja_JP/css.tt2 (0 =>
> >> 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/ja_JP/css.tt2
> >> (rev 0)
> >> +++ branches/sympa-6.2-branch/web_tt2/ja_JP/css.tt2 2012-12-07
> >> 19:18:15 UTC (rev 8124)
> >> @@ -0,0 +1,9 @@
> >> +[%# $Id: $ %]
> >> +<!-- begin ja_JP/css.tt2 -->
> >> +<style type="text/css">
> >> +@media screen { }
> >> +* {
> >> + font-family:"ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ
> >> Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "MS Pゴシック",
> >> TakaoPGothic, "IPAexゴシック", IPAexGothic, "IPA Pゴシック", IPAPGothic, "VL
> >> Pゴシック", "VL PGothic", sans-serif;
> >> +}
> >> +</style>
> >> +<!-- end ja_JP/css.tt2 -->
> >>
> >>
> >> Added: branches/sympa-6.2-branch/web_tt2/ko_KR/css.tt2 (0 =>
> >> 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/ko_KR/css.tt2
> >> (rev 0)
> >> +++ branches/sympa-6.2-branch/web_tt2/ko_KR/css.tt2 2012-12-07
> >> 19:18:15 UTC (rev 8124)
> >> @@ -0,0 +1,9 @@
> >> +[%# $Id: $ %]
> >> +<!-- begin ko_KR/css.tt2 -->
> >> +<style type="text/css">
> >> +@media screen { }
> >> +* {
> >> + font-family:AppleGothic, "맑은 고딕", "Malgun Gothic", "백묵 굴림",
> >> "Baekmuk Gulim", sans-serif;
> >> +}
> >> +</style>
> >> +<!-- end ko_KR/css.tt2 -->
> >>
> >>
> >> Modified: branches/sympa-6.2-branch/web_tt2/main.tt2 (8123 =>
> >> 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/main.tt2 2012-12-07 14:50:24
> >> UTC (rev 8123)
> >> +++ branches/sympa-6.2-branch/web_tt2/main.tt2 2012-12-07 19:18:15
> >> UTC (rev 8124)
> >> @@ -8,20 +8,21 @@
> >>
> >> <title> [% main_title %] - [% action %] </title>
> >>
> >> -[% IF custom_css || session.custom_css %]
> >> +[% IF custom_css %]
> >> <style type="text/css">
> >> -[% PROCESS css.tt2 %]
> >> +[% custom_css %]
> >> </style>
> >> -
> >> [% ELSE %]
> >> <link rel="stylesheet" href="[% css_url %]/style.css" type="text/css"
> >> media="screen" title="Sympa CSS" />
> >> [% END %]
> >>
> >> -
> >> [% PROCESS css_ie.tt2 %]
> >>
> >> +[% TRY %]
> >> +[% PROCESS "$locale/css.tt2" %]
> >> +[% CATCH %]
> >> +[% END %]
> >>
> >> -
> >> <!-- RSS chanel -->
> >> [% IF list -%]
> >> [% IF arc_public_access %]<link rel="alternate"
> >> type="application/xml" title="[%|loc%]RSS Latest messages[%END%]"
> >> href="[% base_url%][% path_cgi %]/rss/latest_arc/[%list%]?count=20"/>[%
> >> END -%]
> >>
> >>
> >> Added: branches/sympa-6.2-branch/web_tt2/zh_CN/css.tt2 (0 =>
> >> 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/zh_CN/css.tt2
> >> (rev 0)
> >> +++ branches/sympa-6.2-branch/web_tt2/zh_CN/css.tt2 2012-12-07
> >> 19:18:15 UTC (rev 8124)
> >> @@ -0,0 +1,9 @@
> >> +[%# $Id: $ %]
> >> +<!-- begin zh_CN/css.tt2 -->
> >> +<style type="text/css">
> >> +@media screen { }
> >> +* {
> >> + font-family:"儷黑 Pro", "LiHei Pro", "华文黑体", STHeiti, "微软雅黑",
> >> "Microsoft YaHei", "MS Hei", SimHei, sans-serif;
> >> +}
> >> +</style>
> >> +<!-- end zh_CN/css.tt2 -->
> >>
> >>
> >> Added: branches/sympa-6.2-branch/web_tt2/zh_TW/css.tt2 (0 =>
> >> 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/web_tt2/zh_TW/css.tt2
> >> (rev 0)
> >> +++ branches/sympa-6.2-branch/web_tt2/zh_TW/css.tt2 2012-12-07
> >> 19:18:15 UTC (rev 8124)
> >> @@ -0,0 +1,9 @@
> >> +[%# $Id: $ %]
> >> +<!-- begin zh_TW/css.tt2 -->
> >> +<style type="text/css">
> >> +@media screen { }
> >> +* {
> >> + font-family:"儷黑 Pro", "LiHei Pro", "Apple LiGothic", "微軟正黑體",
> >> "Microsoft JhengHei", sans-serif;
> >> +}
> >> +</style>
> >> +<!-- end zh_TW/css.tt2 -->
> >>
> >>
> >> Modified: branches/sympa-6.2-branch/wwsympa/wwsympa.fcgi.in
> >> (8123 => 8124)
> >>
> >>
> >> --- branches/sympa-6.2-branch/wwsympa/wwsympa.fcgi.in 2012-12-07
> >> 14:50:24 UTC (rev 8123)
> >> +++ branches/sympa-6.2-branch/wwsympa/wwsympa.fcgi.in 2012-12-07
> >> 19:18:15 UTC (rev 8124)
> >> @@ -6298,11 +6298,14 @@
> >>
> >> if(($in{'editcolors'})&&($in{'subaction'} eq 'test')){
> >>
> >> + ## Do not include language subdirectories.
> >> + ## The css.tt2 by each languages will override styles in main CSS.
> >> + my $tt2_include_path = $robot->make_tt2_include_path('web_tt2');
> >> +
> >> return unless ($in{'custom_color_number'} =~ /color_/);
> >> $param->{'custom_color_number'} = $in{'custom_color_number'};
> >> $param->{'custom_color_value'} = $in{'custom_color_value'};
> >> - $param->{'custom_css'} =
> >> $css_url.'/'.$param->{'user'}{'email'}.'.style.css';
> >> - $session->{'custom_css'} = $param->{'custom_css'} ;
> >> + $session->{'custom_css'} =
> >> $css_url.'/'.$param->{'user'}{'email'}.'.style.css';
> >>
> >> $session->{$in{'custom_color_number'}} = $in{'custom_color_value'};
> >>
> >> @@ -6314,12 +6317,24 @@
> >> }
> >> }
> >>
> >> + $param->{'session'}{'custom_css'} = $session->{'custom_css'};
> >> + ## generate custom CSS
> >> + my $custom_css;
> >> + unless (tt2::parse_tt2($param, 'css.tt2', \$custom_css,
> >> + $tt2_include_path
> >> + )) {
> >> + my $error = &tt2::get_error();
> >> + $param->{'tt2_error'} = $error;
> >> + &wwslog('info', "do_skinsedit : error while parsing custom CSS");
> >> + undef $custom_css;
> >> + }
> >> + $param->{'custom_css'} = $custom_css;
> >> }
> >> if (($in{'subaction'} eq 'install')||($in{'installcss'})) {
> >>
> >> - my $lang = &Language::Lang2Locale($param->{'lang'});
> >> - my $tt2_include_path =
> >> - $robot->make_tt2_include_path('web_tt2', $lang);
> >> + ## Do not include language subdirectories.
> >> + ## The css.tt2 by each languages will override styles in main CSS.
> >> + my $tt2_include_path = $robot->make_tt2_include_path('web_tt2');
> >>
> >> my $date= time;
> >> my $style_file;
> >> @@ -17496,9 +17511,9 @@
> >> printf "Content-type: text/css\n\n";
> >> $param->{'css'} = $in{'file'};
> >>
> >> - my $lang = &Language::Lang2Locale($param->{'lang'});
> >> - my $tt2_include_path =
> >> - $robot->make_tt2_include_path('web_tt2', $lang);
> >> + ## Do not include language subdirectories.
> >> + ## The css.tt2 by each languages will override styles in main CSS.
> >> + my $tt2_include_path = $robot->make_tt2_include_path('web_tt2');
> >>
> >> unless (&tt2::parse_tt2($param,'css.tt2' ,\*STDOUT,
> >> $tt2_include_path)) {
> >> my $error = &tt2::get_error();
> >
>


--
株式会社 コンバージョン セキュリティ&OSSソリューション部 池田荘児
〒231-0004 神奈川県横浜市中区元浜町3-21-2 ヘリオス関内ビル7F
e-mail address@concealed TEL 045-640-3550
http://www.conversion.co.jp/



Archive powered by MHonArc 2.6.19+.

Top of Page