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 GNUmakefile


From: Pavel Kharitonov
Subject: trans-coord/gnun/server/gnun ChangeLog GNUmakefile
Date: Fri, 24 Feb 2012 07:06:11 +0000

CVSROOT:        /sources/trans-coord
Module name:    trans-coord
Changes by:     Pavel Kharitonov <ineiev>       12/02/24 07:06:11

Modified files:
        gnun/server/gnun: ChangeLog GNUmakefile 

Log message:
        (generate-html, home-rules, template-rules, extra-template-lang-rules)
        (article-rules): Ivoke update-po and substitute-localized-includes
        in generate-html.  Without update-po, the Outdated-Since field was
        not updated in the templates, and ADD-FUZZY-DIFF didn't apply to them.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.249&r2=1.250
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/GNUmakefile?cvsroot=trans-coord&r1=1.112&r2=1.113

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.249
retrieving revision 1.250
diff -u -b -r1.249 -r1.250
--- ChangeLog   22 Feb 2012 15:02:34 -0000      1.249
+++ ChangeLog   24 Feb 2012 07:06:09 -0000      1.250
@@ -1,3 +1,11 @@
+2012-01-24  Pavel Kharitonov  <address@hidden>
+
+       * GNUMakefile (generate-html, home-rules, template-rules)
+       (extra-template-lang-rules, article-rules): Invoke update-po and
+       substitute-localized-includes in generate-html.  Without
+       update-po, the Outdated-Since field was not updated in the
+       templates, and ADD-FUZZY-DIFF didn't apply to them.
+
 2012-02-21  Rafael Beraldo <address@hidden> (tiny change)
 
        * doc/gnun.texi (PO Files): Update URL for vim plugin

Index: GNUmakefile
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/GNUmakefile,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- GNUmakefile 8 Feb 2012 20:29:44 -0000       1.112
+++ GNUmakefile 24 Feb 2012 07:06:10 -0000      1.113
@@ -304,9 +304,18 @@
 
 # The command to generate the translated article OUT in HTML format
 # from a PO file.  The result is further manipulated in the recipes.
+#
+# If a translator commits a PO file based on an old version of the
+# POT, it is not msgmerge'd as `make' considers the corresponding
+# `$(1).po' target up-to-date.  As a result, the generated HTML
+# translations has English strings (but no fuzzy strings in the PO)
+# since there's no match between msgid/msgstr.  Invoke update-po
+# unconditionally to cope with that (valid) scenario.
 define generate-html
+$(call update-po,$$$$PO,$$$${PO%$(1).po}pot); \
 $(PO4A_TRANSLATE) $(PO4A-XHTMLFLAGS) $(PO4A-TRANSLATEFLAGS) \
-  --master $$< --po $$$$PO --localized $$$$OUT
+  --master $$< --po $$$$PO --localized $$$$OUT; \
+  $(call substitute-localized-includes,$(1)) $$$$OUT
 endef
 
 comma := ,
@@ -540,7 +549,8 @@
        PO=$(template-dir)/po/$$(*F).$(1).po ; $(check-po) \
          || (touch $$$$PO ; exit 1)
        $$(addfile)
-       PO=$(template-dir)/po/$$(*F).$(1).po OUT=$$@ ; $(generate-html)
+       PO=$(template-dir)/po/$$(*F).$(1).po OUT=$$@ ; \
+         $(call generate-html,$(1))
        $(SED) --in-place \
          ':egin;N;$$$$!begin;s/\([ \t]*\n[ \t]*\)\{3,\}<!--/\n\n<!--/g' $$@
 endef
@@ -560,10 +570,9 @@
 
 $(subst /po/,/,$(1)).$(2).html: $(subst /po/,/,$(1)).html \
                             $(1).$(2).po
-       PO=$(1).$(2).po ; $(check-po) \
-         || (touch $$$$PO ; exit 1)
+       PO=$(1).$(2).po ; $(check-po) || (touch $$$$PO ; exit 1)
        $$(addfile)
-       PO=$(1).$(2).po OUT=$$@ ; $(generate-html)
+       PO=$(1).$(2).po OUT=$$@ ; $(call generate-html,$(2))
        $(SED) --in-place \
          ':egin;N;$$$$!begin;s/\([ \t]*\n[ \t]*\)\{3,\}<!--/\n\n<!--/g' $$@
 endef
@@ -774,11 +783,9 @@
 # translator doesn't fix it quickly.
        PO=$(rootdir)/po/$(2).$(1).po ; $(check-po) || (touch $$$$PO ; exit 1)
        $$(addfile)
-# Unconditionally update the PO file; see the comment in `article-rules'.
-       $(call update-po,$(rootdir)/po/$(2).$(1).po,$(rootdir)/po/$(2).pot)
        $$(fixperm)
        PO=$(rootdir)/po/$(2).$(1).po OUT=$(rootdir)/po/$(2).$(1).m4 ; \
-         $(generate-html)
+         $(call generate-html,$(1))
        $(SED) --in-place \
          "s/\(<gnun>m4_include(\`.*\)\([.]html')<\/gnun>\)/\1.$(1)\2/g" \
          $(rootdir)/po/$(2).$(1).m4
@@ -787,7 +794,6 @@
        $(SED) --in-place \
          ':egin;N;$$$$!begin;s/\([ \t]*\n[ \t]*\)\{3,\}<!--/\n\n<!--/g' \
          $(rootdir)/po/$(2).$(1).m4
-       $(call substitute-localized-includes,$(1)) $(rootdir)/po/$(2).$(1).m4
        [ ! -f $(rootdir)/gnusflashes.$(1).include ] || $(SED) --in-place \
          "s/\(<!--#include file=\"gnusflashes*\)\(.include\" 
-->\)/\1.$(1)\2/g" \
          $(rootdir)/po/$(2).$(1).m4
@@ -877,24 +883,16 @@
          if test -f $$(@F).hook-ann; then \
            echo "gnun-do-not-delete-me" > $$(@F).hook-ann; \
          fi; exit 1)
-# If a translator commits a PO file based on an old version of the
-# POT, it is not msgmerge'd as `make' considers the corresponding
-# `$(1).po' target up-to-date.  As a result, the generated HTML
-# translations has English strings (but no fuzzy strings in the PO)
-# since there's no match between msgid/msgstr.  Invoke msgmerge
-# unconditionally to cope with that (valid) scenario.
-       $(call update-po,$(1).po,$(basename $(1)).pot)
 # This is needed for only a few articles, but as it is harmless there
 # is no real need to determine them and run the command conditionally.
        $$(fixperm)
-       PO=$(1).po OUT=$(1).m4 ; $(generate-html)
+       PO=$(1).po OUT=$(1).m4 ; $(call generate-html,$(2))
        $(SED) --in-place \
          "s/\(<gnun>m4_include(\`.*\)\([.]html')<\/gnun>\)/\1.$(2)\2/g" $(1).m4
        $(SED) --in-place "s/<gnun>\(.*\)<\/gnun>/\1/g" $(1).m4
        $(SED) --in-place \
          ':egin;N;$$$$!begin;s/\([ \t]*\n[ \t]*\)\{3,\}<!--/\n\n<!--/g' \
          $(1).m4
-       $(call substitute-localized-includes,$(2)) $(1).m4
 # If GRACE is not defined, which is the usual case for local manual
 # builds, update the target and validate the result.
 ifndef GRACE



reply via email to

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