]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Wang DaQing <wdq@bigfoot.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 2 Mar 2009 12:13:26 +0000 (01:13 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 2 Mar 2009 12:13:26 +0000 (01:13 +1300)
Language: Simplified Chinese

1  2 
errors/Makefile.am

diff --combined errors/Makefile.am
index 5f9104d9c06cfa9761ce93309d273237b28d61d3,4049c935ec195523c78b933ab177567103e7bb6d..cb2e425ee9359979d47130e75c83e6fae6c0701d
@@@ -51,7 -51,6 +51,6 @@@ LANGUAGES     = 
                Lithuanian \
                Polish \
                Portuguese \
-               Simplify_Chinese \
                Slovak \
                Traditional_Chinese
  
@@@ -82,21 -81,18 +81,21 @@@ install-data-local
  
  
  uninstall-local:
 -      @ for l in $(LANGUAGES); do \
 -              for f in $(srcdir)/$$l/ERR_*; do \
 -                      rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
 +      @ for l in $(LANGUAGES) templates; do \
 +              for f in $(top_srcdir)/errors/$$l/ERR_*; do \
 +                      $(RM) $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
                done; \
        done; \
 -      for l in $(TRANSLATIONS) templates; do \
 -        if test -d $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; then \
 -              for f in $(srcdir)/$$l/ERR_*; do \
 -                      rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
 +      for l in $(TRANSLATIONS); do \
 +        if test -d $(srcdir)/errors/$$l; then \
 +              for f in $(srcdir)/errors/$$l/ERR_*; do \
 +                      if test -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; then \
 +                              $(RM) $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`basename $$f`; \
 +                      fi; \
                done; \
          fi \
 -      done; \
 +      done;
 +      @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh $(RM) $(DESTDIR)$(DEFAULT_STYLESHEET)
        rm -f $(DESTDIR)$(DEFAULT_STYLESHEET).default
  
  # undocumented hack.  You can use this target to create multi-lingual
@@@ -124,7 -120,7 +123,7 @@@ addlang: al
        fi \
        fi
  
 -dist-hook:
 +dist-hook: translate
        for lang in $(LANGUAGES) templates; do \
          if test -d $(srcdir)/$$lang ; then \
                test -d $(distdir)/$$lang \
                  || exit 1; \
          fi; \
        done; \
 -      $(MAKE) translate; \
        for lang in $(TRANSLATIONS); do \
          if test -d $$lang ; then \
                test -d $(distdir)/$$lang \
        cp -p $(srcdir)/errorpage.css  $(distdir)/errorpage.css
  
  translate:
 -      @ if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != "off"; then \
 +      @if ! test -f $(top_srcdir)/errors/en.po; then \
 +        echo "Translation is not currently possible."; \
 +        exit 0; \
 +      fi; \
 +      if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != "off" && test -f $(top_srcdir)/errors/en.po; then \
          for lang in $(TRANSLATIONS); do \
 -              test -d $$lang && rm -r $$lang; \
 -              mkdir $$lang; \
 -              cd $$lang; \
 +              test -d $(distdir)/$$lang && $(RM) -r $(distdir)/$$lang; \
 +              mkdir $(distdir)/$$lang; \
                echo -n "Translate '$$lang' ..."; \
 -              for f in `ls -1 ../$(srcdir)/templates`; do \
 -                      $(PO2HTML) --progress=none -i ../$(srcdir)/$$lang.po -t ../$(srcdir)/templates/$$f >$$f || exit 1; \
 +              for f in `ls -1 $(top_srcdir)/errors/templates`; do \
 +                      $(PO2HTML) --progress=none -i $(top_srcdir)/errors/$$lang.po -t $(top_srcdir)/errors/templates/$$f >$(distdir)/$$lang/$$f || exit 1; \
                done; \
                echo "done."; \
 -              cd ..; \
          done; \
        else \
          if test "$(PO2HTML)" = "off" ; then \
          echo "http://www.squid-cache.org/Versions/langpack/"; \
        fi
  
 -all:
 -      $(MAKE) translate
 +all: translate