Wraps mozL10n to async calls; splits firefox and generic l10n libs.

This commit is contained in:
Yury Delendik 2017-05-03 20:05:53 -05:00
parent 09d46e94c6
commit 5438ce9b98
28 changed files with 463 additions and 260 deletions

View file

@ -17,6 +17,7 @@
import { DefaultExternalServices, PDFViewerApplication } from './app';
import { BasePreferences } from './preferences';
import { DownloadManager } from './download_manager';
import { GenericL10n } from './genericl10n';
import { PDFJS } from 'pdfjs-lib';
if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('CHROME')) {
@ -350,6 +351,9 @@ ChromeExternalServices.createDownloadManager = function() {
ChromeExternalServices.createPreferences = function() {
return new ChromePreferences();
};
ChromeExternalServices.createL10n = function () {
return new GenericL10n(navigator.language);
};
PDFViewerApplication.externalServices = ChromeExternalServices;
export {