r68665 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68664‎ | r68665 | r68666 >
Date:16:19, 28 June 2010
Author:liangent
Status:ok
Tags:
Comment:
Add separated zh-hans / zh-hant pages following gmq's pattern
Modified paths:
  • /trunk/tools/planet/zh/config.ini (modified) (history)
  • /trunk/tools/planet/zh/templates/index.html.tmpl (modified) (history)
  • /trunk/tools/planet/zh/templates/index.zh-hans.html.tmpl (added) (history)
  • /trunk/tools/planet/zh/templates/index.zh-hant.html.tmpl (added) (history)
  • /trunk/tools/planet/zh/www/planet.css (modified) (history)

Diff [purge]

Index: trunk/tools/planet/zh/config.ini
@@ -20,7 +20,7 @@
2121 log_level = ERROR
2222
2323 # template_files: Space-separated list of output template files
24 -template_files = /usr/local/planet/wikimedia/zh/templates/index.html.tmpl /usr/local/planet/wikimedia/zh/templates/atom.xml.tmpl /usr/local/planet/wikimedia/zh/templates/rss20.xml.tmpl /usr/local/planet/wikimedia/zh/templates/rss10.xml.tmpl /usr/local/planet/wikimedia/zh/templates/opml.xml.tmpl /usr/local/planet/wikimedia/zh/templates/foafroll.xml.tmpl
 24+template_files = /usr/local/planet/wikimedia/zh/templates/index.html.tmpl /usr/local/planet/wikimedia/zh/templates/index.zh-hans.html.tmpl /usr/local/planet/wikimedia/zh/templates/index.zh-hant.html.tmpl /usr/local/planet/wikimedia/zh/templates/atom.xml.tmpl /usr/local/planet/wikimedia/zh/templates/rss20.xml.tmpl /usr/local/planet/wikimedia/zh/templates/rss10.xml.tmpl /usr/local/planet/wikimedia/zh/templates/opml.xml.tmpl /usr/local/planet/wikimedia/zh/templates/foafroll.xml.tmpl
2525
2626 # The following provide defaults for each template:
2727 # output_dir: Directory to place output files
Index: trunk/tools/planet/zh/www/planet.css
@@ -5,6 +5,11 @@
66 font-size: smaller;
77 }
88
 9+div.zh-langlinks {
 10+ float:right;
 11+ margin-right:1em;
 12+}
 13+
914 a img {
1015 border: 0;
1116 }
Index: trunk/tools/planet/zh/templates/index.html.tmpl
@@ -21,7 +21,10 @@
2222 </TMPL_IF>
2323 </head>
2424
25 -<body>
 25+<body>
 26+
 27+<div class="zh-langlinks"><a href="index.zh-hans.html">中文 (简体)</a> · <a href="index.zh-hant.html">中文 (繁體)</a></div>
 28+
2629 <h1><TMPL_VAR name></h1>
2730
2831 <TMPL_LOOP Items>
Index: trunk/tools/planet/zh/templates/index.zh-hans.html.tmpl
@@ -0,0 +1,169 @@
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 3+<html>
 4+
 5+### Fancy Planet HTML template.
 6+###
 7+### When combined with the stylesheet and images in the output/ directory
 8+### of the Planet source, this gives you a much prettier result than the
 9+### default examples template and demonstrates how to use the config file
 10+### to support things like faces
 11+###
 12+### For documentation on the more boring template elements, see
 13+### examples/config.ini and examples/index.html.tmpl in the Planet source.
 14+
 15+<head>
 16+<title><TMPL_VAR name></title>
 17+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 18+<meta name="generator" content="<TMPL_VAR generator ESCAPE="HTML">">
 19+<link rel="stylesheet" href="planet.css" type="text/css">
 20+<TMPL_IF feedtype>
 21+<link rel="alternate" href="<TMPL_VAR feed ESCAPE="HTML">" title="<TMPL_VAR channel_title_plain ESCAPE="HTML">" type="application/<TMPL_VAR feedtype>+xml">
 22+</TMPL_IF>
 23+</head>
 24+
 25+<body>
 26+
 27+<div class="zh-langlinks"><b>中文 (简体)</b> · <a href="index.zh-hant.html">中文 (繁體)</a></div>
 28+
 29+<h1><TMPL_VAR name></h1>
 30+
 31+<TMPL_LOOP Items>
 32+<TMPL_IF new_date>
 33+<TMPL_UNLESS __FIRST__>
 34+### End <div class="channelgroup">
 35+</div>
 36+### End <div class="daygroup">
 37+</div>
 38+</TMPL_UNLESS>
 39+<div class="daygroup">
 40+<h2><TMPL_VAR new_date></h2>
 41+</TMPL_IF>
 42+
 43+<TMPL_IF new_channel>
 44+<TMPL_UNLESS new_date>
 45+### End <div class="channelgroup">
 46+</div>
 47+</TMPL_UNLESS>
 48+<div class="channelgroup">
 49+
 50+### Planet provides template variables for *all* configuration options for
 51+### the channel (and defaults), even if it doesn't know about them. We
 52+### exploit this here to add hackergotchi faces to our channels. Planet
 53+### doesn't know about the "face", "facewidth" and "faceheight" configuration
 54+### variables, but makes them available to us anyway.
 55+
 56+<h3><a href="<TMPL_VAR channel_link ESCAPE="HTML">" title="<TMPL_VAR channel_title_plain ESCAPE="HTML">"><TMPL_VAR channel_name></a></h3>
 57+<TMPL_IF channel_face>
 58+<img class="face" src="images/<TMPL_VAR channel_face ESCAPE="HTML">" width="<TMPL_VAR channel_facewidth ESCAPE="HTML">" height="<TMPL_VAR channel_faceheight ESCAPE="HTML">" alt="">
 59+</TMPL_IF>
 60+</TMPL_IF>
 61+
 62+
 63+<div class="entrygroup" id="<TMPL_VAR id>"<TMPL_IF channel_language> lang="<TMPL_VAR channel_language>"</TMPL_IF>>
 64+<TMPL_IF title>
 65+<h4<TMPL_IF title_language> lang="<TMPL_VAR title_language>"</TMPL_IF>><a href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_VAR title></a></h4>
 66+</TMPL_IF>
 67+<div class="entry">
 68+<div class="content"<TMPL_IF content_language> lang="<TMPL_VAR content_language>"</TMPL_IF>>
 69+<TMPL_VAR content>
 70+</div>
 71+
 72+### Planet also makes available all of the information from the feed
 73+### that it can. Use the 'planet-cache' tool on the cache file for
 74+### a particular feed to find out what additional keys it supports.
 75+### Comment extra fields are 'author' and 'category' which we
 76+### demonstrate below.
 77+
 78+<p class="date">
 79+<a href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_IF author>by <TMPL_VAR author> at </TMPL_IF><TMPL_VAR date><TMPL_IF category> under <TMPL_VAR category></TMPL_IF></a>
 80+</p>
 81+</div>
 82+</div>
 83+
 84+<TMPL_IF __LAST__>
 85+### End <div class="channelgroup">
 86+</div>
 87+### End <div class="daygroup">
 88+</div>
 89+</TMPL_IF>
 90+</TMPL_LOOP>
 91+
 92+
 93+<div class="sidebar">
 94+<img src="images/logo.png" width="135" height="135" alt="">
 95+<h2>订阅</h2>
 96+<ul><li>
 97+<a href="https://www.mediawiki.org/atom.xml">atom feed</A></li>
 98+<li><a href="https://www.mediawiki.org/rss10.xml">rss 1.0</A></li>
 99+<li><a href="https://www.mediawiki.org/rss20.xml">rss 2.0</a></li>
 100+</ul>
 101+
 102+<h2>关于</h2>
 103+
 104+Planet Wikimedia 是一个维基媒体计划参与者于他们的网志中发表的有关wiki的文章的内容聚合。<a href="http://meta.wikimedia.org/wiki/Planet_Wikimedia/zh">更多细节 ..</A>
 105+
 106+<h2>Bloggers</h2>
 107+<ul>
 108+<TMPL_LOOP Channels>
 109+<li>
 110+<a href="<TMPL_VAR url ESCAPE="HTML">" title="subscribe"><img src="images/feed-icon-10x10.png" alt="(feed)"></a> <a <TMPL_IF link>href="<TMPL_VAR link ESCAPE="HTML">" </TMPL_IF><TMPL_IF message>class="message" title="<TMPL_VAR message ESCAPE="HTML">"</TMPL_IF><TMPL_UNLESS message>title="<TMPL_VAR title_plain ESCAPE="HTML">"</TMPL_UNLESS>><TMPL_VAR name></a>
 111+</li>
 112+</TMPL_LOOP>
 113+</ul>
 114+<P>
 115+<strong><a href="http://meta.wikimedia.org/wiki/Planet_Wikimedia/zh">加入您的网志</A> &ndash; <a href="http://meta.wikimedia.org/wiki/Planet_Wikimedia/New_language">请求新语言</A></strong>
 116+</P>
 117+<p>
 118+<strong>上次更新:</strong><br>
 119+<TMPL_VAR date><br>
 120+所有时间为UTC时间。<br>
 121+<br>
 122+Powered by:<br>
 123+<a href="http://www.planetplanet.org/"><img src="images/planet.png" width="80" height="15" alt="Planet" border="0"></a>
 124+</p>
 125+<P>
 126+<H2>声明</H2>
 127+Planet Wikimedia 是由非牟利的<a href="http://wikimediafoundation.org/">维基媒体基金会</A>操作,促进维基媒体社群的会员以便分享信息和意见。除非有额外表明,所有的贴文只会反映作者个人的意见。由网志中收集来的聚集是一个由电脑控制的程序,维基媒体基金会不会为这个联机社群的参与者所递交的任何材料而负责。
 128+</P>
 129+<p>
 130+<h2>Planetarium</h2>
 131+<ul>
 132+<li><a href="http://wikiblogplanet.com/">Wiki Blog Planet</a></li>
 133+<li><a href="http://www.planetapache.org/">Planet Apache</a></li>
 134+<li><a href="http://planet.debian.net/">Planet Debian</a></li>
 135+<li><a href="http://planet.freedesktop.org/">Planet freedesktop.org</a></li>
 136+<li><a href="http://planet.gnome.org/">Planet GNOME</a></li>
 137+<li><a href="http://planetsun.org/">Planet Sun</a></li>
 138+<li><a href="http://fedora.linux.duke.edu/fedorapeople/">Fedora People</a></li>
 139+<li><a href="http://www.planetplanet.org/">更多...</a></li>
 140+</ul>
 141+</p>
 142+<p>
 143+<h2>其它语言</h2>
 144+<ul>
 145+<li><a href="http://ar.planet.wikimedia.org">العربية</a></li>
 146+<li><a href="http://cs.planet.wikimedia.org">Česky</a></li>
 147+<li><a href="http://de.planet.wikimedia.org">Deutsch</a></li>
 148+<li><a href="http://en.planet.wikimedia.org">English</a></li>
 149+<li><a href="http://fr.planet.wikimedia.org">Français</a></li>
 150+<li><a href="http://gmq.planet.wikimedia.org">Scandinavian</a>
 151+<ul>
 152+<li><a href="http://gmq.planet.wikimedia.org/index.da.html">Dansk</a></li>
 153+<li><a href="http://gmq.planet.wikimedia.org/index.fo.html">Føroyskt</a></li>
 154+<li><a href="http://gmq.planet.wikimedia.org/index.is.html">Íslenska</a></li>
 155+<li><a href="http://gmq.planet.wikimedia.org/index.nb.html">Norsk (bokmål)</a></li>
 156+<li><a href="http://gmq.planet.wikimedia.org/index.nn.html">Norsk (nynorsk)</a></li>
 157+<li><a href="http://gmq.planet.wikimedia.org/index.sv.html">Svenska</a></li>
 158+</ul></li>
 159+<li><a href="http://it.planet.wikimedia.org">Italiano</a></li>
 160+<li><a href="http://pl.planet.wikimedia.org">Polski</a></li>
 161+<li><a href="http://pt.planet.wikimedia.org">Português</a></li>
 162+<li><a href="http://ro.planet.wikimedia.org">Română</a></li>
 163+<li><a href="http://ru.planet.wikimedia.org">Русский</a></li>
 164+<li><a href="http://sr.planet.wikimedia.org">Српски / Srpski</a></li>
 165+</ul>
 166+</p>
 167+</div>
 168+</body>
 169+
 170+</html>
Index: trunk/tools/planet/zh/templates/index.zh-hant.html.tmpl
@@ -0,0 +1,168 @@
 2+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 3+<html>
 4+
 5+### Fancy Planet HTML template.
 6+###
 7+### When combined with the stylesheet and images in the output/ directory
 8+### of the Planet source, this gives you a much prettier result than the
 9+### default examples template and demonstrates how to use the config file
 10+### to support things like faces
 11+###
 12+### For documentation on the more boring template elements, see
 13+### examples/config.ini and examples/index.html.tmpl in the Planet source.
 14+
 15+<head>
 16+<title><TMPL_VAR name></title>
 17+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 18+<meta name="generator" content="<TMPL_VAR generator ESCAPE="HTML">">
 19+<link rel="stylesheet" href="planet.css" type="text/css">
 20+<TMPL_IF feedtype>
 21+<link rel="alternate" href="<TMPL_VAR feed ESCAPE="HTML">" title="<TMPL_VAR channel_title_plain ESCAPE="HTML">" type="application/<TMPL_VAR feedtype>+xml">
 22+</TMPL_IF>
 23+</head>
 24+
 25+<body>
 26+
 27+<div class="zh-langlinks"><a href="index.zh-hans.html">中文 (简体)</a> · <b>中文 (繁體)</b></div>
 28+
 29+<h1><TMPL_VAR name></h1>
 30+
 31+<TMPL_LOOP Items>
 32+<TMPL_IF new_date>
 33+<TMPL_UNLESS __FIRST__>
 34+### End <div class="channelgroup">
 35+</div>
 36+### End <div class="daygroup">
 37+</div>
 38+</TMPL_UNLESS>
 39+<div class="daygroup">
 40+<h2><TMPL_VAR new_date></h2>
 41+</TMPL_IF>
 42+
 43+<TMPL_IF new_channel>
 44+<TMPL_UNLESS new_date>
 45+### End <div class="channelgroup">
 46+</div>
 47+</TMPL_UNLESS>
 48+<div class="channelgroup">
 49+
 50+### Planet provides template variables for *all* configuration options for
 51+### the channel (and defaults), even if it doesn't know about them. We
 52+### exploit this here to add hackergotchi faces to our channels. Planet
 53+### doesn't know about the "face", "facewidth" and "faceheight" configuration
 54+### variables, but makes them available to us anyway.
 55+
 56+<h3><a href="<TMPL_VAR channel_link ESCAPE="HTML">" title="<TMPL_VAR channel_title_plain ESCAPE="HTML">"><TMPL_VAR channel_name></a></h3>
 57+<TMPL_IF channel_face>
 58+<img class="face" src="images/<TMPL_VAR channel_face ESCAPE="HTML">" width="<TMPL_VAR channel_facewidth ESCAPE="HTML">" height="<TMPL_VAR channel_faceheight ESCAPE="HTML">" alt="">
 59+</TMPL_IF>
 60+</TMPL_IF>
 61+
 62+
 63+<div class="entrygroup" id="<TMPL_VAR id>"<TMPL_IF channel_language> lang="<TMPL_VAR channel_language>"</TMPL_IF>>
 64+<TMPL_IF title>
 65+<h4<TMPL_IF title_language> lang="<TMPL_VAR title_language>"</TMPL_IF>><a href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_VAR title></a></h4>
 66+</TMPL_IF>
 67+<div class="entry">
 68+<div class="content"<TMPL_IF content_language> lang="<TMPL_VAR content_language>"</TMPL_IF>>
 69+<TMPL_VAR content>
 70+</div>
 71+
 72+### Planet also makes available all of the information from the feed
 73+### that it can. Use the 'planet-cache' tool on the cache file for
 74+### a particular feed to find out what additional keys it supports.
 75+### Comment extra fields are 'author' and 'category' which we
 76+### demonstrate below.
 77+
 78+<p class="date">
 79+<a href="<TMPL_VAR link ESCAPE="HTML">"><TMPL_IF author>by <TMPL_VAR author> at </TMPL_IF><TMPL_VAR date><TMPL_IF category> under <TMPL_VAR category></TMPL_IF></a>
 80+</p>
 81+</div>
 82+</div>
 83+
 84+<TMPL_IF __LAST__>
 85+### End <div class="channelgroup">
 86+</div>
 87+### End <div class="daygroup">
 88+</div>
 89+</TMPL_IF>
 90+</TMPL_LOOP>
 91+
 92+
 93+<div class="sidebar">
 94+<img src="images/logo.png" width="135" height="135" alt="">
 95+<h2>訂閱</h2>
 96+<ul><li>
 97+<a href="https://www.mediawiki.org/atom.xml">atom feed</A></li>
 98+<li><a href="https://www.mediawiki.org/rss10.xml">rss 1.0</A></li>
 99+<li><a href="https://www.mediawiki.org/rss20.xml">rss 2.0</a></li>
 100+</ul>
 101+
 102+<h2>關於</h2>
 103+Planet Wikimedia 是一個維基媒體計劃參與者於他們的網誌中發表的有關wiki的文章的内容聚合。<a href="http://meta.wikimedia.org/wiki/Planet_Wikimedia/zh">更多細節 ..</A>
 104+
 105+<h2>Bloggers</h2>
 106+<ul>
 107+<TMPL_LOOP Channels>
 108+<li>
 109+<a href="<TMPL_VAR url ESCAPE="HTML">" title="subscribe"><img src="images/feed-icon-10x10.png" alt="(feed)"></a> <a <TMPL_IF link>href="<TMPL_VAR link ESCAPE="HTML">" </TMPL_IF><TMPL_IF message>class="message" title="<TMPL_VAR message ESCAPE="HTML">"</TMPL_IF><TMPL_UNLESS message>title="<TMPL_VAR title_plain ESCAPE="HTML">"</TMPL_UNLESS>><TMPL_VAR name></a>
 110+</li>
 111+</TMPL_LOOP>
 112+</ul>
 113+<P>
 114+<strong><a href="http://meta.wikimedia.org/wiki/Planet_Wikimedia/zh">加入您的網誌</A> &ndash; <a href="http://meta.wikimedia.org/wiki/Planet_Wikimedia/New_language">請求新語言</A></strong>
 115+</P>
 116+<p>
 117+<strong>上次更新:</strong><br>
 118+<TMPL_VAR date><br>
 119+所有時間為UTC時間。<br>
 120+<br>
 121+Powered by:<br>
 122+<a href="http://www.planetplanet.org/"><img src="images/planet.png" width="80" height="15" alt="Planet" border="0"></a>
 123+</p>
 124+<P>
 125+<H2>聲明</H2>
 126+Planet Wikimedia 是由非牟利的<a href="http://wikimediafoundation.org/">維基媒體基金會</A>操作,促進維基媒體社群的會員以便分享資訊和意見。除非有額外表明,所有的貼文只會反映作者個人的意見。由網誌中收集來的聚集是一個由電腦控制的程序,維基媒體基金會不會為這個線上社群的參與者所遞交的任何材料而負責。
 127+</P>
 128+<p>
 129+<h2>Planetarium</h2>
 130+<ul>
 131+<li><a href="http://wikiblogplanet.com/">Wiki Blog Planet</a></li>
 132+<li><a href="http://www.planetapache.org/">Planet Apache</a></li>
 133+<li><a href="http://planet.debian.net/">Planet Debian</a></li>
 134+<li><a href="http://planet.freedesktop.org/">Planet freedesktop.org</a></li>
 135+<li><a href="http://planet.gnome.org/">Planet GNOME</a></li>
 136+<li><a href="http://planetsun.org/">Planet Sun</a></li>
 137+<li><a href="http://fedora.linux.duke.edu/fedorapeople/">Fedora People</a></li>
 138+<li><a href="http://www.planetplanet.org/">更多...</a></li>
 139+</ul>
 140+</p>
 141+<p>
 142+<h2>其它語言</h2>
 143+<ul>
 144+<li><a href="http://ar.planet.wikimedia.org">العربية</a></li>
 145+<li><a href="http://cs.planet.wikimedia.org">Česky</a></li>
 146+<li><a href="http://de.planet.wikimedia.org">Deutsch</a></li>
 147+<li><a href="http://en.planet.wikimedia.org">English</a></li>
 148+<li><a href="http://fr.planet.wikimedia.org">Français</a></li>
 149+<li><a href="http://gmq.planet.wikimedia.org">Scandinavian</a>
 150+<ul>
 151+<li><a href="http://gmq.planet.wikimedia.org/index.da.html">Dansk</a></li>
 152+<li><a href="http://gmq.planet.wikimedia.org/index.fo.html">Føroyskt</a></li>
 153+<li><a href="http://gmq.planet.wikimedia.org/index.is.html">Íslenska</a></li>
 154+<li><a href="http://gmq.planet.wikimedia.org/index.nb.html">Norsk (bokmål)</a></li>
 155+<li><a href="http://gmq.planet.wikimedia.org/index.nn.html">Norsk (nynorsk)</a></li>
 156+<li><a href="http://gmq.planet.wikimedia.org/index.sv.html">Svenska</a></li>
 157+</ul></li>
 158+<li><a href="http://it.planet.wikimedia.org">Italiano</a></li>
 159+<li><a href="http://pl.planet.wikimedia.org">Polski</a></li>
 160+<li><a href="http://pt.planet.wikimedia.org">Português</a></li>
 161+<li><a href="http://ro.planet.wikimedia.org">Română</a></li>
 162+<li><a href="http://ru.planet.wikimedia.org">Русский</a></li>
 163+<li><a href="http://sr.planet.wikimedia.org">Српски / Srpski</a></li>
 164+</ul>
 165+</p>
 166+</div>
 167+</body>
 168+
 169+</html>

Status & tagging log