mail[Wesnoth-commits] r33640 - in /website/start/1.6: Makefile languages.conf


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by jorda on March 14, 2009 - 18:52:
Author: jorda
Date: Sat Mar 14 18:52:32 2009
New Revision: 33640

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33640&view=rev
Log:
Use `.ll.html' and Apache's type map

`.ll.html' is now used instead of `.html.ll' (where ll is the language 
code), since the latter causes problems with some extensions (.pl, .tr).
Additionally, the Makefile has been updated to generate a new "type map"
file, which makes it possible to keep locale names for .po files and still 
use language negotiation. The list of language codes and names has been 
updated accordingly, and a few missing languages have been added.

Modified:
    website/start/1.6/Makefile
    website/start/1.6/languages.conf

Modified: website/start/1.6/Makefile
URL: 
http://svn.gna.org/viewcvs/wesnoth/website/start/1.6/Makefile?rev=33640&r1=33639&r2=33640&view=diff
==============================================================================
--- website/start/1.6/Makefile (original)
+++ website/start/1.6/Makefile Sat Mar 14 18:52:32 2009
@@ -9,9 +9,11 @@
 PO = $(addprefix $(PODIR)/, $(LANGUAGES:=.po))
 
 TEMPLATE = template.html
-PAGE = index.html
+PAGE = index
+TMAP = $(PAGE).var
 PAGE_STAMP = $(STAMPDIR)/$(PAGE)
-HTML_STAMP = $(addprefix $(PAGE_STAMP)., $(LANGUAGES))
+HTML_PAGES = $(addprefix $(PAGE_STAMP)., $(LANGUAGES))
+HTML_STAMP = $(HTML_PAGES:=.html)
 
 LIST = languages.conf
 LIST_STAMP = $(STAMPDIR)/$(LIST)
@@ -27,12 +29,12 @@
 
 update-po: $(PO)
 
-update-html: $(HTML_STAMP) $(PAGE).en
+update-html: $(HTML_STAMP) $(PAGE).en.html
 
 update-list: $(LIST_STAMP)
 
 clean:
-       rm -rf $(PODIR)/*~ $(PAGE).* $(STAMPDIR)
+       rm -rf $(PODIR)/*~ $(PAGE).* $(TMAP) $(STAMPDIR)
 
 # ----------------------------------------------------------------------
 
@@ -43,27 +45,34 @@
        po4a-updatepo $(PO4A_OPTIONS) -m $< -p $@
        @touch $@
 
-$(PAGE).en:
+$(PAGE).en.html:
        cp $(TEMPLATE) $@
 
-$(PAGE_STAMP).%: $(TEMPLATE) $(PODIR)/%.po
+$(PAGE_STAMP).%.html: $(TEMPLATE) $(PODIR)/%.po
        @html=`basename $@` && \
-       lang=`echo $$html | sed 's/$(PAGE).//'` && \
+       lang=`echo $$html | sed 's/$(PAGE).//;s/.html//'` && \
        echo $$html && \
        po4a-translate $(PO4A_OPTIONS) -L utf-8 -m $(TEMPLATE) \
                       -k $(PO4A_THRESHOLD) -p $(PODIR)/$$lang.po -l $$html
        @mkdir -p $(STAMPDIR) && touch $@
 
 $(LIST_STAMP): $(LIST) $(HTML_STAMP)
-       @list=$$(for i in $(PAGE).*; do \
-               code=`echo $$i | cut -d. -f 3`; \
+       @list=$$(for i in $(PAGE).*.html; do \
+               code=`echo $$i | cut -d. -f 2`; \
                name=`grep "^$$code:" $(LIST) | cut -d: -f 2`; \
                echo -n "<li><a href='$$i'>$$name</a></li>"; \
        done) && \
-       for i in $(PAGE).*; do \
+       for i in $(PAGE).*.html; do \
                sed -i "/<!--LANGS-->./d; \
                        s,<!--LANGS-->,<!--LANGS-->$$list\n<!--LANGS-->," 
$$i; \
        done
+       @for i in $(PAGE).*.html; do \
+               lang=`echo $$i | cut -d. -f 2 | tr "A-Z_" "a-z-"`; \
+               echo "URI: $$i"; \
+               echo "Content-type: text/xhtml"; \
+               echo "Content-language: $$lang"; \
+               echo ""; \
+       done > $(TMAP)
        @mkdir -p $(STAMPDIR) && touch $@
 
 # ----------------------------------------------------------------------

Modified: website/start/1.6/languages.conf
URL: 
http://svn.gna.org/viewcvs/wesnoth/website/start/1.6/languages.conf?rev=33640&r1=33639&r2=33640&view=diff
==============================================================================
--- website/start/1.6/languages.conf (original)
+++ website/start/1.6/languages.conf Sat Mar 14 18:52:32 2009
@@ -1,6 +1,7 @@
 # List of language code & name pairs, where code stands for the
 # 2 or 3-letter language code as defined by ISO-639.
 af:Afrikaans
+ar:العربية
 bg:Български
 ca:Català
 cs:Čeština
@@ -8,26 +9,32 @@
 de:Deutsch
 el:Ελληνικά
 en:English
+en_GB:British English
 eo:Esperanto
 es:Español
 et:Eesti
 eu:Euskera
 fi:Suomi
 fr:Français
-fur:Friulian
+fur_IT:Friulian
 gl:Galego
+he:עברית
 hr:Hrvatski
 hu:Magyar
+id:Bahasa Indonesia
 it:Italiano
 ja:日本語
+ko:한국어
 la:Latina
 lt:Lietuvių
 lv:Latviešu
 mk:Македонски
 mr:Marathi
-nb:Norsk bokmål
+nb_NO:Norsk bokmål
 nl:Nederlands
-pol:Polski
+pl:Polski
+pt:Português
+pt_BR:Português do Brasil
 ro:Românã
 ru:Русский
 sk:Slovenčina
@@ -35,5 +42,6 @@
 sr:Српски
 sv:Svenska
 tl:Filipino
-tur:Türkçe
-zho:中文
+tr:Türkçe
+zh_CN:中文
+zh_TW:中文(繁)




Related Messages


Powered by MHonArc, Updated Sat Mar 14 19:00:18 2009