| Warren Post 2005-08-13, 7:28 pm |
| I have been using WebMake <http://webmake.taint.org/>, an HTML
preprocessor, for a couple of years with great success. But my current
project has me out of my depth and I need help from a WebMake guru.
Specifically, I am modifying an existing working .wmk file to turn a
monolingual site into a bilingual one. I believe I have the lang_tag
plugin working properly, but my output code -- which worked fine as a
monolingual site -- is no longer working as expected. The relevant portion
of my .wmk file is:
<!-- begin code sample -------------------------->
<!-- define location of source files ------------>
<contents src="../src"
name=".../*.txt"
namesubst="s/.txt//"
listname="srcfiles"
format="text/html"
/>
<!-- create output files ------------------------>
<template name="curlang">es</template> <attrdefault name="lang"
value="${curlang}" >
<for name="out"
values="${srcfiles}">
<out file="${out}.${curlang}.html"
name="${out}"
clean="pack addimgsizes fixcolors indent">
${header_es}
${${WebMake.OutName}}
${footer_es}
</out>
</for>
</attrdefault>
<template name="curlang">en</template> <attrdefault name="lang"
value="${curlang}" >
<for name="out"
values="${srcfiles}">
<out file="${out}.${curlang}.html"
name="${out}"
clean="pack addimgsizes fixcolors indent">
${header_en}
${${WebMake.OutName}}
${footer_en}
</out>
</for>
</attrdefault>
<!-- end code sample ------------------------------->
First, source files are defined. They are in the ../src directory or
subdirectories thereof, and have the extension .txt. One source file
corresponds to one html output file in each language (e.g. foo.txt maps to
foo.en.html and foo.es.html). This part is unchanged from my working
monolingual site code, and seems to be working as desired.
Then output files are created. Here I took my working monolingual site
code and ran through it twice, first for Spanish (es) and then for English
(en). The English pages (last to be output) are made as expected, but the
Spanish pages are made with English headers and footers. If I reverse the
order of output (English first, then Spanish) the problem is reversed: the
Spanish pages are fine and the English ones have Spanish headers and
footers.
Presumably my output files section is buggy but I can´t for the life of
me spot what my problem is. Any ideas?
TIA,
--
Warren Post
Santa Rosa de Copán, Honduras
http://srcopan.vze.com/
|