[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Patch (was: Re: Naming schemes of DDP documents)



On Sun, Nov 02, 2003 at 08:30:54PM +0100, Frank Lichtenheld wrote:
> Ok, if I interpret your mail (and the ddp policy draft )correctly 
> the answer is actually
> "I like 1, and that also what's in the ddp-policy draft. But
> bug reports are not quite good, because there is no consensus yet
> and the policy is still a draft". Correct me if I got anything
> wrong.
> 
> Based on this I will propose a patch for the www pages which enables
> them to support both naming schemes. This will at least give the users 
> correct links...

Patch attached. Comments welcome.

Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
Index: devel-manuals.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/doc/devel-manuals.wml,v
retrieving revision 1.24
diff -u -r1.24 devel-manuals.wml
--- devel-manuals.wml	29 Jan 2003 06:26:23 -0000	1.24
+++ devel-manuals.wml	3 Nov 2003 11:14:52 -0000
@@ -121,7 +121,7 @@
   <availability>
   <inpackage "maint-guide">
   <inddpcvs name="maint-guide" langs="en de es fr it ja pl pt-br ru"
-            formats="html txt pdf ps">
+            formats="html txt pdf ps" naming="locale" />
   </availability>
 </doctable>
 </blockquote>
Index: manuals.defs
===================================================================
RCS file: /cvs/webwml/webwml/english/doc/manuals.defs,v
retrieving revision 1.44
diff -u -r1.44 manuals.defs
--- manuals.defs	14 Feb 2003 15:18:04 -0000	1.44
+++ manuals.defs	3 Nov 2003 11:14:53 -0000
@@ -60,7 +60,7 @@
 </define-tag>
 
 <define-tag inddpcvs whitespace=delete>
-  <preserve name index baselink langs formats path loc txt version cvsname />
+  <preserve name index baselink langs formats path loc txt version cvsname naming />
   <set-var %attributes />
   <if <get-var name /> "" <exit message="you must pass a name to the inddpcvs tag" /> />
   #   Default values
@@ -72,6 +72,7 @@
   <defvar formats html />
   <defvar path "manuals/<get-var name />" />
   <defvar cvsname <get-var name /> />
+  <defvar naming default />
 
   <subst-in-var langs " " "\n" />
   <subst-in-var formats " " "\n" />
@@ -98,13 +99,19 @@
     </when>
     :
     <foreach format formats>
+      <set-var extlang=<get-var lang /> />
+      <when <match <get-var naming /> "locale" />>
+      	<when <match <get-var format /> "(dvi|txt|pdf|ps)" />>
+		<subst-in-var extlang "(\w\w)-(\w\w)" "\\1_<:=uc("\\2"):>" />
+      	</when>
+      </when>
       &nbsp;
       <if <match <get-var format /> "^html$" action=report />
         <set-var baselink=<get-var index /> />
         <set-var baselink=<get-var name /> />
       />
       <if <get-var add-lang-ext />
-        <set-var loc="<get-var baselink />.<get-var lang />.<get-var format />" />
+        <set-var loc="<get-var baselink />.<get-var extlang />.<get-var format />" />
         <set-var loc="<get-var baselink />.<get-var format />" />
       />
       <when <match <get-var add-lang-ext /> "^$" action=report />>
@@ -135,7 +142,7 @@
   #      <a href="http://cvs.debian.org/ddp/manuals.sgml/[package]/?cvsroot=debian-doc";>[package]</a>
   <gettext domain="doc">Use <a href="cvs">CVS</a> to download the SGML source text for <get-var ddp_pkg_loc />.</gettext>
 
-  <restore name index baselink langs formats path loc txt version cvsname />
+  <restore name index baselink langs formats path loc txt version cvsname naming />
 </define-tag>
 
 <define-tag inbfdcvs>
Index: user-manuals.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/doc/user-manuals.wml,v
retrieving revision 1.70
diff -u -r1.70 user-manuals.wml
--- user-manuals.wml	16 Sep 2003 07:43:50 -0000	1.70
+++ user-manuals.wml	3 Nov 2003 11:14:54 -0000
@@ -36,7 +36,7 @@
   <availability>
   <inpackage "doc-debian">
   <inddpcvs name="debian-faq" langs="en pt-br ru it pl" cvsname="faq"
-            formats="html txt pdf ps">
+            formats="html txt pdf ps" naming="locale" />
   </availability>
 </doctable>
 </blockquote>
@@ -158,7 +158,7 @@
   <availability>
   <inpackage "apt-howto">
   <inddpcvs name="apt-howto" langs="en fr de it ja ko pl pt-br ru es"
-	    formats="html txt pdf ps">
+	    formats="html txt pdf ps" naming="locale" />
   </availability>
 </doctable>
 </blockquote>

Attachment: signature.asc
Description: Digital signature


Reply to: