Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

1 changed file:

Changes:

  • projects/firefox/build
    ... ... @@ -114,6 +114,8 @@ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
    114 114
     # Create .mozbuild to avoid interactive prompt in configure
    
    115 115
     mkdir "$HOME/.mozbuild"
    
    116 116
     
    
    117
    +branding_dir=browser/branding/[% c("var/branding_directory_prefix") %]-[% c("var/channel") %]
    
    118
    +
    
    117 119
     [% IF c("var/has_l10n") -%]
    
    118 120
       supported_locales="[% tmpl(c('var/locales').join(' ')) %]"
    
    119 121
     
    
    ... ... @@ -129,28 +131,30 @@ mkdir "$HOME/.mozbuild"
    129 131
       for lang in $supported_locales; do
    
    130 132
         # Fluent
    
    131 133
         mv $lang/base-browser.ftl "$l10ncentral/$lang/toolkit/toolkit/global/"
    
    132
    -    # Properties (they use a different directory)
    
    133
    -    mv $lang/* "$l10ncentral/$lang/browser/chrome/browser/"
    
    134 134
       done
    
    135 135
       popd
    
    136 136
     
    
    137 137
       [% IF c("var/tor-browser") -%]
    
    138
    -    # We will have to keep the torbutton.jar until we stop using dtds, because
    
    139
    -    # if we move them to the browser locale directory, browser.xhtml is not
    
    140
    -    # loaded.
    
    141 138
         tar -C "$rootdir" -xf "$rootdir/[% c('input_files_by_name/translation-tor-browser') %]"
    
    142
    -    transl_tor_browser="$rootdir/translation-tor-browser"
    
    139
    +    pushd "$rootdir/translation-tor-browser"
    
    140
    +    ln -s ja ja-JP-mac
    
    141
    +    for lang in $supported_locales; do
    
    142
    +      mv $lang/tor-browser.ftl "$l10ncentral/$lang/toolkit/toolkit/global/"
    
    143
    +      # Branding. Currently all releases use the same branding.
    
    144
    +      l10n_branding_dir="$l10ncentral/$lang/$branding_dir/"
    
    145
    +      mkdir -p "$l10n_branding_dir"
    
    146
    +      mv $lang/branding/brand.ftl "$l10n_branding_dir"
    
    147
    +      mv $lang/brand.properties "$l10n_branding_dir"
    
    148
    +    done
    
    149
    +    popd
    
    150
    +
    
    151
    +    # torbutton properties files.
    
    152
    +    # TODO: Remove once we no longer have torbutton locale files.
    
    143 153
         torbutton_locales="toolkit/torbutton/chrome/locale/"
    
    144 154
         torbutton_jar="toolkit/torbutton/jar.mn"
    
    145 155
         for lang in $supported_locales; do
    
    146
    -      source_lang=$lang
    
    147
    -      [% IF c("var/macos") -%]
    
    148
    -        if [ "$lang" == "ja-JP-mac" ]; then
    
    149
    -          source_lang="ja"
    
    150
    -        fi
    
    151
    -      [% END -%]
    
    152
    -      mv "$transl_tor_browser/$source_lang/tor-browser.ftl" "$l10ncentral/$lang/toolkit/toolkit/global/"
    
    153
    -      mv "$transl_tor_browser/$source_lang" "$torbutton_locales/$lang"
    
    156
    +      mkdir -p "$torbutton_locales/$lang"
    
    157
    +      mv "$rootdir/translation-tor-browser/$lang"/*.properties "$torbutton_locales/$lang/"
    
    154 158
           echo "% locale torbutton $lang %locale/$lang/" >> "$torbutton_jar"
    
    155 159
           echo "    locale/$lang (chrome/locale/$lang/*)" >> "$torbutton_jar"
    
    156 160
         done
    
    ... ... @@ -176,7 +180,7 @@ echo "Starting ./mach configure $(date)"
    176 180
       --with-distribution-id=org.torproject \
    
    177 181
       --with-base-browser-version=[% c("var/torbrowser_version") %] \
    
    178 182
       [% IF c("var/updater_enabled") -%]--enable-update-channel=[% c("var/channel") %][% END %] \
    
    179
    -  [% IF !c("var/base-browser") -%]--with-branding=browser/branding/[% c("var/branding_directory_prefix") %]-[% c("var/channel") %][% END %] \
    
    183
    +  [% IF !c("var/base-browser") -%]--with-branding="$branding_dir"[% END %] \
    
    180 184
       [% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %]
    
    181 185
     
    
    182 186
     echo "Starting ./mach build $(date)"