L10n:Mercurial

From MozillaWiki
Jump to: navigation, search

This page describes the minimum amount of steps a localizer needs to maintain a Mozilla translation with Mercurial (hg) on the default branch. For a longer explanation, see L10n on Mercurial on developer.mozilla.org.

Prerequisites

You need hg installed and your ssh key set up to work with Mozilla servers. You need to replace ab-CD in this guide with your locale.

First time

Open a terminal and change to a directory of your choice. You'll have there the en-US directory and ab-CD locale directory. You will edit the files in ab-CD from your directory as you like.

You need to run the following commands once:

hg clone http://hg.frenchmozilla.fr/ en-US
hg clone http://hg.mozilla.org/l10n-central/ab-CD ab-CD

Open ab-CD/.hg/hgrc with an editor and make sure the files look like this:

[ui]
username = Your Name <your.email@example.com>

[paths]
default = http://hg.mozilla.org/l10n-central/ab-CD
default-push = ssh://hg.mozilla.org/l10n-central/ab-CD

Open ~/.ssh/config and add the lines:

Host hg.mozilla.org
User user@host.domain

The user@host.domain is the email address you're using with bugzilla.

Updating the files

cd en-US
hg pull -u
cd ab-CD
hg pull -u

Viewing what you have modified

cd ab-CD
hg diff

Comitting the files changed

cd ab-CD
hg commit
hg push