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:
Jonas Jenwald 2017-05-18 12:35:05 +02:00
parent 658fb03db1
commit 044a115d6e
2 changed files with 6 additions and 7 deletions

View File

@ -8,7 +8,7 @@ The issue tracking system is designed to record a single technical problem. A bu
If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us on the IRC channel -- keep in mind that just code snippets won't help us troubleshoot the problem.
Note that the translations for PDF.js in the `l10n` folder are synchronized with the Beta branch of Mozilla Firefox. This means that we will only accept pull requests that add strings currently missing in the Beta branch (because it will take at least six weeks before the most recent translations are in the Beta branch), but keep in mind that the changes will be overwritten when we synchronize again.
Note that the translations for PDF.js in the `l10n` folder are synchronized with the Nightly channel of Mozilla Firefox. This means that we will only accept pull requests that add strings currently missing in the Nightly channel, but keep in mind that the changes will be overwritten when we synchronize again.
See also:
- https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions

View File

@ -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 = '';