Source code

Revision control

Other Tools

1
.. _localization:
2
3
===================
4
Localization (l10n)
5
===================
6
7
Single-locale language repacks
8
==============================
9
10
To save on build time, the build system and automation collaborate to allow
11
downloading a packaged en-US Firefox, performing some locale-specific
12
post-processing, and re-packaging a locale-specific Firefox. Such artifacts
13
are termed "single-locale language repacks". There is another concept of a
14
"multi-locale language build", which is more like a regular build and less
15
like a re-packaging post-processing step.
16
17
Instructions for single-locale repacks for developers
18
-----------------------------------------------------
19
20
This assumes that ``$AB_CD`` is the locale you want to repack with; I tested
21
with "ar" and "en-GB".
22
23
#. You must have a built and packaged object directory, or a pre-built
24
``en-US`` package.
25
26
.. code-block:: shell
27
28
./mach build
29
./mach package
30
31
#. Repackage using the locale-specific changes.
32
33
.. code-block:: shell
34
35
./mach build installers-$AB_CD
36
37
You should find a re-packaged build at ``OBJDIR/dist/``, and a
38
runnable binary in ``OBJDIR/dist/l10n-stage/``.
39
The ``installers`` target runs quite a few things for you, including getting
40
the repository for the requested locale from
41
https://hg.mozilla.org/l10n-central/. It will clone them into
42
``~/.mozbuild/l10n-central``. If you have an existing repository there, you
43
may want to occasionally update that via ``hg pull -u``. If you prefer
44
to have the l10n repositories at a different location on your disk, you
45
can point to the directory via
46
47
.. code-block:: shell
48
49
ac_add_options --with-l10n-base=/make/this/a/absolute/path
50
51
Instructions for multi-locale builds
52
------------------------------------
53
54
If you want to create a single build with multiple locales, you will do
55
56
#. Create a build and package
57
58
.. code-block:: shell
59
60
./mach build
61
./mach package
62
63
#. For each locale you want to include in the build:
64
65
.. code-block:: shell
66
67
export MOZ_CHROME_MULTILOCALE="de it zh-TW"
68
for AB_CD in $MOZ_CHROME_MULTILOCALE; do
69
./mach build chrome-$AB_CD
70
done
71
72
#. Create the multilingual package:
73
74
.. code-block:: shell
75
76
AB_CD=multi ./mach package
77
79
works for Firefox for Android.