Using Mozilla Translator: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 13: Line 13:
== Setting up the enviroment ==
== Setting up the enviroment ==


=== Install CVS and diff (patches) ===
=== Install hg (Mercurial), diff (patches) and Meld ===


Open your distro package manager and select: "cvs" and "diff". Install it
Open your distribution package manager and select: "hg", "diff" and "meld". You can skip Meld, but it is a nice merging and diff tool, you may use it in the future. Install them.


  sudo apt-get install cvs diff
  sudo apt-get install hg diff meld


(on Ubuntu or Debian)
(on Ubuntu or Debian)
Line 33: Line 33:


  '''/home/[user]/bin/'''
  '''/home/[user]/bin/'''
                  '''|cvs-moz.sh''' (file, see bellow)
                  '''|cvs-moz-l10n.sh''' (file, see bellow)
                   '''|run-mt.sh''' (file, see bellow)
                   '''|run-mt.sh''' (file, see bellow)
             '''/MT/'''
             '''/MT/'''
Line 40: Line 38:
                 '''|MT.sh''' (file, see bellow)
                 '''|MT.sh''' (file, see bellow)
                 '''|[product]/[version]/'''
                 '''|[product]/[version]/'''
                                    '''|cvs-moz.cfg''' (file, see bellow)
    '''/[product][version]/'''
                                    '''|cvs-moz-l10n.cfg''' (file, see bellow)


=== Files and scripts ===
=== Files and scripts ===
Line 48: Line 45:
'''mt.jar''': Download MT (not the sources!) from [http://sourceforge.net/project/showfiles.php?group_id=18842 here]. Extract MT5xx.jar to your ''/home/[user]/MT/'' directory. Then, rename it from '''MT5xx.jar''' to '''mt.jar'''.
'''mt.jar''': Download MT (not the sources!) from [http://sourceforge.net/project/showfiles.php?group_id=18842 here]. Extract MT5xx.jar to your ''/home/[user]/MT/'' directory. Then, rename it from '''MT5xx.jar''' to '''mt.jar'''.


And '''then''' download [http://ontheblink.pijusmagnificus.com/mozilla/files.tar.gz this file]. Extract in a temp folder (maybe on your desktop for example). And do:
And '''then''' download [test this file]. Extract in a temp folder (maybe on your desktop for example). And:
 
'''cvs-moz.sh''': Copy this file to ''/home/[user]/bin/''
 
'''cvs-moz-l10n.sh''': The same, copy to ''/home/[user]/bin/''


'''run-mt.sh''': Copy to ''/home/[user]/bin/''
'''run-mt.sh''': Copy to ''/home/[user]/bin/''
Line 58: Line 51:
'''MT.sh''': Copy the file to ''/home/[user]/MT/''
'''MT.sh''': Copy the file to ''/home/[user]/MT/''


'''cvs-moz.cfg''': Copy the file to ''/home/[user]/MT/[product]/[version]/''
=== Configuring hg to pull files ===


'''cvs-moz-l10n.cfg''': Copy the file to ''/home/[user]/MT/[product]/[version]/''
You need to configure your environment to work well with your existing ssh key and the new installed hg. You can read [http://developer.mozilla.org/en/Mercurial_FAQ Mercurial FAQ on MDC] to learn more about hg (the command-line tool for Mercurial), but I'm writing the tips to get working your setup.


== Editing some files ==
Then, you should configure Mercurial before pulling the code. Your Mercurial configuration file (~/.hgrc) should have at least the following settings:


You need to edit two files to get things working. They are used to download the exact version of product you want:
[ui]
username = Your Real Name <user@example.com>
merge = your-merge-program → in our case meld
[diff]
git = 1
[defaults]
diff=-p -U 8


=== cvs-moz.cfg ===
You will find this file in ''/home/[user]/MT/[product]/[version]/''.
Open it with an UTF-8 editor and edit it with options you need: 1 for true (or download), or 0 to not download. For example, if you need to download the browser module (Firefox), edit:
# Download Firefox?
GET_FFX=0
and change 0 with 1:
# Download Firefox?
GET_FFX=1
NOTE: As we are working with a special folder structure, please, DO NOT download two products at the same time. This will maintain a clean workspace and will be easy to maintain in the future. It is recommended that you "log" your work with:
# Save logs?
LOG=1
=== cvs-moz-l10n.cfg ===
You will find this file in /home/[user]/MT/[product]/[version]/.
Open it with an UTF-8 editor and edit it with options you need: 1 for true (or download), or 0 to not download. Also you need to change your locale and edit your CVS account.
==== Branch ====
You need to put the actual branch you are working with:
# Branch
TAG=MOZILLA_1_8_BRANCH
[firefox3 localizers, as Mozilla is working on "trunk" on CVS, there is no branch property, so you can '''comment''' the TAG property]
==== Locale ====
You need to change this lines:
# Locale
LOCALE=ab-CD
to your actual locale. For example, for downloading es-ES files:
# Locale
LOCALE=es-ES
==== CVS account ====
Edit the lines:
# CVS Access
# Anonymous user
CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
# Personal user (you need CVS Access to use this option!!!
# CVSROOT=:ext:willyaranda%gmail.com@cvs.mozilla.org:/l10n
Put your user and comment the "anonymous" user.
NOTE: The "anonymous" user CAN'T check in files to cvs.mozilla.org. You need a [http://www.mozilla.org/hacking/committer/ CVS account].
==== Products ====
Select your product, 1 to download, 0 to not download. For example, to sources for Firefox:
# Download Firefox?
GET_FFX=0
and change 0 with 1:
# Download Firefox?
GET_FFX=1
NOTE: As we are working with a special folder structure, please, DO NOT download two products at the same time. This will maintain a clean workspace and will be easy to maintain in the future. It is recommended that you "log" your work with:
# Save logs?
LOG=1


== Downloading en-US sources ==
== Downloading en-US sources ==
Line 149: Line 74:
Open a Terminal and go:
Open a Terminal and go:


  cd MT/[product]/[version]
  cd [product][version]/


For example:
For example:


  cd MT/firefox/trunk
  cd firefox31/
 
And then, we need to check out the sources for our project, in the case of Firefox: "mozilla-central", and the rest (Thunderbird, Seamonkey, Sunbird...) is "comm-central". So, use the apropiate repo for you:


And then, we need to check out the sources:
hg clone http://hg.mozilla.org/mozilla-central/


cvs-moz.sh
or


And you will see a screen like this:
hg clone http://hg.mozilla.org/comm-central/


guillermo@guillermo-laptop:~/MT/firefox/prueba$ cvs-moz.sh
[You maybe want to use the [http://groups.google.com/group/mozilla.dev.l10n/browse_thread/thread/70721fd6440bfb68# hg repo that FrenchMozilla has done]. I haven't tested myself, so, be adventurous]
=== Variables definidas ===
CVSROOT = :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
TAG =
LOG = 1
GET_FFX = 1
GET_TBD = 0
GET_MNM = 0
GET_CMN = 0
GET_SBD = 0
===========================
Se usarán estos directorios: mozilla/browser/locales/en-US mozilla/extensions  /reporter/locales/en-US mozilla/other-licenses/branding/firefox/locales/en-US
Pulse una tecla para proceder, o [Ctrl]+[C] para cancelar


As you can see, we are going to pull the en-US sources for Firefox, with no TAG (means trunk) and log the check. You can check out the en-US sources by an anonymous user.
Be patient, this will download the WHOLE mozilla-central or comm-central repository as Mercurial doesn't allow to do partial checkouts. In the end, you will have a lot of useless data for localizers ;).


Press enter and you will see the log of the diff for that checkout
And you will have a new directory placed on ~/[product][version]/[mozilla or comm]-central/


<center>Note: If you have a problem with no existent directories, please, create inside MT/[product]/[version] a directory called: LOG_EN.</center>
== Downloading ab-CD sources ==


Press enter when you see this string:
You need to go to the directory we have created before. So, open a terminal, and in our case:


  Pulse una tecla para proceder a la descarga, o [Ctrl]+[C] para cancelar
  cd ~/firefox31/


And you will check out (yes, now!) the sources. At the end you will have a mozilla directory, so the directory will be ~/MT/[product]/[version]/mozilla
and then, pull out the sources by:


== Downloading ab-CD sources ==
hg clone http://hg.mozilla.org/l10n-central/[locale]/
 
for example:
 
hg clone http://hg.mozilla.org/l10n-central/es-ES/




Confirmed users
120

edits

Navigation menu