Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications /
tor-browser-build
Commits:
61b37707 by Henry Wilkes at 2024-12-03T13:51:42+00:00
Bug 43336: Update handling of translation files.
We make the handling of translation files more consistent between
builds.
For `base-browser` files:
+ We no longer copy to `browser/chrome/browser/` because we no longer
have .properties files in this branch.
For `tor-browser` files:
+ We use a symbolic link to translate from ja to ja-JP-mac.
+ We use pushd and popd.
+ We only copy the .properties files to torbutton since these are the
only files left in this directory.
- - - - -
6cf8f931 by Henry Wilkes at 2024-12-04T15:49:59+00:00
Bug 43336: Move tor-browser branding files to branding directory.
- - - - -
1 changed file:
- projects/firefox/build
Changes:
=====================================
projects/firefox/build
=====================================
@@ -114,6 +114,8 @@ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
# Create .mozbuild to avoid interactive prompt in configure
mkdir "$HOME/.mozbuild"
+branding_dir=browser/branding/[% c("var/branding_directory_prefix") %]-[%
c("var/channel") %]
+
[% IF c("var/has_l10n") -%]
supported_locales="[% tmpl(c('var/locales').join(' ')) %]"
@@ -129,28 +131,30 @@ mkdir "$HOME/.mozbuild"
for lang in $supported_locales; do
# Fluent
mv $lang/base-browser.ftl "$l10ncentral/$lang/toolkit/toolkit/global/"
- # Properties (they use a different directory)
- mv $lang/* "$l10ncentral/$lang/browser/chrome/browser/"
done
popd
[% IF c("var/tor-browser") -%]
- # We will have to keep the torbutton.jar until we stop using dtds, because
- # if we move them to the browser locale directory, browser.xhtml is not
- # loaded.
tar -C "$rootdir" -xf "$rootdir/[%
c('input_files_by_name/translation-tor-browser') %]"
- transl_tor_browser="$rootdir/translation-tor-browser"
+ pushd "$rootdir/translation-tor-browser"
+ ln -s ja ja-JP-mac
+ for lang in $supported_locales; do
+ mv $lang/tor-browser.ftl "$l10ncentral/$lang/toolkit/toolkit/global/"
+ # Branding. Currently all releases use the same branding.
+ l10n_branding_dir="$l10ncentral/$lang/$branding_dir/"
+ mkdir -p "$l10n_branding_dir"
+ mv $lang/branding/brand.ftl "$l10n_branding_dir"
+ mv $lang/brand.properties "$l10n_branding_dir"
+ done
+ popd
+
+ # torbutton properties files.
+ # TODO: Remove once we no longer have torbutton locale files.
torbutton_locales="toolkit/torbutton/chrome/locale/"
torbutton_jar="toolkit/torbutton/jar.mn"
for lang in $supported_locales; do
- source_lang=$lang
- [% IF c("var/macos") -%]
- if [ "$lang" == "ja-JP-mac" ]; then
- source_lang="ja"
- fi
- [% END -%]
- mv "$transl_tor_browser/$source_lang/tor-browser.ftl"
"$l10ncentral/$lang/toolkit/toolkit/global/"
- mv "$transl_tor_browser/$source_lang" "$torbutton_locales/$lang"
+ mkdir -p "$torbutton_locales/$lang"
+ mv "$rootdir/translation-tor-browser/$lang"/*.properties
"$torbutton_locales/$lang/"
echo "% locale torbutton $lang %locale/$lang/" >> "$torbutton_jar"
echo " locale/$lang (chrome/locale/$lang/*)" >> "$torbutton_jar"
done
@@ -176,7 +180,7 @@ echo "Starting ./mach configure $(date)"
--with-distribution-id=org.torproject \
--with-base-browser-version=[% c("var/torbrowser_version") %] \
[% IF c("var/updater_enabled") -%]--enable-update-channel=[%
c("var/channel") %][% END %] \
- [% IF !c("var/base-browser") -%]--with-branding=browser/branding/[%
c("var/branding_directory_prefix") %]-[% c("var/channel") %][% END %] \
+ [% IF !c("var/base-browser") -%]--with-branding="$branding_dir"[% END %] \
[% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %]
echo "Starting ./mach build $(date)"
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/b7c816f839c914e9136ac343ebe23a996fb87fab...6cf8f9318376d5a3f51ce6f0ead96171c777593f
--
View it on GitLab:
https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/compare/b7c816f839c914e9136ac343ebe23a996fb87fab...6cf8f9318376d5a3f51ce6f0ead96171c777593f
You're receiving this email because of your account on gitlab.torproject.org.
_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]