Re: language debian website
On Wed, Aug 06, 2003 at 01:12:45PM +0200, Gerfried Fuchs wrote:
> * Matt Kraai <kraai@alumni.cmu.edu> [2003-08-05 08:05]:
> > On Tue, Aug 05, 2003 at 04:42:06PM +0200, Gerfried Fuchs wrote:
> >> Alright, at least the anquors are added[1], I'm not sure about where to
> >> put a toc of the browser to, where it would fit best. Any ideas?
> >
> > It should be a subtable of the table of contents at the top of the
> > page, but I don't think the toc template can handle that.
>
> Of course it can :) See it in the attached patch, the wording can of
> course be changed. Personally I would like to not have it as a html
> list but as a comma seperated list, but that unfortunately isn't
> possible with the toc template.
Of course it can :)
In intro/cn.wml, I only added the
<define-tag toc-item-formatting endtag="required">[%body]</define-tag>
line on your patched version.
Denis
Index: intro/cn.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/intro/cn.wml,v
retrieving revision 1.47
diff -u -r1.47 cn.wml
--- intro/cn.wml 5 Aug 2003 14:38:01 -0000 1.47
+++ intro/cn.wml 6 Aug 2003 21:21:00 -0000
@@ -1,4 +1,8 @@
#use wml::debian::template title="Debian web site in different languages" BARETITLE=true
+#use wml::debian::toc
+
+<define-tag toc-title-formatting endtag="required">%body</define-tag>
+<define-tag toc-item-formatting endtag="required">[%body]</define-tag>
<P>Obviously, not everyone in the world uses the same language. As the
web grows it is becoming more common to find pages that are available
@@ -12,6 +16,8 @@
<ul>
<li><a href="#fix">What to do if a Debian web page is in the wrong language</a>
<li><a href="#howtoset">How to set up the language settings</a>
+<li>Where to change the settings for the following browser:
+ <toc-display />
</ul>
<hr>
@@ -114,7 +120,9 @@
<DL compact>
-<DT><strong><a name="mozilla">Mozilla</a> / <a name="netscape">Netscape 4.x</a> and later versions</strong>
+<DT><strong><toc-add-entry name="mozilla">Mozilla</toc-add-entry> /
+<toc-add-entry name="netscape">Netscape 4.x</toc-add-entry> and later
+versions</strong>
<DD>
<pre>
Edit -> Preferences -> Navigator -> Languages
@@ -123,7 +131,7 @@
language from the available choices. A number of people
reported problems because they typed in the language by hand.
-<dt><strong><a name="ie">Internet Explorer</a></strong>
+<dt><strong><toc-add-entry name="ie">Internet Explorer</toc-add-entry></strong>
<dd>Windows:
<pre>
Tools or View or Extras -> Internet Options -> (General) Languages
@@ -135,7 +143,7 @@
</pre>
</dd>
-<DT><strong><a name="opera">Opera</a></strong>
+<DT><strong><toc-add-entry name="opera">Opera</toc-add-entry></strong>
<DD>Windows:
<pre>
File -> Preferences -> Languages
@@ -145,14 +153,14 @@
File -> Preferences -> Document -> Languages
</pre>
-<dt><strong><a name="galeon">Galeon</a></strong></dt>
+<dt><strong><toc-add-entry name="galeon">Galeon</toc-add-entry></strong></dt>
<dd>
<pre>
Settings -> Preferences -> Rendering -> Languages
</pre>
</dd>
-<dt><strong><a name="konqueror">Konqueror</a></strong></dt>
+<dt><strong><toc-add-entry name="konqueror">Konqueror</toc-add-entry></strong></dt>
<dd>
If you want to set only one language, it is quite easy, just select it
in the KDE Control Center.
@@ -166,7 +174,7 @@
Remember to restart your KDE session in order to apply the changes.
</dd>
-<DT><strong><a name="lynx">lynx</a></strong>
+<DT><strong><toc-add-entry name="lynx">lynx</toc-add-entry></strong>
<DD>You can either edit the <kbd>preferred_language</kbd> variable in your
<kbd>.lynxrc</kbd> or set it using the 'O' command while in lynx.
@@ -176,25 +184,25 @@
preferred_language=fr; q=1.0, en; q=0.5
</pre>
-<DT><strong><a name="w3">W3</a></strong> (emacs based web browser)
+<DT><strong><toc-add-entry name="w3">W3</toc-add-entry></strong> (emacs based web browser)
<DD>
<pre>(setq url-mime-language-string "preferred_language=fr; q=1.0, en; q=0.5")</pre>
or using the custom package (assuming URL version p4.0pre.14):
<pre>Hypermedia -> URL -> Mime -> Mime Language String...</pre>
-<DT><strong><a name="icab">iCab</a></strong>
+<DT><strong><toc-add-entry name="icab">iCab</toc-add-entry></strong>
<DD>
<pre>
Edit -> Preferences -> Browser -> Fonts,Languages
</pre>
-<DT><strong><a name="w3m">W3M</a></strong>
+<DT><strong><toc-add-entry name="w3m">W3M</toc-add-entry></strong>
<DD>
<pre>
Options (o) -> Other Behavior -> Accept-Language
</pre>
-<DT><strong><a name="netscape3">Netscape 3.x</a></strong>
+<DT><strong><toc-add-entry name="netscape3">Netscape 3.x</toc-add-entry></strong>
<DD>Add
<pre>
*httpAcceptLanguage: [preferred_language string]
Index: template/debian/toc.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/toc.wml,v
retrieving revision 1.7
diff -u -r1.7 toc.wml
--- template/debian/toc.wml 6 Aug 2003 11:59:54 -0000 1.7
+++ template/debian/toc.wml 6 Aug 2003 21:21:00 -0000
@@ -1,5 +1,9 @@
<set-var toc:_cnt=0 />
+<define-tag toc-item-formatting$(TOCNAME) endtag="required" whitespace="delete">
+<li>%body</li>
+</define-tag>
+
<define-tag toc-add-entry$(TOCNAME) endtag="required">
<preserve name />
<preserve href />
@@ -7,7 +11,7 @@
<ifeq <get-var name /> "" "<increment toc:_cnt />
<set-var name="l<get-var toc:_cnt />" />" />
<toc-title-formatting$(TOCNAME)><a name="<get-var name/>"<when <get-var href />> href="<get-var href />"</when>>%body</a></toc-title-formatting$(TOCNAME)>
-{#ToC_questions$(TOCNAME)#: <li><a href="#<get-var name/>">%body</a></li>
+{#ToC_questions$(TOCNAME)#: <toc-item-formatting$(TOCNAME)><a href="#<get-var name/>">%body</a></toc-item-formatting$(TOCNAME)>
:##}
<restore name />
<restore href />
Reply to: