[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun GNUmakefile ChangeLog
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun GNUmakefile ChangeLog |
Date: |
Thu, 27 Sep 2012 07:46:35 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 12/09/27 07:46:35
Modified files:
gnun/server/gnun: GNUmakefile ChangeLog
Log message:
Add an SSI variable expanding to the URL of the English page
at the beginning of the generated page RT #741441.
(insert-ssi-vars): New function.
(generate-html): Use `insert-ssi-vars'.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.137&r2=1.138
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.292&r2=1.293
Patches:
Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -b -r1.137 -r1.138
--- GNUmakefile 26 Sep 2012 14:39:03 -0000 1.137
+++ GNUmakefile 27 Sep 2012 07:46:35 -0000 1.138
@@ -104,6 +104,21 @@
-e 's%\(<!--#include virtual=\"/$(inc)\)\(.html\" -->\)%\1.$(1)\2%g')
endef
+# Issue a command to add some SSI variable definitions at the beginning of
+# a HTML file produced with make-proto; template files don't contain
+# the comment about being automatically generated by GNUN, so they are
+# not affected.
+# Usage: $(call insert-ssi-vars,file.$(lang).html)
+define insert-ssi-vars
+$(SED) --in-place \
+ 's%<!-- This file is automatically generated by GNUnited Nations! -->%&\n\
+<!--#set var="ENGLISH_PAGE"\
+value="$(strip\
+ $(subst /po/,/,$(subst ${rootdir},,\
+ $(basename $(basename \
+$(1)))$(if $(findstring no, $(MULTIVIEWS)),,.en))).html)" -->\n%' $(1)
+endef
+
### Special variables for the `www' master templates ###
template-dir := $(rootdir)/server
template-files := head-include-2 \
@@ -457,6 +472,7 @@
$(call update-po,$(2),$(2:.$(1).po=.pot),$(1)); \
$(PO4A_TRANSLATE) $(PO4A-XHTMLFLAGS) $(PO4A-TRANSLATEFLAGS) \
--master $$< --po $(2) --localized $(3); \
+ $(call insert-ssi-vars,$(3)); \
$(call substitute-localized-includes,$(1)) $(3)
endef
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.292
retrieving revision 1.293
diff -u -b -r1.292 -r1.293
--- ChangeLog 26 Sep 2012 14:39:03 -0000 1.292
+++ ChangeLog 27 Sep 2012 07:46:35 -0000 1.293
@@ -1,3 +1,11 @@
+2012-09-27 Pavel Kharitonov <address@hidden>
+
+ Add an SSI variable expanding to the URL of the English page
+ at the beginning of the generated page RT #741441.
+
+ * GNUmakefile (insert-ssi-vars): New function.
+ (generate-html): Use `insert-ssi-vars'.
+
2012-09-26 Pavel Kharitonov <address@hidden>
Use `<span class="gnun-split"></span>' as a means to break long
- trans-coord/gnun/server/gnun GNUmakefile ChangeLog,
Pavel Kharitonov <=