L10n:Migration
Jump to navigation
Jump to search
Clone everything that's needed
mkdir releases && cd releases hg clone http://hg.mozilla.org/releases/mozilla-aurora hg clone http://hg.mozilla.org/releases/mozilla-beta
mkdir -p l10n/mozilla-aurora mkdir -p l10n/mozilla-beta
Put this script (upclones.sh) in your $PATH:
#!/bin/bash HERE=`pwd` CHANNEL=$1 SHIPPEDLOCALES=$2 for loc in `cat $SHIPPEDLOCALES | awk '{print $1;}' | sort | uniq`; do if [[ $loc == 'en-US' ]]; then continue fi CLONE="$HERE/$loc" if [[ -d $CLONE/.hg ]]; then hg -R $CLONE pull -u else hg clone ssh://hg.mozilla.org/releases/l10n/mozilla-$CHANNEL/$loc $CLONE fi done
Clone the l10n repos:
cd releases/l10n/mozilla-aurora upclones.sh aurora ../../mozilla-aurora/browser/locales/shipped-locales
cd releases/l10n/mozilla-beta upclones.sh beta ../../mozilla-beta/browser/locales/shipped-locales
Check out https://l10n-stage-sj.mozilla.org/pushes/releases/l10n/mozilla to make sure you have the latest changesets in the l10n repos. If you don't, run upclones.sh again.
Merge
First, enable Axel's merge helper extension to hg:
hg clone http://hg.mozilla.org/users/axel_mozilla.com/branch-l10n/ ~/src/branch-l10n
Edit your ~/.hgrc accordingly:
[extensions] ... merge-l10n = ~/src/branch-l10n/merge_l10n.py
Try it out with:
hg help no-op-merge
If it shows the help screen, you can proceed with the merge
cd releases/ for loc in `cat mozilla-*a/browser/locales/shipped-locales|awk '{print $1;}'|sort|uniq`; do hg -R l10n/mozilla-beta/$loc no-op-merge -m"Migrating aurora to beta for Firefox 7" $PWD/l10n/mozilla-aurora/$loc; done
Push
Once the source migration is complete, push the merged repos back to h.m.o.
cd releases/
for loc in `ls -1`; do hg -R $loc push -f; done