1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
---
title: Fase de PR
slug: Mozilla/Localization/Guia_iniciação_rápida/Fase_PR
tags:
- Localização
translation_of: Mozilla/Localization/Quick_start_guide/QA_phase
---
<p>Depois de todo o trabalho duro de localização, nós temos a certeza de que não quer ver apenas o seu trabalho, mas quer ter a certeza de que está preciso! Se não tem muita experiência com código, pode até preocupar-se que tenha efetuado algo de errado (Ups!). Nós agora vamos orientá-lo na realização de alguns testes de garantia de qualidade no seu trabalho para garantir que esteja no caminho certo.</p>
<p>If you're localizing Mozilla websites, your work will display soon after you've committed it without needing a language pack. Since such is the case, this part of the guide may not be entirely applicable to you. Feel free to skip ahead to the next section by clicking on the <strong>Next</strong> link at the bottom of the page.</p>
<p>In order to see your work on Firefox (or another Mozilla application), you'll need to have a built language pack to install on your local instance.</p>
<h2 id="Criações_automatizadas_e_manual">Criações automatizadas e manual</h2>
<p>With the click of a button, some L10n tools (like Narro and Koala) automatically create language pack builds for you. If you're using one of these tools, feel free to skip ahead to the <a href="/en/Localization_Quick_Start_Guide:_QA#Seeing_your_work" title="https://developer.mozilla.org/en/Localization_Quick_Start_Guide:_Part_3#Seeing_your_work">Seeing your work</a> section. If you're not using one of these tools, let's walk you through building your own language pack manually.</p>
<div class="note"><strong>Nota</strong>: Remember all of those pre-requisite tools we asked you to install in the <a href="/en/Localization_Quick_Start_Guide#Local_environment_tools" title="https://developer.mozilla.org/en/Localization_Quick_Start_Guide#Local_environment_tools">initial setup</a>? Here's where you'll need almost all of them. If you haven't installed them yet, <em>now</em> is the time to do it.</div>
<h3 id="Instruções_preliminares">Instruções preliminares</h3>
<p>We will be using the following file directories for this example:</p>
<pre style="margin-left: 40px;">your working directory <em>(root)/</em>
mozilla-aurora <em>(en-US source, pulled from <a class="external" href="http://hg.mozilla.org/releases/mozilla-aurora" rel="external" title="http://hg.mozilla.org/releases/mozilla-aurora">http://hg.mozilla.org/releases/mozilla-aurora</a></em> <em>)</em>/
l10n-central <em>(directory for L10n directories, one per L10n; often referred to as "l10n base")/</em>
your-locale-code <em>(a directory with your L10n files, in this example we'll use x-testing)</em>
<strong>Example</strong>: <code>root/mozilla-aurora</code> & <code>root/l10n-central/x-testing</code>
</pre>
<p>Additionally, you will need to copy and translate the <code>toolkit/defines.inc</code> file directly from en-US before you can build. This is due to a bug in the build logic.</p>
<p>Please either follow the above structure closely or adjust the commands below according to your custom setup.</p>
<p>To copy this file to the appropriate directory, do the following:</p>
<ol>
<li>Navigate to your working directory from your command-line terminal (i.e., where you created the folder structure described above).</li>
<li>Enter the following commands:</li>
</ol>
<pre style="margin-left: 40px;">mkdir -p l10n-central/x-testing/toolkit/
cp mozilla-aurora/toolkit/locales/en-US/defines.inc l10n-central/x-testing/toolkit/defines.inc
</pre>
<p>Tah-dah! Copied!</p>
<p>Finally, you will need a file called <code>.mozconfig</code> to proceed with manual builds. This file contains the necessary build instructions.</p>
<p>To create and configure this file, follow these instructions:</p>
<div class="warning">
<p>Until the fix for <a href="https://bugzil.la/1063880">bug 1063880</a> lands on mozilla-aurora and mozilla-beta when building language packs against those two trees you should:</p>
<ol>
<li>
<p>remove <code>ac_add_options --disable-compile-environment</code> from <code>.mozconfig</code> in step 3</p>
</li>
<li>
<p>use <code>./mach build config</code> after step 4</p>
</li>
</ol>
</div>
<ol>
<li>Update the Mozilla source code:</li>
</ol>
<p style="margin-left: 40px;"><code>$ cd mozilla-aurora<br>
$ hg pull -u</code></p>
<ol start="2" style="list-style-type: decimal;">
<li>Enter the following command to create the <code>.mozconfig</code> file: <code>$ nano -w .mozconfig</code></li>
<li>Enter the following lines in your <code>.mozconfig</code> file:</li>
</ol>
<pre style="margin-left: 40px;">mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../firefox-build
ac_add_options --disable-compile-environment
ac_add_options --with-l10n-base=../l10n-central # path relative to MOZ_OBJDIR
ac_add_options --enable-application=[<em>browser or mail</em>]
</pre>
<p style="margin-left: 40px;">You will need to specify which application you're localizing in the fourth line (e.g., for Firefox, that's <code>browser</code>, Thunderbird would be <code>mail</code>).</p>
<ol start="4" style="list-style-type: decimal;">
<li>Enter the following command to perform the configuration: <code>$ ./mach configure</code></li>
<li>Once your command-line finishes spitting out the config command's output, navigate to the newly created directory:<code> $ cd ../firefox-build/browser/locales</code></li>
</ol>
<p>Now you're ready to build! At this point you can choose between two build options. You can either:</p>
<ul>
<li><a href="/en/Creating_a_Language_Pack#Creating_a_langpack" title="https://developer.mozilla.org/en/Creating_a_Language_Pack#Creating_a_langpack">Create a langpack</a>, which is installed <em>on top of</em> your Mozilla application, or</li>
<li><a href="/en/Creating_a_Language_Pack#L10n_binary_repack" title="https://developer.mozilla.org/en/Creating_a_Language_Pack#L10n_binary_repack">Repack the application's binary</a> (aka, a L10n repack), which allows you to install <em>next</em> to your existing Mozilla application installation and use separately.</li>
</ul>
<p>Visit the links above to learn how to make these testing builds.</p>
<h2 id="Testar_a_sua_L10n_e_ver_o_seu_trabalho">Testar a sua L10n e ver o seu trabalho</h2>
<p>Now that you have your langpack or L10n repack, let's discuss seeing your work and testing it in the application.</p>
<p>Testing the langpack will put you one step closer to having your localization added to the L10n releases. Follow the steps below to test your localization:</p>
<ol>
<li>Install Aurora in your preferred language.</li>
<li>Install the <code>.xpi</code> langpack you just created (or exported).</li>
<li>Set your language using the Quick Locale Switcher or Locale Switcher add-ons by navigating to Tools->Language->Your localization's language code.</li>
<li>Restart your browser and start testing!</li>
</ol>
<p>Now you should be able to see all of your work up to this point. Click <a class="link-https" href="https://wiki.mozilla.org/MozillaQualityAssurance:l10n_checklist" title="https://wiki.mozilla.org/MozillaQualityAssurance:l10n_checklist">here</a> for guidelines on how to test your localization.</p>
<h2 id="Não_perca_o_seu_trabalho!">Não perca o seu trabalho!</h2>
<p>Your work is <em>SO</em> important! We would really hate to see you lose any of it. After you test your localization, you should send it to a remote repository, which will serve as a backup for your work and will let others follow your progress. We're going to go through the process below.</p>
<p>The official localization teams use repositories at <a class="external" href="http://hg.mozilla.org/" rel="external" title="http://hg.mozilla.org/">hg.mozilla.org</a>. Before a team becomes official, we like to get the localizers comfortable with the Hg commands that allow for cloning, pulling, committing, and pushing work to an experimental repository. We use a web service called <a class="external" href="http://www.bitbucket.org/" rel="external" title="http://www.bitbucket.org/">Bit Bucket</a> to start the learning process.</p>
<div class="note"><strong>Nota</strong>: You must have Mercurial configured before you begin. That step is back on the initial setup page. If you haven't done that yet, don't worry, we'll wait for you!</div>
<h3 class="note" id="Envio_(Pushing)_para_o_seu_repositório">Envio (Pushing) para o seu repositório</h3>
<p>There are a couple of things you should take note of before you push to your repository:</p>
<ul>
<li>Make sure that your files have been encoded in Unicode without BOM (byte order mark).</li>
<li>Remember that here you are pushing an entire directory, not a <code>.zip</code> archive file or an <code>.xpi</code> lang pack.</li>
</ul>
<p>The instructions below will help you learn how to use your Hg repository.</p>
<ol>
<li><span style="color: #daa520;">After your new repository is created by the l10n-drivers</span>, please visit the URL for your repo. We'll use x-testing here for our example. You can do this by entering the following URL into your browser: <code><a class="external" href="http://hg.mozilla.org/l10n-central/x-testing" rel="freelink">http://hg.mozilla.org/l10n-central/x-testing</a></code></li>
<li>Now, navigate to your locale's directory on your local machine.</li>
</ol>
<p style="margin-left: 40px;">If you're using Koala, this should be located at <code>/path/to/your/koala.project/locale/3.6/x-testing</code>, otherwise, it should be located at <code>/path/to/your/working_dir/l10n_base/x-testing</code>.</p>
<p style="margin-left: 40px;">In this directory, you should have an hg repository. You might have created it yourself by running <code>hg init</code> or <code>hg clone</code> or you might have had it created by Koala when you were setting up a new localization project. Also at this point, you shouldn't have any uncommitted changes (i.e., running the <code>hg status </code>command should show nothing). Let's see what the last revision in this repository is.</p>
<ol start="3" style="list-style-type: decimal;">
<li>Enter the following command: <code>$ hg log -l 1</code></li>
</ol>
<p style="margin-left: 40px;">You should see an output similar to the one below:</p>
<pre style="margin-left: 40px;">changeset: 0:7c543e8f3a6a
tag: tip
user: Your Name <email@example.com>
date: Mon Nov 23 18:08:25 2009 +0100
summary: Added search bar strings
</pre>
<ol start="4" style="list-style-type: decimal;">
<li>Now compare the local repository on your machine with the remote Hg repository by entering this command: <code>$ hg outgoing <a class="external" href="http://hg.mozilla.org/l10n-central/x-testing" rel="freelink">http://hg.mozilla.org/l10n-central/x-testing</a></code></li>
</ol>
<p style="margin-left: 40px;">The <code>hg outgoing</code> command compares the two repositories and lists all changesets that are present locally, but not in the remote repository. These changesets will need to be "pushed" to the remote repository. You can expect to see output like this:</p>
<pre style="margin-left: 40px;">comparing with http://hg.mozilla.org/l10n-central/x-testing
searching for changes
changeset: 0:7c543e8f3a6a
tag: tip
user: Your Name <email@example.com>
date: Mon Nov 23 18:08:25 2009 +0100
summary: Added search bar strings
</pre>
<ol start="5" style="list-style-type: decimal;">
<li>Let's now push this changeset. Enter the following command:<code> hg push <a class="external" href="http://hg.mozilla.org/l10n-central/x-testing" rel="freelink">http://hg.mozilla.org/l10n-central/x-testing</a></code></li>
<li>Mercurial will connect to your repo and ask you to provide your account information (i.e., the username and the password).</li>
</ol>
<pre style="margin-left: 40px;">real URL is http://hg.mozilla.org/l10n-central/x-testing
pushing to http://hg.mozilla.org/l10n-central/x-testing
searching for changes
http authorization required
realm: hg.mozilla.org HTTP
user: your_id
password:
</pre>
<p style="margin-left: 40px;">After you enter your account information, the changeset will be pushed.</p>
<pre style="margin-left: 40px;">adding changesets
adding manifests
adding file changes
added 1 changesets with 2 changes to 2 files
bb/acl: your_id is allowed. accepted payload.
quota: 979.7 KB in use, 150.0 MB available (0.64% used)
</pre>
<p>Your changeset has been successfully pushed to your repository!</p>
<p>As you begin to move through your translations, you should <code>commit</code> the changes locally and <code>push</code> your work to this experimental repository. For instance, if you have finished translating all the <code>.dtd</code> and <code>.properties</code> files in your <code>x-testing/browser/chrome/browser/</code> directory, then you should run these commands:</p>
<pre>$ hg status
$ hg commit -m "Translated browser/chrome/browser/"
$ hg outgoing
$ hg push http://hg.mozilla.org/l10n-central/x-testing</pre>
<p>Note that due to the distributed nature of Hg, <code>hg commit</code> saves the changes locally (i.e., in your computer's Hg repository). You can see the history of commits with <code>hg log</code>. After doing <code>hg commit</code>, you still need to send the changes to the remote repository. This is where <code>hg push</code> comes in. This sends your commits to the remote repository.</p>
<p>Now you're ready to proceed to the release phase!</p>
<p> </p>
<p>{{ PreviousNext("Localization_Quick_Start_Guide/Translation_phase", "Localization_Quick_Start_Guide/Release_phase") }}</p>
|