Complete.Org: Mailing Lists: Archives: freeciv-i18n: February 2003:
[freeciv-i18n] Manual serving script vers. 2
Home

[freeciv-i18n] Manual serving script vers. 2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv I18n <freeciv-i18n@xxxxxxxxxxx>, webmaster@xxxxxxxxxxxxxxx, Brandon Craig Rhodes <brandon@xxxxxxxxxxxxxx>
Subject: [freeciv-i18n] Manual serving script vers. 2
From: Christian Knoke <chrisk@xxxxxxxx>
Date: Mon, 24 Feb 2003 14:46:34 +0100

Hello,

I've revised my script I posted some weeks ago. It is in use to
serve the german manual pages now.

The purpose of this is to have only one html representaion
of the manual pages, instead of three (for three tilesets).

The script serves the html game manual pages and, while doing this,
adapts the href links, adapts the img links to point to the correct
tileset, and adds the img size attributes on the fly.

It does not create a pngsize file anymore. No special action needs
to be taken to install it any more.

It can be used independently for the /manual directory and the
/website_l10n/*/manual directories, with the restriction, that the
fallback mechanism for non-existent localized manual pages won't
work, until it is installed in the base /manual directory.

The edit process for the manual is slightly affected: No width/height
attributes need to/should be present any more. If you do not use a local
server to view the pages, I suggest some links from the manual/trident
dir to the manual/html/*.html files, to load the pages via file://

The rest of this mail describes the installation. If you have any
questions, please ask.

Christian


--------------------------------------------------------------------
The installation process is identical for the base (international)
dir and the localized dirs. Again: it can be used independently.

1. mkdir manual/html
2. cd html
3. cp ../trident/*.html ../trident/style.css .

4. run manphp2.sh script (included below) to modify html files

5. cd ../
6. copy manual.phtml from /website_l10n/de/manual/ here.

7. adapt links in index.phtml as shown in /website_l10n/de/manual/index.phtml

NOTE: Once manual.phtml is present in the base /manual directory, you
can/should replace the file in the localized dir with the following
wrapper; this eases further development:

--manual.phtml-----------------------------------------------------------
<?php include($_SERVER["DOCUMENT_ROOT"] . "/manual/manual.phtml"); ?>
-------------------------------------------------------------------------

--manphp2.sh-------------------------------------------------------------
#!/bin/bash

for i in *.html ; do
sed 's% height=".*" width=".*">%>%g' < $i > $i.new
mv $i.new $i
sed 's/href="game.html/href="game-over.html/g' < $i > $i.new
mv $i.new $i
sed 's%="style.css"%="html/style.css"%g' < $i > $i.new
mv $i.new $i
sed 's%href="/manual/"%href="./"%g' < $i > $i.new
mv $i.new $i
done
mv game.html game-over.html
-------------------------------------------------------------------------

-------------------------------------------------------------------------

-- 
Christian Knoke     * * *      http://www.enter.de/~c.knoke/
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.


[Prev in Thread] Current Thread [Next in Thread]
  • [freeciv-i18n] Manual serving script vers. 2, Christian Knoke <=