Bug 1904586 - Use L10n git monorepo for local repack & langpack builds. r=bhearsum

As the monorepo is rooted at one level higher than the previous hg repos,
the `git clone` will fail if ~/.mozbuild/l10n-central/ already exists and is not empty.

The clone will also take a while longer than before,
as it's fetching all localization data rather than just the selected locale.

Differential Revision: https://phabricator.services.mozilla.com/D214826
This commit is contained in:
Eemeli Aro 2024-06-25 15:26:56 +00:00
Родитель 0444607fe6
Коммит 8a559ed07d
2 изменённых файлов: 8 добавлений и 21 удалений

Просмотреть файл

@ -23,7 +23,7 @@ Instructions for single-locale repacks for developers
-----------------------------------------------------
This assumes that ``$AB_CD`` is the locale you want to repack with; you
find the available localizations on `l10n-central <https://hg.mozilla.org/l10n-central/>`_.
find the available localizations from `firefox-l10n <https://github.com/mozilla-l10n/firefox-l10n>`_.
#. You must have a built and packaged object directory, or a pre-built
``en-US`` package.
@ -42,10 +42,10 @@ find the available localizations on `l10n-central <https://hg.mozilla.org/l10n-c
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
the localizations from https://github.com/mozilla-l10n/firefox-l10n.
It will clone them into ``~/.mozbuild/l10n-central``.
If you have an existing repository there, you
may want to occasionally update that via ``git pull``. If you prefer
to have the l10n repositories at a different location on your disk, you
can point to the directory via
@ -361,8 +361,8 @@ Localizations
Now that we talked in-depth about how to expose content to localizers,
where are the localizations?
We host a mercurial repository per locale. All of our
localizations can be found on https://hg.mozilla.org/l10n-central/.
We host all locales in a git monorepo. All of our
localizations can be found on https://github.com/mozilla-l10n/firefox-l10n.
You can search inside our localized files on
`Transvision <https://transvision.mozfr.org/>`_.

Просмотреть файл

@ -146,18 +146,6 @@ repackage-zip-%: unpack
# chrome directory and top-level localization for Fluent.
PKG_ZIP_DIRS = chrome localization $(or $(DIST_SUBDIRS),$(DIST_SUBDIR))
# Clone a l10n repository, either via hg or git
# Make this a variable as it's embedded in a sh conditional
ifeq ($(VCS_CHECKOUT_TYPE),hg)
L10N_CO = $(HG) --cwd $(L10NBASEDIR) clone https://hg.mozilla.org/l10n-central/$(AB_CD)/
else
ifeq ($(VCS_CHECKOUT_TYPE),git)
L10N_CO = $(GIT) -C $(L10NBASEDIR) clone hg://hg.mozilla.org/l10n-central/$(AB_CD)/
else
L10N_CO = $(error You need to use either hg or git)
endif
endif
merge-%: IS_LANGUAGE_REPACK=1
merge-%: AB_CD=$*
merge-%:
@ -173,9 +161,8 @@ ifdef MOZ_AUTOMATION
endif
ifdef NIGHTLY_BUILD
if ! test -d $(L10NBASEDIR)/$(AB_CD) ; then \
echo 'Checking out $(L10NBASEDIR)/$(AB_CD)' ; \
$(NSINSTALL) -D $(L10NBASEDIR) ; \
$(L10N_CO) ; \
$(GIT) clone https://github.com/mozilla-l10n/firefox-l10n.git $(L10NBASEDIR) ; \
fi
endif
$(RM) -rf $(REAL_LOCALE_MERGEDIR)