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

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

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


From: Pavel Kharitonov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakef...
Date: Sat, 19 Jan 2013 20:45:24 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Pavel Kharitonov <ineiev>       13/01/19 20:45:24

Modified files:
        gnun/server/gnun: ChangeLog GNUmakefile NEWS 
        gnun/server/gnun/doc: gnun.texi 

Log message:
        Make the format of `no-grace-articles' and `no-validate-articles'
        uniform with the format of `extra-templates'.
        
        Add support of sitemaps.
        
        * GNUmakefile (transfer-to-po): New function.
        (sitemap-base, sitemap-pots, sitemap-pos, sitemap-translated):
        (compendium-rules) <sitemap-compendium-$(1)>:
        (no-validate-items): New variables.
        (no-grace-po, ALL_POS): Simplify computations.
        (no-grace-items): Add `$(rootdir)/' prefix.
        (update-po): Use sitemap compendia for sitemaps when available.
        (article-pot-rules, output-article-html): Use
        `no-validate-items' instead of `no-validate-articles'.
        * doc/gnun.texi (Sitemap): New node.
        (Main Variables): Add `sitemap'.
        (Files and Directories): Add a reference to `Sitemap'.
        * NEWS: Update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.349&r2=1.350
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.149&r2=1.150
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.81&r2=1.82
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/doc/gnun.texi?cvsroot=trans-coord&r1=1.82&r2=1.83

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.349
retrieving revision 1.350
diff -u -b -r1.349 -r1.350
--- ChangeLog   18 Jan 2013 05:12:33 -0000      1.349
+++ ChangeLog   19 Jan 2013 20:45:22 -0000      1.350
@@ -1,23 +1,46 @@
+2013-01-20  Pavel Kharitonov  <address@hidden>
+
+       Make the format of `no-grace-articles' and
+       `no-validate-articles' uniform with the format of
+       `extra-templates'.
+
+       Add support of sitemaps.
+
+       * GNUmakefile (transfer-to-po): New function.
+       (sitemap-base, sitemap-pots, sitemap-pos, sitemap-translated):
+       (compendium-rules) <sitemap-compendium-$(1)>:  
+       (no-validate-items): New variables.
+       (no-grace-po, ALL_POS): Simplify computations.
+       (no-grace-items): Add `$(rootdir)/' prefix.
+       (update-po): Use sitemap compendia for sitemaps when
+       available.
+       (article-pot-rules, output-article-html): Use
+       `no-validate-items' instead of `no-validate-articles'.
+       * doc/gnun.texi (Sitemap): New node.
+       (Main Variables): Add `sitemap'.
+       (Files and Directories): Add a reference to `Sitemap'.
+       * NEWS: Update.
+
 2013-01-18  Pavel Kharitonov  <address@hidden>
 
-       * web-trans.texi (New Team, SSI): Mention the
+       * doc/web-trans.texi (New Team, SSI): Mention the
        `server/bottom-notes' SSI.
 
 2013-01-17  Pavel Kharitonov  <address@hidden>
 
-       * web-trans.texi (Translation Tips): Add `Updating'.
+       * doc/web-trans.texi (Translation Tips): Add `Updating'.
        (Updating): New node enumerating our tools to track
        status of translations.
        (Priorities): Move the passage about updating to new node,
        `Updating'.
-       * gnun.texi (gnun-report): Mention regenerated reports in
+       * doc/gnun.texi (gnun-report): Mention regenerated reports in
        gnu.org/s/gnun/reports/.
        (GNUmakefile.team Targets) <notify in GNUmakefile.team>: New
        anchor.
 
 2013-01-16  Pavel Kharitonov  <address@hidden>
 
-       * web-trans.texi (Leaders, Managing): Reduce nesting.
+       * doc/web-trans.texi (Leaders, Managing): Reduce nesting.
        Move `Review', `Commits', `PO Files', `Savannah', `Co-leaders'
        up from `Managing' to `Leaders'.
        (Review, Tracking Tasks, Unreviewed Translations, Commits):

Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -b -r1.149 -r1.150
--- GNUmakefile 13 Jan 2013 15:31:24 -0000      1.149
+++ GNUmakefile 19 Jan 2013 20:45:23 -0000      1.150
@@ -165,15 +165,28 @@
 endif
 ### End of variables declaration (whatsnew) ###
 
+transfer-to-po = \
+  $(patsubst ./%,%,$(join $(patsubst %,%po/,$(dir $(1))),$(notdir $(1))))
 find-po = $(wildcard $(1).*.po)
 ### Special variables for `no-grace' items ###
-no-grace-items := $(no-grace-articles)
+no-grace-items := \
+$(addprefix $(rootdir)/,$(call transfer-to-po,$(no-grace-articles)))
 no-grace-pot := $(no-grace-items:%=%.pot)
-no-grace-po := $(foreach pot, $(no-grace-pot),\
-                $(call find-po,$(basename $(pot))))
+no-grace-po := $(foreach base,$(no-grace-items),$(call find-po,$(base)))
 no-grace-translated := $(subst /po/,/,$(no-grace-po:%.po=%.html))
 ### End of variables declaration (`no-grace' items) ###
 
+### Special variables for sitemap
+ifneq ($(sitemap),)
+sitemap-base := $(addprefix $(rootdir)/,$(call transfer-to-po,$(sitemap)))
+sitemap-pots := $(addsuffix .pot,$(sitemap-base))
+sitemap-pos := $(foreach base,$(sitemap-base),$(call find-po,$(base)))
+sitemap-translated := $(subst /po/,/,$(sitemap-pos:%.po=%.html))
+endif
+### End of variables for sitemap
+
+no-validate-items := \
+$(addprefix $(rootdir)/,$(call transfer-to-po,$(no-validate-articles)))
 ### Special variables for all other articles ###
 # FIXME: Variables' computation could be optimized, but in any event
 # it is much better if translators do not have to add manually anything.
@@ -184,7 +197,7 @@
 root-articles-pot := $(root-articles:%=%.pot)
 ALL_POTS := $(articles-pot) $(root-articles-pot)
 ALL_BASE := $(ALL_POTS:%.pot=%)
-ALL_POS := $(foreach pot,$(ALL_POTS),$(call find-po,$(basename $(pot))))
+ALL_POS := $(foreach base,$(ALL_BASE),$(call find-po,$(base)))
 ALL_POS_BASE := $(ALL_POS:%.po=%)
 articles-translated := $(subst /po/,/,$(ALL_POS:%.po=%.html))
 ifeq ($(VERBOSE),yes)
@@ -386,6 +399,12 @@
     && echo -C compendia/fuzzified-compendium.$(1).po)
 
 endif # ifneq ($$(ALL_$(1)_POS),)
+## Check for sitemap compendium.
+ifneq ($(sitemap),)
+sitemap-compendium-$(1) := $(shell test -f 
compendia/sitemap-compendium.$(1).po \
+ && $(MSGFMT) -c -o /dev/null compendia/sitemap-compendium.$(1).po \
+ && echo -C compendia/sitemap-compendium.$(1).po)
+endif # neq ($(sitemap),)
 endef # compendium-rules
 
 $(foreach lang,$(TEMPLATE_LINGUAS),$(eval $(call compendium-rules,$(lang))))
@@ -625,6 +644,7 @@
      | $(MSGCAT) --use-first --more-than=1 $(MASTER-$(3)) - \
      | $(MSGCAT) --use-first --less-than=2 $(1) -) \
   | $(MSGMERGE) --previous $(MASTER-$(3)-OPTION) $(COMPENDIUM-$(3)-OPTION) \
+    $(if $(findstring $(1), $(sitemap-pos)), $(sitemap-compendium-$(3))) \
     -o $(1).tmp - $(2) \
   && $(call check-new-po,$(1)) && touch $(1) \
   && ($(call update-po-status,$(1)); \
@@ -940,7 +960,7 @@
 define article-pot-rules
 $(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)))
+ifneq ($(1), $(findstring $(1),$(no-validate-items)))
        $(VALIDATESKIP) $(VALIDATE-HTML-NOTIFY) $(NOTIFYSKIP) $(web-addr) $$<
 endif
        test -f $(1).translist || $(call generate-translinks,$(1))
@@ -964,7 +984,7 @@
 # Produce article HTML file and validate it if needed.
 define output-article-html
 $(M4) $(1).m4 > address@hidden \
-$(if $(findstring $(basename $(1)),$(no-validate-articles)), , \
+$(if $(findstring $(basename $(1)),$(no-validate-items)), , \
   && $(call validate-article,$(1)))
 endef
 

Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- NEWS        4 Jan 2013 09:08:47 -0000       1.81
+++ NEWS        19 Jan 2013 20:45:23 -0000      1.82
@@ -2,6 +2,11 @@
 
 * Changes in GNUnited Nations 0.8 (????-??-??)
 
+*** The format of `no-grace-articles' and `no-validate-articles' was
+    simplified and unified with `extra-templates'.
+
+*** Support of sitemaps was added.
+
 ** Bugs fixed in 0.8.
 
 *** `gnun-diff-po' didn't highlight the differences in the messages

Index: doc/gnun.texi
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/doc/gnun.texi,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- doc/gnun.texi       17 Jan 2013 17:46:14 -0000      1.82
+++ doc/gnun.texi       19 Jan 2013 20:45:23 -0000      1.83
@@ -915,6 +915,12 @@
 that hasn't been converted to PO files won't complain about them unless
 the team decides to actually commit @address@hidden
 
address@hidden sitemap
address@hidden sitemap
+The @code{sitemap} variable declares the pages that are treated like
+sitemaps, that is, an additional externally generated compendium is used
+when updating them.  @xref{Sitemap}, for more information.
+
 @cindex FUZZY_DIFF_LINGUAS
 @cindex previous, diff
 @item FUZZY_DIFF_LINGUAS
@@ -968,6 +974,7 @@
 * PO Files and Team::   How to maintain translations in the team's
                           repository.
 * Compendia::           Using translation memory.
+* Sitemap::             Specifics of sitemap generation.
 * GNU News::            Obsolete: How to handle ``whatsnew''.
 
 @end menu
@@ -1934,6 +1941,37 @@
 GNUN checks a specific file, @file{exclude.pot}, and when that file
 contains the string, it won't be added to @file{compendium.pot}.
 
address@hidden Sitemap
address@hidden Building Sitemap
address@hidden sitemap
+
+Sitemaps differ from regular pages in two respects:
+
address@hidden
address@hidden
+They are typically regenerated automatically from the texts of the
+articles.
+
address@hidden
+They mostly consist of links, therefore significant part of their text
+should come to translations without any changes.
+
address@hidden enumerate
+
+Also, sitemaps contain many translatable messages, so it is desirable
+to eliminate manual work where possible.
+
+In order to take this into account, GNUN provides the @code{sitemap}
+variable in @file{gnun.mk}.  All articles listed in @code{sitemap} are
+rebuilt using an additional compendium (when present),
address@hidden/@/gnun/@/compendia/@/address@hidden
+
+Those additional compendia are supposed to be compiled outside of GNUN
+by the same tool that generates the sitemap.  It is responsibility of
+that tool to provide the compendia with reasonable translations whose
address@hidden match those generated by PO4A when processing the
+English version of the sitemap.
+
 @node GNU News
 @subsection Special Handling for GNU News
 @cindex gnunews
@@ -2249,7 +2287,7 @@
 
 @item server/sitemap.html
 The sitemap; it is generated automatically by a script that is not
-included in GNUN.  GNUN currently treats it like a regular article.
+included in GNUN.  @xref{Sitemap}.
 
 @item server/gnun/
 The directory for GNUN files.



reply via email to

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