Commit bad46e53 authored by boklm's avatar boklm Committed by Georg Koppen
Browse files

Bug 26843: Get l10n-changesets.json from tor-browser.git

The json file used by projects/firefox-locale-bundle is only available
from https://product-details.mozilla.org/ after a build has been
shipped, which is too late for us. However, it is also available from
the firefox sources tree, so we can get it from our tor-browser.git
clone instead.

The format of this json file is a little different, so we also need to
adapt the get_hg_hash script.
parent c359853b
......@@ -2,6 +2,10 @@
[% c("var/set_default_env") -%]
cat > l10n-changesets.json << 'EOF_CHANGESETS'
[% pc('firefox', 'var/l10n-changesets.json') %]
EOF_CHANGESETS
clone_dir='[% c("basedir") %]/hg_clones/[% project %]'
mkdir -p "$clone_dir"
cd "$clone_dir"
......@@ -19,7 +23,7 @@ tmpdir=$(mktemp -d)
cd [% lang %]
fi
hg_hash=$([% c("basedir") %]/projects/firefox-locale-bundle/get_hg_hash \
$rootdir/[% c('input_files_by_name/firefox_json') %] \
$rootdir/l10n-changesets.json \
[% lang %])
[% c("hg") %] archive -r "$hg_hash" -t files "$tmpdir"/[% lang %]
cd ..
......
......@@ -6,7 +6,3 @@ var:
use_container: 0
ff_version: '[% pc("firefox", "var/firefox_version") %]'
ff_build: build1
input_files:
- name: firefox_json
URL: 'https://product-details.mozilla.org/1.0/l10n/Firefox-[% c("var/ff_version") %]-[% c("var/ff_build") %].json'
......@@ -16,6 +16,6 @@ exit_error("Error reading $file", 2) unless defined $json_text;
my $data = decode_json($json_text);
my $changeset = $data->{locales}{$locale}{changeset};
my $changeset = $data->{$locale}{revision};
exit_error("Can't find locale $locale in $file", 3) unless $changeset;
print "$changeset\n";
......@@ -24,6 +24,8 @@ var:
use_container: 1
# this should be updated when the list of gradle dependencies is changed
gradle_dependencies_version: 3
# used by projects/firefox-locale-bundle
l10n-changesets.json: '[% exec("cat mobile/locales/l10n-changesets.json") %]'
targets:
release:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment