]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2576: Make translate target obey --disable-auto-locale
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 23 Jan 2009 23:38:10 +0000 (12:38 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 23 Jan 2009 23:38:10 +0000 (12:38 +1300)
configure.in
errors/Makefile.am

index 70d847769c4d2fd897b9820ec41f981139ca75a3..42f52641d59027c28fb2853eec568610c0857a18 100644 (file)
@@ -3764,7 +3764,6 @@ fi
 
 dnl Squid now has .po translation capability, given the right toolkit
 AX_WITH_PROG([PO2HTML],[po2html])
-AC_SUBST(PO2HTML)
 
 dnl Squid now has limited locale handling ...
 dnl on error pages
@@ -3784,7 +3783,10 @@ if test "$use_errlocale" = "yes" ; then
 else
     echo "Disabling Multi-Language Support"
     AC_DEFINE(USE_ERR_LOCALES,0,[Use multi-language support on error pages])
+    dnl So we don't want to even attempt translation if its forcibly disabled.
+    PO2HTML="off"
 fi
+AC_SUBST(PO2HTML)
 
 dnl Need the debugging version of malloc if available
 XTRA_OBJS=''
index f4d9bad0d22f51c830dd048af82287733771e039..0480a0c6788a02daa75953938527c1ada4441ccc 100644 (file)
@@ -142,7 +142,7 @@ dist-hook:
        cp -p $(srcdir)/errorpage.css  $(distdir)/errorpage.css
 
 translate:
-       @ if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no"; then \
+       @ if test "$(PO2HTML)" != "" && test "$(PO2HTML)" != "no" && test "$(PO2HTML)" != "off"; then \
          for lang in $(TRANSLATIONS); do \
                test -d $$lang && rm -r $$lang; \
                mkdir $$lang; \
@@ -155,7 +155,11 @@ translate:
                cd ..; \
          done; \
        else \
-         echo "WARNING: Translation toolkit was not detected."; \
+         if test "$(PO2HTML)" = "off" ; then \
+           echo "WARNING: Translation is disabled."; \
+         else \
+           echo "WARNING: Translation toolkit was not detected."; \
+         fi; \
          echo "A drop-in bundle of pre-translated files is available from"; \
          echo "http://www.squid-cache.org/Versions/langpack/"; \
        fi