press-release Makefile, 1.5, 1.6 fdp-pr.xsl, 1.6, 1.7 params.xsl.in, 1.2, 1.3

Tommy Reynolds (jtr) fedora-docs-commits at redhat.com
Wed Mar 15 06:59:02 UTC 2006


Author: jtr

Update of /cvs/docs/press-release
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2753

Modified Files:
	Makefile fdp-pr.xsl params.xsl.in 
Log Message:
Try to get the automatic date generation a little more localized.



Index: Makefile
===================================================================
RCS file: /cvs/docs/press-release/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Makefile	15 Mar 2006 06:20:58 -0000	1.5
+++ Makefile	15 Mar 2006 06:58:54 -0000	1.6
@@ -42,9 +42,14 @@
 # Compute the rules to transform our XML documents into both PDF and TXT
 # forms
 define	OUTPUT_template
+.PHONY:	pdf-${1}
+
+pdf-${1}:: ${DOC_BASE}-${1}.pdf
 
 ${DOC_BASE}-$(1).pdf::	${DOC_BASE}-$(1).xml params.xsl.in ${XSL}
-	LC_ALL=${1}.UTF-8 ${SED} -e "s|DATE|$$(date +'%x %X')|" 	\
+	LC_ALL=${1}.UTF-8 ${SED} 					\
+	       -e "s|DATE|$$(shell LC_ALL=${1} date +'%x %X')|" 	\
+	       -e "s|LANG|${1}|"					\
 	       params.xsl.in >params.xsl
 	LC_ALL=${1}.UTF-8 ${XMLTO} -x ${XSL} ${XMLTOFLAGS} pdf 		\
 	       ${DOC_BASE}-$(1).xml
@@ -53,10 +58,16 @@
 distclean::
 	${RM} ${DOC_BASE}-${1}.pdf
 
+# This assumes w3m(1) is installed.
 XMLPOSTFLAGS=-p '-cols 72'
 
+.PHONY:	txt-${1}
+
+txt-${1}:: ${DOC_BASE}-${1}.txt
+
 ${DOC_BASE}-$(1).txt::	${DOC_BASE}-$(1).xml params.xsl.in ${XSL}
-	LC_ALL=${1}.UTF-8 ${SED} -e "s|DATE|$$(date +'%x %X')|" 	\
+	LC_ALL=${1}.UTF-8 ${SED} 					\
+	       -e "s|DATE|$$(shell LC_ALL=${1} date +'%x %X')|"		\
 	       params.xsl.in >params.xsl
 	LC_ALL=${1}.UTF-8 ${XMLTO} -x ${XSL} ${XMLTOFLAGS} $${XMLPOSTFLAGS} \
 	       txt ${DOC_BASE}-$(1).xml
@@ -69,8 +80,10 @@
 $(foreach LOCALE,${LANGUAGES},$(eval $(call OUTPUT_template,${LOCALE})))
 ########################################################################
 # Always generate the current date.
-params.xsl: params.xsl.in
-	${SED} -e "s|DATE|$$(date +'%x %X')|" $< >$@.tmp && move-if-change $@.tmp $@
+params.xsl: params.xsl.in Makefile
+	${SED} -e "s|DATE|$$(date +'%x %X')|" 				\
+	       -e "s|LANG|${PRI_LANG}|"					\
+		$< >$@.tmp && move-if-change $@.tmp $@
 ########################################################################
 # The ${DOC_BASE}.pot target produces a new .POT file everytime the
 # original XML file is updated.


Index: fdp-pr.xsl
===================================================================
RCS file: /cvs/docs/press-release/fdp-pr.xsl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- fdp-pr.xsl	15 Mar 2006 06:20:58 -0000	1.6
+++ fdp-pr.xsl	15 Mar 2006 06:58:54 -0000	1.7
@@ -8,6 +8,7 @@
 >
   <xsl:output encoding="UTF-8" indent="yes" media-type="letter" omit-xml-declaration="no" standalone="no"/>
 
+  <xsl:param name="lang">en_US</xsl:param>
   <xsl:param name="today">2006-02-06</xsl:param>
   <xsl:param name="font">Verdana</xsl:param>
   <xsl:param name="font.size.header">12pt</xsl:param>
@@ -15,7 +16,7 @@
   <xsl:param name="font.size.footer">12pt</xsl:param>
 
   <xsl:template match="/">
-    <fo:root>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" language="$lang">
       <fo:layout-master-set>
         <fo:simple-page-master master-name="Letter" margin-bottom="0.3in" margin-left="0.3in" margin-right="0.3in" margin-top="0.6in" page-height="11in" page-width="8.5in">
           <fo:region-body margin-bottom="1.5in" margin-left="0.6in" margin-right="0.6in" margin-top="0.5in"/>
@@ -42,7 +43,7 @@
                   <fo:block>
                     <xsl:value-of select="/fdp-pr/@org"/>
                   </fo:block>
-                  <fo:block space-before="0.50em">
+                  <fo:block space-before="0.25em">
                     <xsl:value-of select="/fdp-pr/@kind"/>
                   </fo:block>
                 </fo:table-cell>
@@ -58,8 +59,9 @@
               <fo:table-row>
                 <fo:table-cell text-align="left">
                   <fo:block>
+                    <xsl:text>Page </xsl:text>
                     <fo:page-number/>
-                    <xsl:text>/</xsl:text>
+                    <xsl:text> of </xsl:text>
                     <fo:page-number-citation ref-id="EOF"/>
                   </fo:block>
                 </fo:table-cell>


Index: params.xsl.in
===================================================================
RCS file: /cvs/docs/press-release/params.xsl.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- params.xsl.in	7 Feb 2006 17:30:59 -0000	1.2
+++ params.xsl.in	15 Mar 2006 06:58:54 -0000	1.3
@@ -5,6 +5,7 @@
     The 'today' value is provided by the Makefile, so please do not edit this definition yourself!
   -->
   <xsl:param name="today">DATE</xsl:param>
+  <xsl:param name="lang">LANG</xsl:param>
   <!--
     <xsl:param name="font">Verdana</xsl:param>
     <xsl:param name="font.size.header">12pt</xsl:param>




More information about the docs-commits mailing list