[tbb-commits] [tor-browser-bundle/master] Bug 10140: Support platform specific langpacks

gk at torproject.org gk at torproject.org
Thu Sep 3 11:51:14 UTC 2015


commit 5b34c06405a5524a5bc2b8ba42fd0587086dd52c
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Tue Sep 1 10:54:30 2015 +0000

    Bug 10140: Support platform specific langpacks
    
    This patch allows to fetch Linux/Windows/OSX-specific language packs.
    Furthermore, it enables Japanese.
---
 gitian/descriptors/linux/gitian-bundle.yml   |    3 ++-
 gitian/descriptors/mac/gitian-bundle.yml     |    3 ++-
 gitian/descriptors/windows/gitian-bundle.yml |    3 ++-
 gitian/fetch-inputs.sh                       |   20 ++++++++++++++++++++
 gitian/versions                              |    4 ++++
 gitian/versions.alpha                        |    3 +++
 gitian/versions.beta                         |    3 +++
 gitian/versions.nightly                      |    3 +++
 8 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/gitian/descriptors/linux/gitian-bundle.yml b/gitian/descriptors/linux/gitian-bundle.yml
index f1d0554..afb632e 100644
--- a/gitian/descriptors/linux/gitian-bundle.yml
+++ b/gitian/descriptors/linux/gitian-bundle.yml
@@ -182,7 +182,8 @@ script: |
   #
   unzip linux-langpacks.zip
   cd linux-langpacks
-  for LANG in $BUNDLE_LOCALES
+  LINUX_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_LINUX"
+  for LANG in $LINUX_LOCALES
   do
     xpi=$LANG.xpi
     cp -a ../tor-browser ../tor-browser_$LANG
diff --git a/gitian/descriptors/mac/gitian-bundle.yml b/gitian/descriptors/mac/gitian-bundle.yml
index a956fa7..dabe619 100644
--- a/gitian/descriptors/mac/gitian-bundle.yml
+++ b/gitian/descriptors/mac/gitian-bundle.yml
@@ -208,7 +208,8 @@ script: |
   #
   unzip mac-langpacks.zip
   cd mac-langpacks
-  for LANG in $BUNDLE_LOCALES
+  MAC_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_MAC"
+  for LANG in $MAC_LOCALES
   do
     xpi=$LANG.xpi
     DEST=$TORBROWSER_APP
diff --git a/gitian/descriptors/windows/gitian-bundle.yml b/gitian/descriptors/windows/gitian-bundle.yml
index c674e1b..649ff53 100644
--- a/gitian/descriptors/windows/gitian-bundle.yml
+++ b/gitian/descriptors/windows/gitian-bundle.yml
@@ -173,7 +173,8 @@ script: |
   #
   unzip ../win32-langpacks.zip
   cd win32-langpacks
-  for LANG in $BUNDLE_LOCALES
+  WIN32_LOCALES="$BUNDLE_LOCALES $BUNDLE_LOCALES_WIN32"
+  for LANG in $WIN32_LOCALES
   do
     xpi=$LANG.xpi
     cp $xpi ../"Tor Browser"/Browser/TorBrowser/Data/Browser/profile.default/extensions/langpack-$LANG at firefox.mozilla.org.xpi
diff --git a/gitian/fetch-inputs.sh b/gitian/fetch-inputs.sh
index a97ff62..42efa33 100755
--- a/gitian/fetch-inputs.sh
+++ b/gitian/fetch-inputs.sh
@@ -177,6 +177,7 @@ do
    fi
 done
 
+# Fetch the common langpacks first, then the platform specific ones if any.
 mkdir -p langpacks-$FIREFOX_LANG_VER/linux-langpacks
 mkdir -p langpacks-$FIREFOX_LANG_VER/win32-langpacks
 mkdir -p langpacks-$FIREFOX_LANG_VER/mac-langpacks
@@ -196,6 +197,25 @@ do
   cd ..
 done
 
+for i in $BUNDLE_LOCALES_LINUX
+do
+  cd linux-langpacks
+  wget -U "" -N "https://ftp.mozilla.org/pub/mozilla.org/firefox/candidates/${FIREFOX_LANG_VER}-candidates/${FIREFOX_LANG_BUILD}/linux-i686/xpi/$i.xpi"
+  cd ..
+done
+for i in $BUNDLE_LOCALES_WIN32
+do
+  cd win32-langpacks
+  wget -U "" -N "https://ftp.mozilla.org/pub/mozilla.org/firefox/candidates/${FIREFOX_LANG_VER}-candidates/${FIREFOX_LANG_BUILD}/win32/xpi/$i.xpi"
+  cd ..
+done
+for i in $BUNDLE_LOCALES_MAC
+do
+  cd mac-langpacks
+  wget -U "" -N "https://ftp.mozilla.org/pub/mozilla.org/firefox/candidates/${FIREFOX_LANG_VER}-candidates/${FIREFOX_LANG_BUILD}/mac/xpi/$i.xpi"
+  cd ..
+done
+
 "$WRAPPER_DIR/build-helpers/dzip.sh" ../win32-langpacks.zip win32-langpacks
 "$WRAPPER_DIR/build-helpers/dzip.sh" ../linux-langpacks.zip linux-langpacks
 "$WRAPPER_DIR/build-helpers/dzip.sh" ../mac-langpacks.zip mac-langpacks
diff --git a/gitian/versions b/gitian/versions
index 3df967e..b833342 100755
--- a/gitian/versions
+++ b/gitian/versions
@@ -1,5 +1,9 @@
 TORBROWSER_VERSION_TYPE=release
 BUNDLE_LOCALES="ar de es-ES fa fr it ko nl pl pt-PT ru tr vi zh-CN"
+BUNDLE_LOCALES_LINUX="ja"
+BUNDLE_LOCALES_WIN32="ja"
+BUNDLE_LOCALES_MAC="ja-JP-mac"
+
 BUILD_PT_BUNDLES=1
 
 VERIFY_TAGS=1
diff --git a/gitian/versions.alpha b/gitian/versions.alpha
index 5005445..f37b98a 100755
--- a/gitian/versions.alpha
+++ b/gitian/versions.alpha
@@ -1,5 +1,8 @@
 TORBROWSER_VERSION_TYPE=alpha
 BUNDLE_LOCALES="ar de es-ES fa fr it ko nl pl pt-PT ru tr vi zh-CN"
+BUNDLE_LOCALES_LINUX="ja"
+BUNDLE_LOCALES_WIN32="ja"
+BUNDLE_LOCALES_MAC="ja-JP-mac"
 BUILD_PT_BUNDLES=1
 
 VERIFY_TAGS=1
diff --git a/gitian/versions.beta b/gitian/versions.beta
index 343d4b5..c2143a0 100755
--- a/gitian/versions.beta
+++ b/gitian/versions.beta
@@ -1,5 +1,8 @@
 TORBROWSER_VERSION_TYPE=beta
 BUNDLE_LOCALES="ar de es-ES fa fr it ko nl pl pt-PT ru tr vi zh-CN"
+BUNDLE_LOCALES_LINUX="ja"
+BUNDLE_LOCALES_WIN32="ja"
+BUNDLE_LOCALES_MAC="ja-JP-mac"
 BUILD_PT_BUNDLES=1
 
 VERIFY_TAGS=1
diff --git a/gitian/versions.nightly b/gitian/versions.nightly
index afb82c5..f0551f5 100755
--- a/gitian/versions.nightly
+++ b/gitian/versions.nightly
@@ -3,6 +3,9 @@ TORBROWSER_VERSION=tbb-nightly
 TORBROWSER_BUILDDIR=tbb-nightly
 TORBROWSER_SYMLINK_VERSION=0
 BUNDLE_LOCALES="ar ru zh-CN"
+BUNDLE_LOCALES_LINUX="ja"
+BUNDLE_LOCALES_WIN32="ja"
+BUNDLE_LOCALES_MAC="ja-JP-mac"
 BUILD_PT_BUNDLES=1
 
 VERIFY_TAGS=0



More information about the tbb-commits mailing list