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

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

Re: home.shtml: Make checks whether the HTML is decently generated.


From: Yavor Doganov
Subject: Re: home.shtml: Make checks whether the HTML is decently generated.
Date: Thu, 07 Feb 2008 16:28:15 +0200

Here is what I made up.  I'd like to install it for tonight's run, if it
appears OK.  (FWIW, the usage of findstring is absolutely intentional
here, in order to be able to validate more translations when other teams
join for the testing phase.)
*** GNUmakefile 06 фев 2008 18:14:03 +0200      1.31
--- GNUmakefile 07 фев 2008 16:19:24 +0200      
***************
*** 185,191 ****
--- 185,195 ----
        [ ! -f $(rootdir)/gnusflashes.$(1).include ] || $(SED) --in-place 
"s/\(<!--#include file=\"gnusflashes*\)\(.include\" -->\)/\1.$(1)\2/g" 
$(rootdir)/po/home.$(1).m4
  endif
        $(M4) $(rootdir)/po/home.$(1).m4 > $$@
+ # To validate Catalan translations, add `ca' after `bg' and update the
+ # variable `verbatim-templates' accordingly.
+ ifneq (,$(findstring $(1),bg))
        $(VALIDATESKIP) $(VALIDATE-HTML) $$@
+ endif
  endef
  
  $(foreach h_lang,$(HOME_LINGUAS),$(eval $(call home_rules,$(h_lang))))
***************
*** 220,226 ****
--- 224,232 ----
                $(SED) --in-place "s/\(<!--#include 
virtual=\".*$$$$replaceable\)\(.html\" -->\)/\1.$(2)\2/g" $(1).m4; \
        done;
        $(M4) $(1).m4 > $$@
+ ifneq (,$(findstring $(2),bg))
        $(VALIDATESKIP) $(VALIDATE-HTML) $$@
+ endif
  endef
  
  $(foreach base,$(ALL_BASE),$(eval $(call article_pot_rules,$(base))))
***************
*** 251,256 ****
--- 257,266 ----
  orig-articles := $(addsuffix .html,$(subst /po/,/,$(ALL_BASE)))
  files-to-sync := $(rootdir)/home.shtml $(orig-templates) $(orig-articles)
  abs-files-to-sync := $(subst $(rootdir)/,,$(files-to-sync))
+ # Templates that are not gettextized, but are necessary to reside in
+ # trans-coord for HTML validation at build time.
+ verbatim-templates := $(addprefix server/,header.html footer.html \
+                                         header.bg.html footer.bg.html)
  
  .PHONY: sync
  sync: 
***************
*** 261,266 ****
--- 271,283 ----
          else \
            cp -p --update $(wwwdir)/$$file $(rootdir)/$$file ; \
          fi ; done
+       for t in $(verbatim-templates) ; do \
+         if [ ! -f $(rootdir)/$$t ] ; then \
+           cp -p $(wwwdir)/$$t $(rootdir)/$$t \
+             && $(CVSSKIP) $(CVS) add $(rootdir)/$$t ; \
+         else \
+           cp -p --update $(wwwdir)/$$t $(rootdir)/$$t ; \
+         fi ; done
        cd $(rootdir) ; \
          $(CVSSKIP) $(CVS) commit -m \
          "Automatic sync from the master www repository."

reply via email to

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