mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Change the importl10n
script to use the Nightly channel
It seems that PR 8323 unfortunately didn't pick the right channel for pulling translations from, according to the information in: - https://groups.google.com/forum/#!topic/mozilla.dev.l10n/vzmbHLPo3rg - https://github.com/mozilla-l10n/localizer-documentation/blob/master/misc/aurora_faqs.md My apologies for the unnecessary churn in this code!
This commit is contained in:
parent
658fb03db1
commit
044a115d6e
2 changed files with 6 additions and 7 deletions
11
external/importL10n/locales.js
vendored
11
external/importL10n/locales.js
vendored
|
@ -19,7 +19,7 @@ var fs = require('fs');
|
|||
var https = require('https');
|
||||
var path = require('path');
|
||||
|
||||
// Defines all languages that have a translation at mozilla-beta.
|
||||
// Defines all languages that have a translation at mozilla-central.
|
||||
// This is used in make.js for the importl10n command.
|
||||
var langCodes = [
|
||||
'ach', 'af', 'ak', 'an', 'ar', 'as', 'ast', 'az', 'be', 'bg',
|
||||
|
@ -44,10 +44,9 @@ function downloadLanguageFiles(root, langCode, callback) {
|
|||
console.log('Downloading ' + langCode + '...');
|
||||
|
||||
// Constants for constructing the URLs. Translations are taken from the
|
||||
// Beta channel as those are the most recent ones. The Nightly channel
|
||||
// does not provide all translations.
|
||||
var MOZ_BETA_ROOT = 'https://hg.mozilla.org/releases/l10n/mozilla-beta/';
|
||||
var MOZ_BETA_PDFJS_DIR = '/raw-file/tip/browser/pdfviewer/';
|
||||
// Nightly channel as those are the most recent ones.
|
||||
var MOZ_CENTRAL_ROOT = 'https://hg.mozilla.org/l10n-central/';
|
||||
var MOZ_CENTRAL_PDFJS_DIR = '/raw-file/tip/browser/pdfviewer/';
|
||||
|
||||
// Defines which files to download for each language.
|
||||
var files = ['chrome.properties', 'viewer.properties'];
|
||||
|
@ -61,7 +60,7 @@ function downloadLanguageFiles(root, langCode, callback) {
|
|||
// Download the necessary files for this language.
|
||||
files.forEach(function(fileName) {
|
||||
var outputPath = path.join(outputDir, fileName);
|
||||
var url = MOZ_BETA_ROOT + langCode + MOZ_BETA_PDFJS_DIR + fileName;
|
||||
var url = MOZ_CENTRAL_ROOT + langCode + MOZ_CENTRAL_PDFJS_DIR + fileName;
|
||||
|
||||
https.get(url, function(response) {
|
||||
var content = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue