Browse Source

Added automatic detection of translations and set it up on the portuguese pages as a burn-in test

svn path=/trunk/; revision=1918
pull/8/head
jneves 19 years ago
parent
commit
5df941d525
28 changed files with 111 additions and 244 deletions
  1. +5
    -4
      Makefile
  2. +0
    -8
      about/about.pt.xhtml
  3. +0
    -10
      background.pt.xhtml
  4. +0
    -10
      boilerplate.pt.xhtml
  5. +0
    -10
      contact/contact.pt.xhtml
  6. +0
    -10
      documents/documents.pt.xhtml
  7. +0
    -10
      documents/doi.pt.xhtml
  8. +0
    -10
      documents/freesoftware.pt.xhtml
  9. +0
    -11
      documents/gnuproject.pt.xhtml
  10. +0
    -10
      documents/preamble.pt.xhtml
  11. +0
    -9
      documents/whatwedo.pt.xhtml
  12. +0
    -12
      documents/whyfs.pt.xhtml
  13. +1
    -10
      documents/whyweexist.pt.xhtml
  14. +1
    -0
      fsfe.xsl
  15. +0
    -9
      gbn/index.pt.xhtml
  16. +0
    -10
      help/help.pt.xhtml
  17. +0
    -12
      index.pt.xhtml
  18. +0
    -10
      law/law.pt.xhtml
  19. +0
    -10
      mailman/index.pt.xhtml
  20. +3
    -0
      navigation.pt.xsl
  21. +0
    -11
      news/article2001-08-23-01.pt.xhtml
  22. +0
    -10
      news/article2001-10-20-01.pt.xhtml
  23. +0
    -8
      news/article2001-12-17-01.pt.xhtml
  24. +0
    -10
      news/article2002-01-18-01.pt.xhtml
  25. +0
    -10
      news/news.pt.xhtml
  26. +0
    -10
      press/index.pt.xhtml
  27. +0
    -10
      siae/siae.pt.xhtml
  28. +101
    -0
      tools/translate.sh

+ 5
- 4
Makefile View File

@@ -83,14 +83,15 @@ $(DEPAGES): %.html: %.xhtml fsfe.xsl navigation.de.xsl
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; (s/Date://, s/Author:/von/, s/\$$//g) if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
rm -f $$base.html-temp

$(PTPAGES): %.html: %.xhtml fsfe.xsl navigation.pt.xsl
$(PTPAGES): %.html: %.xhtml fsfe.xsl navigation.pt.xsl tools/translate.sh
@$(ECHO) "Building $@ ..."; \
path=$< ; \
base=`expr $$path : '\(.*\).xhtml'` ; \
filebase=`basename $$base` ; \
base=`expr $$path : '\(.*\).pt.xhtml'` ; \
filebase=`basename "$$base"` ; \
dir=`dirname $$path` ; \
root=`dirname $$path | perl -pe 'chop; s:([^/]+):..:g if($$_ ne ".")'` ; \
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase '$$path='$$path > $$base.html-temp && (cat $$base.html-temp | perl -p -e '$$| = 1; (s/Date://, s/Author:/por/, s/\$$//g) if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.html) ; \
langlinks="`./tools/translate.sh $$base pt`" ; \
$(XSLTPROC) fsfe.xsl $$path $(XSLTOPTS) '$$fsfeurope='$$root '$$filebase='$$filebase.pt '$$path='$$path '$$langlinks='"$$langlinks" > $$base.pt.html-temp && (cat $$base.pt.html-temp | perl -p -e '$$| = 1; (s/Date://, s/Author:/por/, s/\$$//g) if(/\$$''Date:/); s/mode: xml \*\*\*/mode: html \*\*\*/' > $$base.pt.html) ; \
rm -f $$base.html-temp

$(ITPAGES): %.html: %.xhtml fsfe.xsl navigation.it.xsl


+ 0
- 8
about/about.pt.xhtml View File

@@ -9,14 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="about.html">English</a> |
Português
]
</center>

<!-- Begin page content -->

<blockquote>


+ 0
- 10
background.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="background.de.html">Deutsch</a> |
<a href="background.html">English</a> |
<a href="background.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<h2>Origens</h2>



+ 0
- 10
boilerplate.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="boilerplate.de.html">Deutsch</a> |
<a href="boilerplate.en.html">English</a> |
<a href="boilerplate.fr.html">Français</a>|
Português
]
</center>

<!-- Begin page content -->

<p>This rocks</p>


+ 0
- 10
contact/contact.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="contact.de.html">Deutsch</a> |
<a href="contact.html">English</a> |
<a href="contact.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<h2>Listas de correio</h2>



+ 0
- 10
documents/documents.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="documents.de.html">Deutsch</a> |
<a href="documents.html">English</a> |
<a href="documents.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<div align="center">
<h2>Documents</h2>


+ 0
- 10
documents/doi.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="doi.de.html">Deutsch</a> |
<a href="doi.html">English</a> |
<a href="doi.fr.html">Français</a>|
Português
]
</center>

<!-- Begin page content -->
<div align="center">
<h2>Declaração de Intenções - Free Software Foundation Europa</h2>


+ 0
- 10
documents/freesoftware.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="freesoftware.de.html">Deutsch</a> |
<a href="freesoftware.html">English</a> |
<a href="freesoftware.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<div align="center">
<h2>O que é o Software Livre?</h2>


+ 0
- 11
documents/gnuproject.pt.xhtml View File

@@ -9,17 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="gnuproject.de.html">Deutsch</a> |
<a href="gnuproject.html">English</a> |
<a href="gnuproject.fr.html">Français</a>|
Português
]
</center>

<!-- Begin page content -->
<!-- Begin page content -->
<div align="center">
<h2>O que é o Projecto GNU?</h2>


+ 0
- 10
documents/preamble.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="preamble.de.html">Deutsch</a> |
<a href="preamble.html">English</a> |
<a href="preamble.fr.html">Français</a>|
Português
]
</center>

<!-- Begin page content -->
<div align="center">
<h2>Preâmbulo da Free Software Foundation Europa</h2>


+ 0
- 9
documents/whatwedo.pt.xhtml View File

@@ -9,15 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="whatwedo.de.html">Deutsch</a> |
<a href="whatwedo.html">English</a> |
Português
]
</center>

<!-- Begin page content -->
<div align="center">
<h2>O que é que nós fazemos ?</h2>


+ 0
- 12
documents/whyfs.pt.xhtml View File

@@ -10,18 +10,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="whyfs.de.html">Deutsch</a> |
<a href="whyfs.en.html">English</a> |
<a href="whyfs.es.html">Español</a> |
<a href="whyfs.fr.html">Français</a> |
<a href="whyfs.it.html">Italiano</a> |
Português
]
</center>

<!-- Begin page content -->

<center><h2>Nós falamos de Software Livre</h2></center>


+ 1
- 10
documents/whyweexist.pt.xhtml View File

@@ -9,22 +9,13 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="whyweexist.de.html">Deutsch</a> |
<a href="whyweexist.html">English</a> |
Português
]
</center>

<!-- Begin page content -->
<div align="center">
<h2>Porque é que existimos?</h2>
</div>
<p> A Free Software Foundation Europe (FSF Europa) foi fundada em 2001 como organização irmã da Free Software Foundation (FSF) dos EUA para tratar de todos os assuntos relacionados com <a href="freesoftware.pt.html">Software Livre</a> na Europa.</p>

<p>Város factores tornaram este passo necessário.</p>
<p>Vários factores tornaram este passo necessário.</p>

<ul>



+ 1
- 0
fsfe.xsl View File

@@ -18,6 +18,7 @@
<xsl:param name="gnu">http://www.gnu.org</xsl:param>
<xsl:param name="filebase">nofile.html</xsl:param>
<xsl:param name="path">nofile.html</xsl:param>
<xsl:param name="langlinks">[ English ]</xsl:param>

<xsl:template match="/">
<xsl:copy>


+ 0
- 9
gbn/index.pt.xhtml View File

@@ -9,15 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<a href="index.de.html">Deutsch</a> |
<a href="index.html">English</a> |
<a href="index.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<h2>GNU Business Network (Rede Empresarial GNU)</h2>



+ 0
- 10
help/help.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="help.de.html">Deutsch</a> |
<a href="help.html">English</a> |
<a href="help.it.html">Italiano</a> |
Português
]
</center>

<!-- Begin page content -->
<h2>Como pode ajudar-nos?</h2>



+ 0
- 12
index.pt.xhtml View File

@@ -9,18 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="index.de.html">Deutsch</a> |
<a href="index.html">English</a> |
<a href="index.es.html">Español</a> |
<a href="index.fr.html">Français</a> |
<a href="index.it.html">Italiano</a> |
Português
]
</center>

<!-- Begin page content -->
<center>
<h1>Free Software Foundation Europa</h1>


+ 0
- 10
law/law.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="law.de.html">Deutsch</a> |
<a href="law.en.html">English</a> |
<a href="law.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<div align="center">
<h2>Proteger o Software Livre na Europa</h2>


+ 0
- 10
mailman/index.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="index.de.html">Deutsch</a> |
<a href="index.html">English</a> |
<a href="index.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<h2>Sobre as listas de correio</h2>
<p>


+ 3
- 0
navigation.pt.xsl View File

@@ -48,6 +48,9 @@
<tr>
<td width="99%" valign="top">
<div class="content">
<center>
<xsl:value-of select="$langlinks" disable-output-escaping="yes"/>
</center>
<xsl:apply-templates select="@*|node()"/>
</div>
</td>


+ 0
- 11
news/article2001-08-23-01.pt.xhtml View File

@@ -7,17 +7,6 @@
</head>
<body>
<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="article2001-08-23-01.de.html">Deutsch</a> |
<a href="article2001-08-23-01.en.html">English</a> |
<a href="article2001-08-23-01.es.html">Español</a> |
<a href="article2001-08-23-01.fr.html">Français</a> |
<a href="article2001-08-23-01.it.html">Italian</a> |
Português
]
</center>
<p />
<blockquote>
<center><h2>Peritos em Informática Livre</h2></center>


+ 0
- 10
news/article2001-10-20-01.pt.xhtml View File

@@ -8,16 +8,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="article2001-10-20-01.de.html">Deutsch</a> |
<a href="article2001-10-20-01.en.html">English</a> |
<a href="article2001-10-20-01.es.html">Español</a> |
<a href="article2001-10-20-01.fr.html">Français</a> |
Português
]
</center>
<p />
<blockquote>
<center><h2>SourceForge muda de rumo</h2></center>


+ 0
- 8
news/article2001-12-17-01.pt.xhtml View File

@@ -8,14 +8,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="article2001-12-17-01.en.html">English</a> |
Português
]
</center>

<!-- Begin page content -->

<center>


+ 0
- 10
news/article2002-01-18-01.pt.xhtml View File

@@ -8,16 +8,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="article2002-01-18-01.en.html">English</a> |
<a href="article2002-01-18-01.es.html">Español</a> |
<a href="article2002-01-18-01.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->

<center>


+ 0
- 10
news/news.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="news.de.html">Deutsch</a> |
<a href="news.html">English</a> |
<a href="news.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->

<div align="center">


+ 0
- 10
press/index.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="index.de.html">Deutsch</a> |
<a href="index.html">English</a> |
<a href="index.fr.html">Français</a> |
Português
]
</center>

<!-- Begin page content -->
<h2>Relações com a Imprensa</h2>



+ 0
- 10
siae/siae.pt.xhtml View File

@@ -9,16 +9,6 @@
<body>

<div> <!-- The header will be inserted here -->
<center>
[
<!-- Please update as needed and keep it in alphabetical order -->
<a href="siae.en.html">English</a> |
<a href="siae.fr.html">Français</a>|
<a href="siae.it.html">Italiano</a> |
Português
]
</center>

<!-- Begin page content -->

<center>


+ 101
- 0
tools/translate.sh View File

@@ -0,0 +1,101 @@
#! /bin/sh

BASE="$1"
LANGUAGE="$2"
LANGS=""
RESULT=""

# Find what translations are available.
for j in $BASE.??.xhtml; do
LANGS="`expr $j : $BASE.\\\\\(.*\\\\\).xhtml` $LANGS"
done
# Special case while we don't change all those *.xhtml to *.en.xhtml
if [ -f $BASE.xhtml ]; then
LANGS="EN $LANGS"
fi

# Create the string to be included in the webpage.
BASENAME=`basename $BASE`
SEPARATOR="[ "
if [ "`echo $LANGS | grep de`" != "" ]; then
RESULT="$RESULT""$SEPARATOR"
if [ "$LANGUAGE" != "de" ]; then
RESULT="$RESULT""<a href=\"$BASENAME.de.html\">"
fi
RESULT="$RESULT""Deutsch"
if [ "$LANGUAGE" != "de" ]; then
RESULT="$RESULT""</a>"
fi
SEPARATOR=" | "
fi
if [ "`echo $LANGS | grep en`" != "" ]; then
RESULT="$RESULT""$SEPARATOR"
if [ "$LANGUAGE" != "en" ]; then
RESULT="$RESULT""<a href=\"$BASENAME.en.html\">"
fi
RESULT="$RESULT""English"
if [ "$LANGUAGE" != "en" ]; then
RESULT="$RESULT""</a>"
fi
SEPARATOR=" | "
fi
# Again, the special case
if [ "`echo $LANGS | grep EN`" != "" ]; then
RESULT="$RESULT""$SEPARATOR"
if [ "$LANGUAGE" != "en" ]; then
RESULT="$RESULT""<a href=\"$BASENAME.html\">"
fi
RESULT="$RESULT""English"
if [ "$LANGUAGE" != "en" ]; then
RESULT="$RESULT""</a>"
fi
SEPARATOR=" | "
fi
if [ "`echo $LANGS | grep es`" != "" ]; then
RESULT="$RESULT""$SEPARATOR"
if [ "$LANGUAGE" != "es" ]; then
RESULT="$RESULT""<a href=\"$BASENAME.es.html\">"
fi
RESULT="$RESULT""Espa&ntilde;ol"
if [ "$LANGUAGE" != "es" ]; then
RESULT="$RESULT""</a>"
fi
SEPARATOR=" | "
fi
if [ "`echo $LANGS | grep fr`" != "" ]; then
RESULT="$RESULT""$SEPARATOR"
if [ "$LANGUAGE" != "fr" ]; then
RESULT="$RESULT""<a href=\"$BASENAME.fr.html\">"
fi
RESULT="$RESULT""Fran&ccedil;ais"
if [ "$LANGUAGE" != "fr" ]; then
RESULT="$RESULT""</a>"
fi
SEPARATOR=" | "
fi
if [ "`echo $LANGS | grep it`" != "" ]; then
RESULT="$RESULT""$SEPARATOR"
if [ "$LANGUAGE" != "it" ]; then
RESULT="$RESULT""<a href=\"$BASENAME.it.html\">"
fi
RESULT="$RESULT""Italiano"
if [ "$LANGUAGE" != "it" ]; then
RESULT="$RESULT""</a>"
fi
SEPARATOR=" | "
fi
if [ "`echo $LANGS | grep pt`" != "" ]; then
RESULT="$RESULT""$SEPARATOR"
if [ "$LANGUAGE" != "pt" ]; then
RESULT="$RESULT""<a href=\"$BASENAME.pt.html\">"
fi
RESULT="$RESULT""Portugu&ecirc;s"
if [ "$LANGUAGE" != "pt" ]; then
RESULT="$RESULT""</a>"
fi
SEPARATOR=" | "
fi
RESULT="$RESULT ]"

# Output the string.
echo "$RESULT"

Loading…
Cancel
Save