]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Translation: auto-generate the lists of available translation files
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 2 Jun 2011 10:39:53 +0000 (04:39 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 2 Jun 2011 10:39:53 +0000 (04:39 -0600)
Use automake includes built during source maintenance and stored in VCS.
Avoiding earlier problems encountered with the approaches attempting to
bootstrap the translation from within Makefile.

This also generates relevant lists for the manual pages. Preparing to
translate those automatically as well.

doc/manuals/Makefile.am
doc/manuals/language.list [new file with mode: 0644]
errors/Makefile.am
errors/language.list [new file with mode: 0644]
errors/list [deleted file]
errors/template.list [new file with mode: 0644]
scripts/source-maintenance.sh

index 173243e1b42ed8ae7e9c431024eac00a3a51324f..95609ddb0655063e351c546d36345556a0f44eeb 100644 (file)
@@ -2,4 +2,7 @@
 ## None of the .po or .pot are distributed for builds at this stage.
 ##
 
-EXTRA_DIST =
+include $(srcdir)/language.list
+
+EXTRA_DIST = \
+       language.list
diff --git a/doc/manuals/language.list b/doc/manuals/language.list
new file mode 100644 (file)
index 0000000..9588f60
--- /dev/null
@@ -0,0 +1,13 @@
+TRANSLATE_LANGUAGES= \
+    ar.lang \
+    cs.lang \
+    de.lang \
+    en.lang \
+    en_AU.lang \
+    es.lang \
+    fr.lang \
+    it.lang \
+    oc.lang \
+    pt.lang \
+    ro.lang \
+    ru.lang 
index 1c4b35fd43893ca92af8ee5c2eac369408dcbcb6..776ae2dd020c168a9f8b854b5e5e1cc704264316 100644 (file)
@@ -11,95 +11,14 @@ DEFAULT_ERROR_DIR   = $(errordir)
 DEFAULT_STYLESHEET     = $(sysconfdir)/errorpage.css
 
 ## List of automated translations possible:
-ERROR_TEMPLATES =  \
-       templates/ERR_ACCESS_DENIED \
-       templates/ERR_ACL_TIME_QUOTA_EXCEEDED \
-       templates/ERR_CACHE_ACCESS_DENIED \
-       templates/ERR_CACHE_MGR_ACCESS_DENIED \
-       templates/ERR_CANNOT_FORWARD \
-       templates/ERR_CONNECT_FAIL \
-       templates/ERR_DIR_LISTING \
-       templates/ERR_DNS_FAIL \
-       templates/ERR_ESI \
-       templates/ERR_FORWARDING_DENIED \
-       templates/ERR_FTP_DISABLED \
-       templates/ERR_FTP_FAILURE \
-       templates/ERR_FTP_FORBIDDEN \
-       templates/ERR_FTP_NOT_FOUND \
-       templates/ERR_FTP_PUT_CREATED \
-       templates/ERR_FTP_PUT_ERROR \
-       templates/ERR_FTP_PUT_MODIFIED \
-       templates/ERR_FTP_UNAVAILABLE \
-       templates/ERR_GATEWAY_FAILURE \
-       templates/ERR_ICAP_FAILURE \
-       templates/ERR_INVALID_REQ \
-       templates/ERR_INVALID_RESP \
-       templates/ERR_INVALID_URL \
-       templates/ERR_LIFETIME_EXP \
-       templates/ERR_NO_RELAY \
-       templates/ERR_ONLY_IF_CACHED_MISS \
-       templates/ERR_PRECONDITION_FAILED \
-       templates/ERR_READ_ERROR \
-       templates/ERR_READ_TIMEOUT \
-       templates/ERR_SECURE_CONNECT_FAIL \
-       templates/ERR_SHUTTING_DOWN \
-       templates/ERR_SOCKET_FAILURE \
-       templates/ERR_TOO_BIG \
-       templates/ERR_UNSUP_HTTPVERSION \
-       templates/ERR_UNSUP_REQ \
-       templates/ERR_URN_RESOLVE \
-       templates/ERR_WRITE_ERROR \
-       templates/ERR_ZERO_SIZE_OBJECT
-
-TRANSLATE_LANGUAGES = \
-       af.lang \
-       ar.lang \
-       az.lang \
-       bg.lang \
-       ca.lang \
-       cs.lang \
-       da.lang \
-       de.lang \
-       el.lang \
-       en.lang \
-       es.lang \
-       et.lang \
-       fa.lang \
-       fi.lang \
-       fr.lang \
-       he.lang \
-       hu.lang \
-       hy.lang \
-       id.lang \
-       it.lang \
-       ja.lang \
-       ko.lang \
-       lt.lang \
-       lv.lang \
-       ms.lang \
-       nl.lang \
-       oc.lang \
-       pl.lang \
-       pt-br.lang \
-       pt.lang \
-       ro.lang \
-       ru.lang \
-       sk.lang \
-       sl.lang \
-       sr-cyrl.lang \
-       sr-latn.lang \
-       sv.lang \
-       th.lang \
-       tr.lang \
-       uk.lang \
-       uz.lang \
-       vi.lang \
-       zh-cn.lang \
-       zh-tw.lang
+include $(srcdir)/template.list
+include $(srcdir)/language.list
 
 CLEANFILES = $(TRANSLATE_LANGUAGES) translate-warn
 EXTRA_DIST = \
        $(ERROR_TEMPLATES) \
+       language.list \
+       template.list \
        aliases alias-link.sh alias-upgrade errorpage.css TRANSLATORS COPYRIGHT
 
 all: all-am
diff --git a/errors/language.list b/errors/language.list
new file mode 100644 (file)
index 0000000..3366387
--- /dev/null
@@ -0,0 +1,45 @@
+TRANSLATE_LANGUAGES= \
+    af.lang \
+    ar.lang \
+    az.lang \
+    bg.lang \
+    ca.lang \
+    cs.lang \
+    da.lang \
+    de.lang \
+    el.lang \
+    en.lang \
+    es.lang \
+    et.lang \
+    fa.lang \
+    fi.lang \
+    fr.lang \
+    he.lang \
+    hu.lang \
+    hy.lang \
+    id.lang \
+    it.lang \
+    ja.lang \
+    ko.lang \
+    lt.lang \
+    lv.lang \
+    ms.lang \
+    nl.lang \
+    oc.lang \
+    pl.lang \
+    pt-br.lang \
+    pt.lang \
+    ro.lang \
+    ru.lang \
+    sk.lang \
+    sl.lang \
+    sr-cyrl.lang \
+    sr-latn.lang \
+    sv.lang \
+    th.lang \
+    tr.lang \
+    uk.lang \
+    uz.lang \
+    vi.lang \
+    zh-cn.lang \
+    zh-tw.lang 
diff --git a/errors/list b/errors/list
deleted file mode 100644 (file)
index 67388b4..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-ERR_ACCESS_DENIED
-ERR_CACHE_ACCESS_DENIED
-ERR_CACHE_MGR_ACCESS_DENIED
-ERR_CANNOT_FORWARD
-ERR_CONNECT_FAIL
-ERR_DIR_LISTING
-ERR_DNS_FAIL
-ERR_ESI
-ERR_FORWARDING_DENIED
-ERR_FTP_DISABLED
-ERR_FTP_FAILURE
-ERR_FTP_FORBIDDEN
-ERR_FTP_NOT_FOUND
-ERR_FTP_PUT_CREATED
-ERR_FTP_PUT_ERROR
-ERR_FTP_PUT_MODIFIED
-ERR_FTP_UNAVAILABLE
-ERR_ICAP_FAILURE
-ERR_INVALID_REQ
-ERR_INVALID_RESP
-ERR_INVALID_URL
-ERR_LIFETIME_EXP
-ERR_NO_RELAY
-ERR_ONLY_IF_CACHED_MISS
-ERR_PRECONDITION_FAILED
-ERR_READ_ERROR
-ERR_READ_TIMEOUT
-ERR_SECURE_CONNECT_FAIL
-ERR_SHUTTING_DOWN
-ERR_SOCKET_FAILURE
-ERR_TOO_BIG
-ERR_UNSUP_HTTPVERSION
-ERR_UNSUP_REQ
-ERR_URN_RESOLVE
-ERR_WRITE_ERROR
-ERR_ZERO_SIZE_OBJECT
diff --git a/errors/template.list b/errors/template.list
new file mode 100644 (file)
index 0000000..811d568
--- /dev/null
@@ -0,0 +1,42 @@
+ERROR_TEMPLATES= \
+    templates/ERR_ACCESS_DENIED \
+    templates/ERR_ACL_TIME_QUOTA_EXCEEDED \
+    templates/ERR_AGENT_CONFIGURE \
+    templates/ERR_AGENT_WPAD \
+    templates/ERR_CACHE_ACCESS_DENIED \
+    templates/ERR_CACHE_MGR_ACCESS_DENIED \
+    templates/ERR_CANNOT_FORWARD \
+    templates/ERR_CONNECT_FAIL \
+    templates/ERR_DIR_LISTING \
+    templates/ERR_DNS_FAIL \
+    templates/ERR_ESI \
+    templates/ERR_FORWARDING_DENIED \
+    templates/ERR_FTP_DISABLED \
+    templates/ERR_FTP_FAILURE \
+    templates/ERR_FTP_FORBIDDEN \
+    templates/ERR_FTP_NOT_FOUND \
+    templates/ERR_FTP_PUT_CREATED \
+    templates/ERR_FTP_PUT_ERROR \
+    templates/ERR_FTP_PUT_MODIFIED \
+    templates/ERR_FTP_UNAVAILABLE \
+    templates/ERR_GATEWAY_FAILURE \
+    templates/ERR_ICAP_FAILURE \
+    templates/ERR_INVALID_REQ \
+    templates/ERR_INVALID_RESP \
+    templates/ERR_INVALID_URL \
+    templates/ERR_LIFETIME_EXP \
+    templates/ERR_NO_RELAY \
+    templates/ERR_ONLY_IF_CACHED_MISS \
+    templates/ERR_PRECONDITION_FAILED \
+    templates/ERR_READ_ERROR \
+    templates/ERR_READ_TIMEOUT \
+    templates/ERR_SECURE_CONNECT_FAIL \
+    templates/ERR_SHUTTING_DOWN \
+    templates/ERR_SOCKET_FAILURE \
+    templates/ERR_TOO_BIG \
+    templates/ERR_UNSUP_HTTPVERSION \
+    templates/ERR_UNSUP_REQ \
+    templates/ERR_URN_RESOLVE \
+    templates/ERR_WRITE_ERROR \
+    templates/ERR_ZERO_SIZE_OBJECT \
+    templates/generic 
index b60a1f7fe4257b5d192a4a4b82a361bfe77b228d..22998d17ec7a63e3782ca009ccafd919b68f6424 100755 (executable)
@@ -127,7 +127,7 @@ echo "#endif" >>${ROOT}/lib/profiler/list
 echo "#endif" >>${ROOT}/lib/profiler/list
 mv ${ROOT}/lib/profiler/list ${ROOT}/lib/profiler/xprof_type.h
 
-# Build icons install include form current icons available
+# Build icons install include from current icons available
 (
 echo -n "ICONS="
 for f in `ls -1 ${ROOT}/icons/silk/*`
@@ -138,6 +138,39 @@ done
 echo " "
 )| sed s%${ROOT}/icons/%%g >${ROOT}/icons/list
 
+# Build templates install include from current templates available
+(
+echo -n "ERROR_TEMPLATES="
+for f in `ls -1 ${ROOT}/errors/templates/*`
+do
+       echo " \\"
+       echo -n "    ${f}"
+done
+echo " "
+)| sed s%${ROOT}/errors/%%g >${ROOT}/errors/template.list
+
+# Build errors translation install include from current .PO available
+(
+echo -n "TRANSLATE_LANGUAGES="
+for f in `ls -1 ${ROOT}/errors/*.po`
+do
+       echo " \\"
+       echo -n "    ${f}"
+done
+echo " "
+)| sed s%${ROOT}/errors/%%g | sed s%\.po%\.lang%g >${ROOT}/errors/language.list
+
+# Build manuals translation install include from current .PO available
+(
+echo -n "TRANSLATE_LANGUAGES="
+for f in `ls -1 ${ROOT}/doc/manuals/*.po`
+do
+       echo " \\"
+       echo -n "    ${f}"
+done
+echo " "
+)| sed s%${ROOT}/doc/manuals/%%g | sed s%\.po%\.lang%g >${ROOT}/doc/manuals/language.list
+
 # Run formating
 echo "" >${ROOT}/doc/debug-sections.tmp
 srcformat || exit 1