Mercurial repository for l10n en-US files only from the frenchmozilla team

17 views
Skip to first unread message

Philippe

unread,
Aug 27, 2008, 6:03:42 PM8/27/08
to
Hi everyone.

Starting from the move to Mercurial, it's not possible to pull from the
repository only the en-US files.
With the help of the bind mount we have successfully made an hg
repository with only the needed */locales/en-US/ files and directories.
(11Mo for the en-US files against more than 670Mo for the whole
repositories)

It is accessible from http://hg.frenchmozilla.fr (DNS servers may not be
updated yet from your location).
The en-US repositories are updated each 30 minutes and if the changes
include en-US ones, they are synchronized in our repository (feeds are
up-to-date).

Our repository watches the following directories at the moment :

browser
dom
editor
extensions
mail
netwerk
other-licenses
security
suite
toolkit

The mozilla-central, comm-central, and dom-inspector are included
(mobile-browser is on its way).

Note that since venkman and irc are not (yet ?) directly on the
mozilla-central repo, it is also not in ours.


You can also clone our repository if you want with :
hg clone http://hg.frenchmozilla.fr/


The only thing I'm not happy with is that the original comment of the
en-US commit is not reported to the hg.frenchmozilla.fr comment.
I have some hints on how to make this, but it is not yet implemented (if
someone wants to help, he is welcome).

Hope this will help other localisers.

Philippe from the Frenchmozilla team.

####### Technical part, how it is done. #############

Firstly, I pulled the following 4 repositories :
hg clone http://hg.mozilla.org/comm-central/
hg clone http://hg.mozilla.org/mozilla-central/
hg clone http://hg.mozilla.org/mobile-browser/
hg clone http://hg.mozilla.org/dom-inspector/

This gave me 4 directories.

For each en-US localizable directories, I reproduced the l10n scheme in
a new L10N_EN-US directory:
browser dom editor extensions mail netwerk other-licenses security
suite toolkit

For instance, for the browser directory : L10N-EN-US/browser/locales/en-US/

I "bind" mounted the en-US directories from the hg.mozilla.org
repositories into my new directory.
That gave me for the browser one, into the /etc/fstab file (in one line):
"
/srv/d_frmoz/DONNEES/HG/mozilla-central/browser/locales/en-US
/srv/d_frmoz/DONNEES/HG/L10N-EN-US/browser/locales/en-US none
defaults,bind 0 0
"

When all the repositories are mounted, I created our mercurial
repository with the command:
hg init
hg update

Here is the 30 minute cron scheduled script:
*************************************
#!/bin/bash

cd /srv/d_frmoz/DONNEES/HG/comm-central/
hg pull -u


cd /srv/d_frmoz/DONNEES/HG/mozilla-central/
hg pull -u

cd /srv/d_frmoz/DONNEES/HG/mobile-browser/
hg pull -u

cd /srv/d_frmoz/DONNEES/HG/dom-inspector/
hg pull -u

cd /srv/d_frmoz/DONNEES/HG/L10N-EN-US/

hg addremove
hg diff > ../diff.tmp

if [ -s ../diff.tmp ]; then
date=`date`
suffix=$(date +%s)
cp ../diff.tmp ../DIFF/diff_$suffix.txt
rm -f ../diff.tmp
hg commit -m "Automated commit @ $date"
fi
****************************************

This script pulls the changes from the hg.mozilla.org repositories and
if there is a change in the en-US part, it commits it to our repository
with a comment where the date is included (I need to find a way with hg
log to put the original comment also).

The Mercurial server is then served with our local Apache server for the
public.

Hope this will help other localisers.

This is also available in our blog post :
http://blog.frenchmozilla.fr/index/post/2008/08/27/Mercurial-repository-for-l10n-en-US-files-only-from-the-frenchmozilla-team

Philippe from the Frenchmozilla team.

willyaranda

unread,
Aug 29, 2008, 4:00:15 AM8/29/08
to
Thanks for your work Philippe!!

I will try this myself and using symlinks to have a clean MT
workspace ;)

Thanks for all!

Philippe

unread,
Aug 29, 2008, 4:16:29 AM8/29/08
to
willyaranda a écrit :

> Thanks for your work Philippe!!
>
> I will try this myself and using symlinks to have a clean MT
> workspace ;)
>

Beware that mercurial doesn't like symlinks for directories.

Ph

willyaranda

unread,
Aug 29, 2008, 8:02:44 PM8/29/08
to

No, they are not for hg.

They are for using with MT, symlinking (does this word exist?) for
having the old structure.

Anyway, thanks for the point ;)

willyaranda

unread,
Aug 30, 2008, 12:40:32 AM8/30/08
to
Philippe, it could be possible to add the file "l10n.ini" that is in
mozilla-central/browser/locales/l10n.ini ? or in comm-central/mail/
locales/l10n.ini?

Because it is used by compare-locales and would be nice if it's there.

Thanks!

Axel Hecht

unread,
Aug 30, 2008, 4:38:17 AM8/30/08
to

Note, the l10n.ini files in comm-central probably break in Phillipe's
repo, as the relative paths are different, AFAICT.

Same might go for configure, if you'd want to use that repo for building
test versions of your localization.

Axel

Philippe

unread,
Sep 1, 2008, 5:18:59 PM9/1/08
to
willyaranda a écrit :
Yes it is possible, but as said Pike, I don't know if it could help you
for compare-locales.

I hope that I will be able to work on the commit comment issue this week.

Ph

Reply all
Reply to author
Forward
0 new messages