2016-04-01 03:25:17 +03:00
|
|
|
.. _localization:
|
|
|
|
|
|
|
|
===================
|
|
|
|
Localization (l10n)
|
|
|
|
===================
|
|
|
|
|
|
|
|
Single-locale language repacks
|
|
|
|
==============================
|
|
|
|
|
|
|
|
To save on build time, the build system and automation collaborate to allow
|
|
|
|
downloading a packaged en-US Firefox, performing some locale-specific
|
|
|
|
post-processing, and re-packaging a locale-specific Firefox. Such artifacts
|
|
|
|
are termed "single-locale language repacks". There is another concept of a
|
|
|
|
"multi-locale language build", which is more like a regular build and less
|
|
|
|
like a re-packaging post-processing step.
|
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
Instructions for single-locale repacks for developers
|
|
|
|
-----------------------------------------------------
|
2016-04-01 03:25:17 +03:00
|
|
|
|
|
|
|
This assumes that ``$AB_CD`` is the locale you want to repack with; I tested
|
|
|
|
with "ar" and "en-GB".
|
|
|
|
|
|
|
|
#. You must have a built and packaged object directory, or a pre-built
|
|
|
|
``en-US`` package.
|
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
|
|
|
./mach build
|
|
|
|
./mach package
|
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
#. Repackage using the locale-specific changes.
|
2016-04-01 03:25:17 +03:00
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
./mach build installers-$AB_CD
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
You should find a re-packaged build at ``OBJDIR/dist/``, and a
|
|
|
|
runnable binary in ``OBJDIR/dist/l10n-stage/``.
|
|
|
|
The ``installers`` target runs quite a few things for you, including getting
|
|
|
|
the repository for the requested locale from
|
|
|
|
https://hg.mozilla.org/l10n-central/. It will clone them into
|
|
|
|
``~/.mozbuild/l10n-central``. If you have an existing repository there, you
|
|
|
|
may want to occasionally update that via ``hg pull -u``. If you prefer
|
|
|
|
to have the l10n repositories at a different location on your disk, you
|
|
|
|
can point to the directory via
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
.. code-block:: shell
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
ac_add_options --with-l10n-base=/make/this/a/absolute/path
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
Instructions for multi-locale builds
|
|
|
|
------------------------------------
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2018-03-10 19:14:38 +03:00
|
|
|
If you want to create a single build with multiple locales, you will do
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
#. Create a build and package
|
2016-04-01 03:25:17 +03:00
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
./mach build
|
|
|
|
./mach package
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
#. For each locale you want to include in the build:
|
2016-04-01 03:25:17 +03:00
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
export MOZ_CHROME_MULTILOCALE="de it zh-TW"
|
|
|
|
for AB_CD in $MOZ_CHROME_MULTILOCALE; do
|
|
|
|
./mach build chrome-$AB_CD
|
|
|
|
done
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
#. Create the multilingual package:
|
2016-04-01 03:25:17 +03:00
|
|
|
|
|
|
|
.. code-block:: shell
|
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
AB_CD=multi ./mach package
|
2016-04-01 03:25:17 +03:00
|
|
|
|
2017-06-16 14:14:28 +03:00
|
|
|
This `currently <https://bugzilla.mozilla.org/show_bug.cgi?id=1362496>`_ only
|
|
|
|
works for Firefox for Android.
|