Skip to content

Commit 6a4994d

Browse files
authored
Use compare-locales for parsing product repositories (#829)
1 parent c9bb9a4 commit 6a4994d

File tree

3 files changed

+211
-156
lines changed

3 files changed

+211
-156
lines changed

app/scripts/glossaire.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ function updateStandardRepo() {
154154
echogreen "Create ${repo_name^^} cache for $repo_name/$1"
155155
if [ "$1" = "en-US" ]
156156
then
157-
nice -20 $install/app/scripts/tmx_products.py ${!repo_source}/COMMUN/ ${!repo_source}/COMMUN/ en-US en-US $repo_name
157+
nice -20 $install/app/scripts/tmx_products.py ${!repo_source}/COMMUN/ en-US en-US $repo_name
158158
else
159-
nice -20 $install/app/scripts/tmx_products.py ${!repo_l10n}/$1/ ${!repo_source}/COMMUN/ $1 en-US $repo_name
159+
nice -20 $install/app/scripts/tmx_products.py ${!repo_l10n}/$1/ $1 en-US $repo_name
160160
fi
161161
}
162162

app/scripts/setup.sh

+16-11
Original file line numberDiff line numberDiff line change
@@ -74,26 +74,32 @@ function createSymlinks() {
7474
esac
7575
}
7676

77-
function checkoutSilme() {
78-
# Check out SILME library to a specific version (0.8.0)
79-
if [ ! -d $libraries/silme/.hg ]
77+
function setupExternalLibraries() {
78+
# Check out or update compare-locales library
79+
version="RELEASE_1_2_1"
80+
if [ ! -d $libraries/compare-locales/.hg ]
8081
then
81-
echogreen "Checking out the SILME library into $libraries"
82+
echogreen "Checking out compare-locales in $libraries"
8283
cd $libraries
83-
hg clone https://hg.mozilla.org/l10n/silme -u silme-0.8.0
84+
hg clone https://hg.mozilla.org/l10n/compare-locales -u $version
85+
cd $install
86+
else
87+
echogreen "Updating compare-locales in $libraries"
88+
cd $libraries/compare-locales
89+
hg pull -r default --update
90+
hg update $version
8491
cd $install
8592
fi
86-
}
8793

88-
function setupP12nExtract() {
94+
# Check out or update external p12n-extract library
8995
if [ ! -d $libraries/p12n/.git ]
9096
then
91-
echogreen "Checking out the p12n-extract library into $libraries"
97+
echogreen "Checking out the p12n-extract library in $libraries"
9298
cd $libraries
9399
git clone https://github.com/flodolo/p12n-extract/ p12n
94100
cd $install
95101
else
96-
echogreen "Updating the p12n-extract library into $libraries"
102+
echogreen "Updating the p12n-extract library in $libraries"
97103
cd $libraries/p12n
98104
git pull
99105
cd $install
@@ -246,8 +252,7 @@ else
246252
fi
247253
echo "${CURRENT_TIP:0:7}${DEV_VERSION}" > "${install}/cache/version.txt"
248254

249-
checkoutSilme
250-
setupP12nExtract
255+
setupExternalLibraries
251256

252257
initDesktopSourceRepo "central"
253258
initDesktopSourceRepo "release"

0 commit comments

Comments
 (0)