diff --git a/Makefile b/Makefile index ce414e2ad6..6caff8b22b 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/about/about.pt.xhtml b/about/about.pt.xhtml index ad5584509f..2b3ea3f0c7 100644 --- a/about/about.pt.xhtml +++ b/about/about.pt.xhtml @@ -9,14 +9,6 @@
-
- [ - - English | - Português - ] -
-
diff --git a/background.pt.xhtml b/background.pt.xhtml index 37d2284999..39ba6e9cff 100644 --- a/background.pt.xhtml +++ b/background.pt.xhtml @@ -9,16 +9,6 @@
-
- [ - - Deutsch | - English | - Français | - Português - ] -
-

Origens

diff --git a/boilerplate.pt.xhtml b/boilerplate.pt.xhtml index bdc1fd44dc..1692242276 100644 --- a/boilerplate.pt.xhtml +++ b/boilerplate.pt.xhtml @@ -9,16 +9,6 @@
-
- [ - - Deutsch | - English | - Français| - Português - ] -
-

This rocks

diff --git a/contact/contact.pt.xhtml b/contact/contact.pt.xhtml index 3c0b028013..7eccfe871a 100644 --- a/contact/contact.pt.xhtml +++ b/contact/contact.pt.xhtml @@ -9,16 +9,6 @@
-
- [ - - Deutsch | - English | - Français | - Português - ] -
-

Listas de correio

diff --git a/documents/documents.pt.xhtml b/documents/documents.pt.xhtml index 935620bc99..6d161dabc9 100644 --- a/documents/documents.pt.xhtml +++ b/documents/documents.pt.xhtml @@ -9,16 +9,6 @@
-
- [ - - Deutsch | - English | - Français | - Português - ] -
-

Documents

diff --git a/documents/doi.pt.xhtml b/documents/doi.pt.xhtml index 51712e1c78..20e252d2ac 100644 --- a/documents/doi.pt.xhtml +++ b/documents/doi.pt.xhtml @@ -9,16 +9,6 @@
-
- [ - - Deutsch | - English | - Français| - Português - ] -
-

Declaração de Intenções - Free Software Foundation Europa

diff --git a/documents/freesoftware.pt.xhtml b/documents/freesoftware.pt.xhtml index 65e7970cc2..31bf7ecc35 100644 --- a/documents/freesoftware.pt.xhtml +++ b/documents/freesoftware.pt.xhtml @@ -9,16 +9,6 @@
-
- [ - - Deutsch | - English | - Français | - Português - ] -
-

O que é o Software Livre?

diff --git a/documents/gnuproject.pt.xhtml b/documents/gnuproject.pt.xhtml index 5f3ec1aca3..2964e3731a 100644 --- a/documents/gnuproject.pt.xhtml +++ b/documents/gnuproject.pt.xhtml @@ -9,17 +9,6 @@
-
- [ - - Deutsch | - English | - Français| - Português - ] -
- -

O que é o Projecto GNU?

diff --git a/documents/preamble.pt.xhtml b/documents/preamble.pt.xhtml index 1c4c70fd8b..e90ef3c58e 100644 --- a/documents/preamble.pt.xhtml +++ b/documents/preamble.pt.xhtml @@ -9,16 +9,6 @@
-
- [ - - Deutsch | - English | - Français| - Português - ] -
-

Preâmbulo da Free Software Foundation Europa

diff --git a/documents/whatwedo.pt.xhtml b/documents/whatwedo.pt.xhtml index 233904b0a7..28299ceb7a 100644 --- a/documents/whatwedo.pt.xhtml +++ b/documents/whatwedo.pt.xhtml @@ -9,15 +9,6 @@
-
- [ - - Deutsch | - English | - Português - ] -
-

O que é que nós fazemos ?

diff --git a/documents/whyfs.pt.xhtml b/documents/whyfs.pt.xhtml index 7fe4158791..bf9ee15286 100644 --- a/documents/whyfs.pt.xhtml +++ b/documents/whyfs.pt.xhtml @@ -10,18 +10,6 @@
-
- [ - - Deutsch | - English | - Español | - Français | - Italiano | - Português - ] -
-

Nós falamos de Software Livre

diff --git a/documents/whyweexist.pt.xhtml b/documents/whyweexist.pt.xhtml index 25258f870a..bcc1c3ef83 100644 --- a/documents/whyweexist.pt.xhtml +++ b/documents/whyweexist.pt.xhtml @@ -9,22 +9,13 @@
-
- [ - - Deutsch | - English | - Português - ] -
-

Porque é que existimos?

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 Software Livre na Europa.

-

Város factores tornaram este passo necessário.

+

Vários factores tornaram este passo necessário.

    diff --git a/fsfe.xsl b/fsfe.xsl index 2c38490917..f602cafb1d 100644 --- a/fsfe.xsl +++ b/fsfe.xsl @@ -18,6 +18,7 @@ http://www.gnu.org nofile.html nofile.html + [ English ] diff --git a/gbn/index.pt.xhtml b/gbn/index.pt.xhtml index 8a0327bc2a..cc136fb47c 100644 --- a/gbn/index.pt.xhtml +++ b/gbn/index.pt.xhtml @@ -9,15 +9,6 @@
    -
    - [ - Deutsch | - English | - Français | - Português - ] -
    -

    GNU Business Network (Rede Empresarial GNU)

    diff --git a/help/help.pt.xhtml b/help/help.pt.xhtml index bc3f978c69..d27971a074 100644 --- a/help/help.pt.xhtml +++ b/help/help.pt.xhtml @@ -9,16 +9,6 @@
    -
    - [ - - Deutsch | - English | - Italiano | - Português - ] -
    -

    Como pode ajudar-nos?

    diff --git a/index.pt.xhtml b/index.pt.xhtml index 6b34592f4f..76c10ea853 100644 --- a/index.pt.xhtml +++ b/index.pt.xhtml @@ -9,18 +9,6 @@
    -
    - [ - - Deutsch | - English | - Español | - Français | - Italiano | - Português - ] -
    -

    Free Software Foundation Europa

    diff --git a/law/law.pt.xhtml b/law/law.pt.xhtml index bb1aea586c..6a8137f2a6 100644 --- a/law/law.pt.xhtml +++ b/law/law.pt.xhtml @@ -9,16 +9,6 @@
    -
    - [ - - Deutsch | - English | - Français | - Português - ] -
    -

    Proteger o Software Livre na Europa

    diff --git a/mailman/index.pt.xhtml b/mailman/index.pt.xhtml index fbe2e30138..5f0b65d16d 100644 --- a/mailman/index.pt.xhtml +++ b/mailman/index.pt.xhtml @@ -9,16 +9,6 @@
    -
    - [ - - Deutsch | - English | - Français | - Português - ] -
    -

    Sobre as listas de correio

    diff --git a/navigation.pt.xsl b/navigation.pt.xsl index 04cec329ee..f2a2712170 100644 --- a/navigation.pt.xsl +++ b/navigation.pt.xsl @@ -48,6 +48,9 @@

    +
    + +
    diff --git a/news/article2001-08-23-01.pt.xhtml b/news/article2001-08-23-01.pt.xhtml index 6ca5e219de..ade610cdd2 100644 --- a/news/article2001-08-23-01.pt.xhtml +++ b/news/article2001-08-23-01.pt.xhtml @@ -7,17 +7,6 @@
    -
    - [ - - Deutsch | - English | - Español | - Français | - Italian | - Português - ] -

    Peritos em Informática Livre

    diff --git a/news/article2001-10-20-01.pt.xhtml b/news/article2001-10-20-01.pt.xhtml index 5532d8aba9..5d6f625cd7 100644 --- a/news/article2001-10-20-01.pt.xhtml +++ b/news/article2001-10-20-01.pt.xhtml @@ -8,16 +8,6 @@
    -
    - [ - - Deutsch | - English | - Español | - Français | - Português - ] -

    SourceForge muda de rumo

    diff --git a/news/article2001-12-17-01.pt.xhtml b/news/article2001-12-17-01.pt.xhtml index 5238c30385..cad7a07228 100644 --- a/news/article2001-12-17-01.pt.xhtml +++ b/news/article2001-12-17-01.pt.xhtml @@ -8,14 +8,6 @@
    -
    - [ - - English | - Português - ] -
    -
    diff --git a/news/article2002-01-18-01.pt.xhtml b/news/article2002-01-18-01.pt.xhtml index 6f0413a809..8b27d98042 100644 --- a/news/article2002-01-18-01.pt.xhtml +++ b/news/article2002-01-18-01.pt.xhtml @@ -8,16 +8,6 @@
    -
    - [ - - English | - Español | - Français | - Português - ] -
    -
    diff --git a/news/news.pt.xhtml b/news/news.pt.xhtml index 46544717a8..d07a24af8c 100644 --- a/news/news.pt.xhtml +++ b/news/news.pt.xhtml @@ -9,16 +9,6 @@
    -
    - [ - - Deutsch | - English | - Français | - Português - ] -
    -
    diff --git a/press/index.pt.xhtml b/press/index.pt.xhtml index 0f7fedbe3b..6b96e18594 100644 --- a/press/index.pt.xhtml +++ b/press/index.pt.xhtml @@ -9,16 +9,6 @@
    -
    - [ - - Deutsch | - English | - Français | - Português - ] -
    -

    Relações com a Imprensa

    diff --git a/siae/siae.pt.xhtml b/siae/siae.pt.xhtml index 48c215063b..353fca58f2 100644 --- a/siae/siae.pt.xhtml +++ b/siae/siae.pt.xhtml @@ -9,16 +9,6 @@
    -
    - [ - - English | - Français| - Italiano | - Português - ] -
    -
    diff --git a/tools/translate.sh b/tools/translate.sh new file mode 100644 index 0000000000..ba87b1b45a --- /dev/null +++ b/tools/translate.sh @@ -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""" + fi + RESULT="$RESULT""Deutsch" + if [ "$LANGUAGE" != "de" ]; then + RESULT="$RESULT""" + fi + SEPARATOR=" | " +fi +if [ "`echo $LANGS | grep en`" != "" ]; then + RESULT="$RESULT""$SEPARATOR" + if [ "$LANGUAGE" != "en" ]; then + RESULT="$RESULT""" + fi + RESULT="$RESULT""English" + if [ "$LANGUAGE" != "en" ]; then + RESULT="$RESULT""" + fi + SEPARATOR=" | " +fi +# Again, the special case +if [ "`echo $LANGS | grep EN`" != "" ]; then + RESULT="$RESULT""$SEPARATOR" + if [ "$LANGUAGE" != "en" ]; then + RESULT="$RESULT""" + fi + RESULT="$RESULT""English" + if [ "$LANGUAGE" != "en" ]; then + RESULT="$RESULT""" + fi + SEPARATOR=" | " +fi +if [ "`echo $LANGS | grep es`" != "" ]; then + RESULT="$RESULT""$SEPARATOR" + if [ "$LANGUAGE" != "es" ]; then + RESULT="$RESULT""" + fi + RESULT="$RESULT""Español" + if [ "$LANGUAGE" != "es" ]; then + RESULT="$RESULT""" + fi + SEPARATOR=" | " +fi +if [ "`echo $LANGS | grep fr`" != "" ]; then + RESULT="$RESULT""$SEPARATOR" + if [ "$LANGUAGE" != "fr" ]; then + RESULT="$RESULT""" + fi + RESULT="$RESULT""Français" + if [ "$LANGUAGE" != "fr" ]; then + RESULT="$RESULT""" + fi + SEPARATOR=" | " +fi +if [ "`echo $LANGS | grep it`" != "" ]; then + RESULT="$RESULT""$SEPARATOR" + if [ "$LANGUAGE" != "it" ]; then + RESULT="$RESULT""" + fi + RESULT="$RESULT""Italiano" + if [ "$LANGUAGE" != "it" ]; then + RESULT="$RESULT""" + fi + SEPARATOR=" | " +fi +if [ "`echo $LANGS | grep pt`" != "" ]; then + RESULT="$RESULT""$SEPARATOR" + if [ "$LANGUAGE" != "pt" ]; then + RESULT="$RESULT""" + fi + RESULT="$RESULT""Português" + if [ "$LANGUAGE" != "pt" ]; then + RESULT="$RESULT""" + fi + SEPARATOR=" | " +fi +RESULT="$RESULT ]" + +# Output the string. +echo "$RESULT"