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

@ -16,6 +16,8 @@
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('GENERIC')) {
throw new Error('Module "pdfjs-web/genericcom" shall not be used outside ' +
@ -47,6 +49,9 @@ GenericExternalServices.createDownloadManager = function() {
GenericExternalServices.createPreferences = function() {
return new GenericPreferences();
};
GenericExternalServices.createL10n = function () {
return new GenericL10n(PDFJS.locale);
};
PDFViewerApplication.externalServices = GenericExternalServices;
export {