For mozilla.org there are two separate repositories:
- www.mozilla.org is used for trunk localization, it’s accessible to localizers and tools and is used to localize the DEV server.
- bedrock-l10n is used for production localization of www.mozilla.org
l10n-drivers are in charge of manually moving files from trunk to prod after doing a technical review. On Linux meld is a great tool for this task: you can open both repositories, move files between them and visualize the changes between the two versions.
$ meld path/to/trunk_repository path/to/production_repository
If you’re using the virtual machine described in this document, there are a few shortcuts:
trunkstwill move into the trunk folder, and check the status (
prodstwill do the same for production, but will also fetch updates from trunk in case you want to cherry-pick changesets (see next section).
mozmeldwill open meld with trunk on the left, and production on the right. Use alt+up/down to move to the next change, use alt+right to move from trunk to production. Don’t move the README file, since they’re different between the two repositories.
gitupwill update all Git repositories, discard pending changing, and checkout master branch.
Sometimes moving files manually between the two repositories in not viable, for example when updating a file in all locales. In this case it’s possible to cherry-pick a commit from trunk into production.
When you commit a change to the trunk repository you will get a SHA for the changes
$ trunkst $ git commit -a -m "Update translation" [master 31c3920] Update translation 1 file changed, 1 insertion(+) $ git push
In this case the changeset is 31c3920. From the production repository:
$ prodst $ git cherry-pick 31c3920 [master 380ebdc] Update translation Date: Mon May 2 17:31:06 2016 +0200 1 file changed, 1 insertion(+) $ git push
If you want to do this all manually using Git, you can follow these steps:
- Make sure the master branches for your clones of both the trunk and production repositories are up to date.
- In your local clone of the production repo, add a remote that points to the trunk repo using
git remote add trunk https://github.com/%GITUHB-USERNAME%/www.mozilla.org.git.
git checkout master.
git fetch trunk.
git cherry-pickthe commit from the trunk repo, referencing the Git hash of the commit you wish to include (e.g.
git cherry-pick 31c3920).
- Push the changes to master using
git push upstream master(assuming
upstreamis your remote that points to
There are some principles to keep in mind when updating the production repository:
- Before moving any file, check the Errors view, possibly on your local installation.
- Check the diff for each file before moving it to production, to see if there are any errors.
- In case of any doubts always check the page on your local installation of Bedrock or the DEV server, especially for new locales.