This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch main in repository builders/tor-browser-build.
The following commit(s) were added to refs/heads/main by this push: new 732880f Bug 40588: Bundle translations for New Identity and Security Level 732880f is described below
commit 732880f6dab49c7a2e357c7dcc1883e21f423635 Author: Pier Angelo Vendrame pierov@torproject.org AuthorDate: Wed Aug 3 19:52:37 2022 +0200
Bug 40588: Bundle translations for New Identity and Security Level
We may do something smarter in the future, to avoid cloning translation.git many times. --- projects/firefox/build | 21 +++++++++++++++++++++ projects/firefox/config | 2 ++ projects/translation-base-browser/build | 8 ++++++++ projects/translation-base-browser/config | 5 +++++ 4 files changed, 36 insertions(+)
diff --git a/projects/firefox/build b/projects/firefox/build index 999d79c..13be93a 100644 --- a/projects/firefox/build +++ b/projects/firefox/build @@ -61,6 +61,9 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
mkdir -p $distdir/[% IF ! c("var/osx") %]Browser[% END %]
+tar -xf $rootdir/[% c('input_files_by_name/translation-base-browser') %] +transl_base_browser=$rootdir/translation-base-browser + cd /var/tmp/build/[% project %]-[% c("version") %] cat > .mozconfig << 'MOZCONFIG_EOF' [% INCLUDE mozconfig %] @@ -106,6 +109,24 @@ fi sed -i 's|^URL=https://aus1%5C.torproject%5C.org/.*%7CURL=https://nightlies.tbb.torproject.... c("var/osname") %]/%CHANNEL%/%BUILD_TARGET%/%VERSION%/%LOCALE%|' build/application.ini.in [% END -%]
+add_translation () { + transl_dir=$1 + component=$2 + lang=$3 + filename=$4 + + mkdir "browser/components/$component/locale/$lang" + cp "$transl_dir/$lang/$filename" "browser/components/$component/locale/$lang/" + echo "% locale $component $lang %locale/$lang/" >> "browser/components/$component/jar.mn" + echo " locale/$lang/$filename (locale/$lang/$filename)" >> "browser/components/$component/jar.mn" +} + +[% FOREACH lang = c('var/locales') %] + [% SET lang = tmpl(lang) %] + add_translation $transl_base_browser newidentity '[% lang %]' newIdentity.properties + add_translation $transl_base_browser securitylevel '[% lang %]' securityLevel.properties +[% END %] + rm -f configure rm -f js/src/configure
diff --git a/projects/firefox/config b/projects/firefox/config index bc8d2e2..af58b34 100644 --- a/projects/firefox/config +++ b/projects/firefox/config @@ -170,6 +170,8 @@ input_files: - project: tor-launcher name: tor-launcher enable: '[% c("var/tor-browser") %]' + - project: translation-base-browser + name: translation-base-browser - filename: namecoin-torbutton.patch enable: '[% c("var/namecoin") %]' # TorButton patch authored by Arthur Edelstein, from https://github.com/arthuredelstein/torbutton/ branch 2.1.10-namecoin diff --git a/projects/translation-base-browser/build b/projects/translation-base-browser/build new file mode 100644 index 0000000..ac0f21b --- /dev/null +++ b/projects/translation-base-browser/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/translation-base-browser/config b/projects/translation-base-browser/config new file mode 100644 index 0000000..6907519 --- /dev/null +++ b/projects/translation-base-browser/config @@ -0,0 +1,5 @@ +# vim: filetype=yaml sw=2 +filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz' +git_url: https://git.torproject.org/translation.git +git_hash: d2eaf8a92c17afbe065cdb4d47d0084785f496da +version: '[% c("abbrev") %]'
tbb-commits@lists.torproject.org