trans-coord-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trans-coord/gnun/server/gnun AUTHORS ChangeLog ...


From: Pavel Kharitonov
Subject: trans-coord/gnun/server/gnun AUTHORS ChangeLog ...
Date: Fri, 16 Sep 2011 11:42:25 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Pavel Kharitonov <ineiev>       11/09/16 11:42:25

Modified files:
        gnun/server/gnun: AUTHORS ChangeLog GNUmakefile Makefile.am 
Added files:
        gnun/server/gnun: initial-translations-list.html languages.txt 
                          translinks-head.html translinks-tail.html 

Log message:
        Regenerate lists of translations based on presence
        of respective files. Add necessary template files.
        
        Replace SSI directive including initial translations list
        in the original file with a directive to include regenerated
        list of translations.
        
        * initial-translations-list.html:
        * languages.txt:
        * translinks-head.html:
        * translinks-tail.html: New files.
        * GNUmakefile (generate-translinks, update-translinks-include)
        (add-file): New functions.
        (addfile): Redefine via add-file.
        (article-pot-rules, article-rules): Use new functions
        for regenerating lists of translations.
        * Makefile.am (example_DATA, dist_example_DATA):
        Rename variable.
        (dist_example_DATA): Add languages.txt,
        initial-translations-list.html,
        translinks-head.html, translinks-tail.html.
        (EXTRA_DIST): Remove gnun.mk GNUmakefile.team.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/AUTHORS?cvsroot=trans-coord&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.199&r2=1.200
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.89&r2=1.90
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/Makefile.am?cvsroot=trans-coord&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/initial-translations-list.html?cvsroot=trans-coord&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/languages.txt?cvsroot=trans-coord&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/translinks-head.html?cvsroot=trans-coord&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/translinks-tail.html?cvsroot=trans-coord&rev=1.1

Patches:
Index: AUTHORS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/AUTHORS,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- AUTHORS     28 Aug 2011 09:37:09 -0000      1.2
+++ AUTHORS     16 Sep 2011 11:42:23 -0000      1.3
@@ -5,7 +5,10 @@
 
 Pavel Kharitonov <address@hidden>
 
-    Add dtd/html5.dtd (based on W3C DTD).
+    Add dtd/html5.dtd (based on W3C DTD),
+        languages.txt (compiled from www.gnu.org pages),
+        translinks-head.html,
+        translinks-tail.html.
 
     Some changes in GNUmakefile and gnun-validate-html, dtd/README.
 

Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -b -r1.199 -r1.200
--- ChangeLog   15 Sep 2011 16:54:56 -0000      1.199
+++ ChangeLog   16 Sep 2011 11:42:24 -0000      1.200
@@ -1,3 +1,28 @@
+2011-09-17  Pavel Kharitonov  <address@hidden>
+
+       Regenerate lists of translations based on presence
+       of respective files. Add necessary template files.
+
+       Replace SSI directive including initial translations list
+       in the original file with a directive to include regenerated
+       list of translations.
+       
+       * initial-translations-list.html:
+       * languages.txt:
+       * translinks-head.html:
+       * translinks-tail.html: New files.
+       * GNUmakefile (generate-translinks, update-translinks-include)
+       (add-file): New functions.
+       (addfile): Redefine via add-file.
+       (article-pot-rules, article-rules): Use new functions
+       for regenerating lists of translations.
+       * Makefile.am (example_DATA, dist_example_DATA):
+       Rename variable.
+       (dist_example_DATA): Add languages.txt,
+       initial-translations-list.html,
+       translinks-head.html, translinks-tail.html.
+       (EXTRA_DIST): Remove gnun.mk GNUmakefile.team.
+
 2011-09-15  Pavel Kharitonov  <address@hidden>
 
        * GNUmakefile (insert-outdated-date): insert `Outdated-Since'

Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- GNUmakefile 15 Sep 2011 16:54:55 -0000      1.89
+++ GNUmakefile 16 Sep 2011 11:42:24 -0000      1.90
@@ -155,8 +155,51 @@
 endif
 
 # The command to add a file to the repository.
+define add-file
+[ -f $(1) ] || (touch $(1) $(2) ; $(VCSSKIP) $(vcs) add $(1))
+endef
+
+# Specific case of add-file invocation used in many places
 define addfile
-[ -f $@ ] || (touch $@ ; $(VCSSKIP) $(vcs) add $@)
+$(call add-file,$@)
+endef
+
+# Compile translations list
+define generate-translinks
+file=$(1).translinks; cp translinks-head.html $$$${file}; \
+$(GREP) -v "^#" languages.txt \
+  | while read language; do \
+      code=$$$${language%%     *}; \
+      case $$$${code} in \
+        en ) suffix="" ;; \
+        * ) suffix=.$$$${code} ;; \
+      esac; \
+      lang=$$$${language%      *}; lang=$$$${lang#*    }; \
+      name=$$$${language##*    }; \
+      url_stem=$(subst /po/,/,$(subst $(rootdir),,$(1))); \
+      article=$(subst /po/,/,$(1)); \
+      if test -f $$$${article}$$$${suffix}.html; then \
+        echo '<!-- '$$$${lang}' -->' >> $$$${file}; \
+        echo -n '<li><a href="'$$$${url_stem}$$$${suffix}.html'">' \
+                 >> $$$${file}; \
+        echo $$$${name}'</a>&nbsp;['$$$${code}']</li>' >> $$$${file}; \
+      fi; \
+    done; \
+cat translinks-tail.html >> $$$${file}; $(call add-file,$(1))
+endef
+
+# Replace SSI directives to include initial translations list with
+# directives to include the generated translinks file.
+define update-translinks-include
+if $(GREP) \
+       '<!--#include virtual="/server/gnun/initial-translations-list\.html" ' \
+       $(subst /po/,/,$(1).html); then \
+  $(SED) --in-place \
+    '/^<!--#set var="article_name"/d;\
+     s/<!--#include virtual="\/server\/gnun\/initial-translations-list\.html/\
+     <!--#include virtual="$(subst /,\/,$(subst 
$(rootdir),,$(1))).translinks/' \
+    $(subst /po/,/,$(1).html); \
+fi
 endef
 
 # The command to generate pot file which perform additional checks
@@ -592,15 +635,19 @@
 
 ### Rules for all other articles ###
 define article-pot-rules
+# Note: .translinks files are regenerated every time with new script
+# until the next revision of $(MAKE-PROTOTYPE) which won't deal with them.
 $(1).proto: $(subst /po/,/,$(1).html)
 # Skip the validation step if the article is in `no-validate-articles'.
 ifneq ($(1), $(findstring $(1),$(no-validate-articles)))
        $(VALIDATESKIP) $(VALIDATE-HTML-NOTIFY) $(NOTIFYSKIP) $(web-addr) $$<
 endif
+       $(call generate-translinks,$(1))
+       $(call update-translinks-include,$(1)) 
        $$(mail-error-proto) $(MAKE-PROTOTYPE) --input=$$< \
          --generic=generic.html --output=$(1).proto \
-         --translinks=$(1).translinks \
-           || ($(RM) $(1).proto $(1).translinks ; exit 1)
+         --translinks=$(1).proto-translinks \
+           || ($(RM) $(1).proto $(1).proto-translinks ; exit 1)
        $(SED) --in-place "s/\$$$$Date.*\$$$$/<gnun>\0<\/gnun>/g" $(1).proto
 
 $(1).translinks: $(1).proto
@@ -718,6 +765,7 @@
              echo 'Ignoring delay for article "$(notdir $(basename $(1)))"', \
              $(call grace-is-over,$(1).po,$(OUTDATED-GRACE))) \
         && (PO=$(1).po; $(call mark-outdated,$$@,$(2)))) || true
+       $(call generate-translinks,$(1))
 endef
 
 $(foreach base,$(ALL_BASE),$(eval $(call article-pot-rules,$(base))))

Index: Makefile.am
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- Makefile.am 22 Aug 2011 14:45:04 -0000      1.19
+++ Makefile.am 16 Sep 2011 11:42:24 -0000      1.20
@@ -69,12 +69,13 @@
 
 exampledir = $(docdir)/examples
 doc_DATA = TODO
-example_DATA = gnun.mk GNUmakefile.team
+dist_example_DATA = gnun.mk GNUmakefile.team languages.txt \
+              initial-translations-list.html \
+              translinks-head.html translinks-tail.html
 pkgdata_DATA = config.mk
 dist_sysconf_DATA = gnun.conf
 dist_pkgdata_DATA = GNUmakefile
 
-EXTRA_DIST = gnun.mk GNUmakefile.team \
-            gnun-validate-html.in validate-html-notify.in
+EXTRA_DIST = gnun-validate-html.in validate-html-notify.in
 
 CLEANFILES = gnun-validate-html validate-html-notify stamp-config.mk

Index: initial-translations-list.html
===================================================================
RCS file: initial-translations-list.html
diff -N initial-translations-list.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ initial-translations-list.html      16 Sep 2011 11:42:24 -0000      1.1
@@ -0,0 +1,11 @@
+<!-- begin /server/initial-translations-list.html -->
+<div id="translations">
+<ul class="translations-list">
+<li>
+<!-- English -->
+<!--#set var="translation" value="<a 
href=\"$article_name.html\">English</a>&nbsp;[en]" -->
+<!--#echo encoding="none" var="translation" -->
+</li>
+</ul>
+</div>
+<!-- end /server/initial-translations-list.html -->

Index: languages.txt
===================================================================
RCS file: languages.txt
diff -N languages.txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ languages.txt       16 Sep 2011 11:42:24 -0000      1.1
@@ -0,0 +1,75 @@
+# Canonical names for translations
+# 
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNUnited Nations.
+# GNUnited Nations is free software: you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# GNUnited Nations is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNUnited Nations. If not, see <http://www.gnu.org/licenses/>.
+#
+# Every line of this file either begins with `#' (lines of comments)
+# or contains three tab-separated fields for a language:
+# suffix for files with translations in the language,
+# language name in English, and language name in the language itself.
+#
+# The lines are sorted alphabetically by language suffix.
+af     Afrikaans       Afrikaans
+ar     Arabic  &#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;
+az     Azerbaijani     Az&#x0259;rbaycanca
+bg     Bulgarian       
&#x431;&#x44A;&#x43B;&#x433;&#x430;&#x440;&#x441;&#x43A;&#x438;
+bn     Bengali &#2476;&#2494;&#2434;&#2482;&#2494;
+bs     Bosnian bosanski
+ca     Catalan catal&#x00e0;
+cs     Czech   &#x010c;esky
+da     Danish  dansk
+de     German  Deutsch
+el     Greek   &#x03b5;&#x03bb;&#x03bb;&#x03b7;&#x03bd;&#x03b9;&#x03ba;&#x03ac;
+en     English English
+eo     Esperanto       Esperanto
+es     Spanish espa&ntilde;ol
+fa     Farsi (Persian) &#x0641;&#x0627;&#x0631;&#x0633;&#x06cc;
+fi     Finnish suomi
+fr     French  fran&ccedil;ais
+gl     Galician        galego
+he     Hebrew  &#x05e2;&#x05d1;&#x05e8;&#x05d9;&#x05ea;
+hr     Croatian        hrvatski
+hu     Hungarian       magyar
+id     Indonesian      Bahasa Indonesia
+it     Italian italiano
+ja     Japanese        &#x65e5;&#x672c;&#x8a9e;
+kn     Kannada &#xC95;&#xCA8;&#xCCD;&#xCA8;&#xCA1;
+ko     Korean  &#xd55c;&#xad6d;&#xc5b4;
+mk     Macedonian      
&#x043c;&#x0430;&#x043a;&#x0435;&#x0434;&#x043e;&#x043d;&#x0441;&#x043a;&#x0438;
+ml     Malayalam       &#3374;&#3378;&#3375;&#3390;&#3379;&#3330;
+nb     Norwegian (Bokm&aring;l)        norsk (bokm&aring;l)
+nl     Dutch   Nederlands
+nn     Norwegian (Nynorsk)     norsk (nynorsk)
+pl     Polish  polski
+pt     Portuguese      portugu&ecirc;s
+pt-br  Brazilian Portuguese    portugu&ecirc;s do Brasil
+ro     Romanian        rom&#x00e2;n&#x0103;
+ru     Russian &#x0440;&#x0443;&#x0441;&#x0441;&#x043a;&#x0438;&#x0439;
+sh     Serbo-Croatian  srpsko-hrvatski
+sk     Slovak  sloven&#269;ina
+sl     Slovenian       sloven&scaron;&#269;ina
+sq     Albanian        shqip
+sr     Serbian &#x0441;&#x0440;&#x043f;&#x0441;&#x043a;&#x0438;
+sv     Swedish svenska
+ta     Tamil   &#2980;&#2990;&#3007;&#2996;&#3021;
+#th    Thai: single unlinked unmaintained /home.th.html
+tl     Tagalog Tagalog
+tr     Turkish T&uuml;rk&ccedil;e
+uk     Ukrainian       
&#x0443;&#x043a;&#x0440;&#x0430;&#x0457;&#x043d;&#x0441;&#x044c;&#x043a;&#x0430;
+uz     Uzbek   O'zbekcha
+#vi    Vietnamese: single unlinked unmaintained /home.vi.html
+zh-cn  Chinese (Simplified)    &#x7b80;&#x4f53;&#x4e2d;&#x6587;
+zh-tw  Chinese (Traditional)   &#x7e41;&#x9ad4;&#x4e2d;&#x6587;

Index: translinks-head.html
===================================================================
RCS file: translinks-head.html
diff -N translinks-head.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ translinks-head.html        16 Sep 2011 11:42:24 -0000      1.1
@@ -0,0 +1,3 @@
+<!-- begin translinks file -->
+<div id="translations">
+<ul class="translations-list">

Index: translinks-tail.html
===================================================================
RCS file: translinks-tail.html
diff -N translinks-tail.html
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ translinks-tail.html        16 Sep 2011 11:42:24 -0000      1.1
@@ -0,0 +1,3 @@
+</ul>
+</div> <!-- id="translations" -->
+<!-- end translinks file -->



reply via email to

[Prev in Thread] Current Thread [Next in Thread]