1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 06:38:07 +02:00

Fix the repository URLs in the importl10n script

We introduced quite a few new strings recently, but during the last few
rounds of updates we didn't see new translations updates becoming
available. I only just now recalled the announcement that Mozilla is
moving from Mercurial to Git, and indeed the Mercurial page at
https://hg.mozilla.org/l10n-central hasn't been updated since July
anymore and that's were we used to pull our translations from.

This commit fixes the issue by changing the URLs to the Mozilla Git
repositories hosted on GitHub instead.
This commit is contained in:
Tim van der Meij 2024-08-15 19:43:19 +02:00
parent 44f7e3c002
commit f6c2860195
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762

View file

@ -31,7 +31,7 @@ async function downloadLanguageCodes() {
console.log("Downloading language codes...\n");
const ALL_LOCALES =
"https://hg.mozilla.org/mozilla-central/raw-file/tip/browser/locales/all-locales";
"https://raw.githubusercontent.com/mozilla/gecko-dev/master/browser/locales/all-locales";
const response = await fetch(ALL_LOCALES);
if (!response.ok) {
@ -52,8 +52,9 @@ async function downloadLanguageFiles(root, langCode) {
// Constants for constructing the URLs. Translations are taken from the
// Nightly channel as those are the most recent ones.
const MOZ_CENTRAL_ROOT = "https://hg.mozilla.org/l10n-central/";
const MOZ_CENTRAL_PDFJS_DIR = "/raw-file/default/toolkit/toolkit/pdfviewer/";
const MOZ_CENTRAL_ROOT =
"https://raw.githubusercontent.com/mozilla-l10n/firefox-l10n/main/";
const MOZ_CENTRAL_PDFJS_DIR = "/toolkit/toolkit/pdfviewer/";
// Defines which files to download for each language.
const files = ["viewer.ftl"];