[tor-commits] [tor-browser-build/master] Bug 30016: Localize bootstrap-/bridge-related strings for mobile

boklm at torproject.org boklm at torproject.org
Wed Apr 10 23:24:07 UTC 2019


commit a901b95e48702cba67a5838244a5773a6843e5ba
Author: Georg Koppen <gk at torproject.org>
Date:   Sun Apr 7 06:30:08 2019 +0000

    Bug 30016: Localize bootstrap-/bridge-related strings for mobile
---
 projects/firefox/build          | 5 ++++-
 projects/firefox/config         | 3 +++
 projects/tba-translation/build  | 8 ++++++++
 projects/tba-translation/config | 7 +++++++
 4 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/projects/firefox/build b/projects/firefox/build
index 9bc025a..1d9faac 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -108,9 +108,10 @@ mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig
   cp -r $gradle_repo/guardianproject/gpmaven/master/* $gradle_repo
   # Move orbot files so they will be included in the apk during the build
   cp $rootdir/[% c('input_files_by_name/orbot') %]/* mobile/android/app
-  # Prepare building the multi-locale .apk
+  # Prepare building the multi-locale .apk including our own strings
   mkdir -p /var/tmp/dist/locales
   tar -C /var/tmp/dist/locales -xf $rootdir/[% c('input_files_by_name/firefox-locale-bundle') %]
+  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/tba-translation') %]
 [% END %]
 
 eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] [% c("var/torbrowser_version") %])
@@ -163,6 +164,8 @@ rm -f js/src/configure
   # Building a multi-locale .apk
   [% FOREACH lang = c('var/locales') %]
     [% SET lang = tmpl(lang) %]
+    # Copy our torbrowser_strings.dtd at the right place
+    cp /var/tmp/dist/tba-translation/[% lang %]/torbrowser_strings.dtd /var/tmp/dist/locales/[% lang %]/mobile/android/base/
     ./mach build chrome-[% lang %];
   [% END %]
   export MOZ_CHROME_MULTILOCALE='[% tmpl(c('var/locales').join(' ')) %]'
diff --git a/projects/firefox/config b/projects/firefox/config
index 679aaee..9eabf05 100644
--- a/projects/firefox/config
+++ b/projects/firefox/config
@@ -166,3 +166,6 @@ input_files:
   - project: firefox-locale-bundle
     name: firefox-locale-bundle
     enable: '[% c("var/android") %]'
+  - project: tba-translation
+    name: tba-translation
+    enable: '[% c("var/android") %]'
diff --git a/projects/tba-translation/build b/projects/tba-translation/build
new file mode 100644
index 0000000..ac0f21b
--- /dev/null
+++ b/projects/tba-translation/build
@@ -0,0 +1,8 @@
+#!/bin/bash
+[% c("var/set_default_env") -%]
+tar xf [% project %]-[% c("version") %].tar.gz
+mv [% project %]-[% c("version") %] [% project %]
+[% c('tar', {
+        tar_src => [ project ],
+        tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
+    }) %]
diff --git a/projects/tba-translation/config b/projects/tba-translation/config
new file mode 100644
index 0000000..fd31b01
--- /dev/null
+++ b/projects/tba-translation/config
@@ -0,0 +1,7 @@
+# vim: filetype=yaml sw=2
+filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
+git_url: https://git.torproject.org/translation.git
+# We need to bump the commit before releasing but just pointing to a branch
+# might cause too much rebuidling of the Firefox part.
+git_hash: 8da59b784ec6a8492805379903696647adbcfb97
+version: '[% c("abbrev") %]'





More information about the tor-commits mailing list