-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce a L10n
-method to translate an element once, and use that in PDFLayerViewer
#18643
Introduce a L10n
-method to translate an element once, and use that in PDFLayerViewer
#18643
Conversation
…in `PDFLayerViewer` Currently we *manually* fetch the "pdfjs-additional-layers" string and update the DOM-element, which was needed since we want to avoid triggering a bunch of otherwise unnecessary translation when appending the entire layer-tree to the DOM. By introducing a new helper method in the `L10n`-class we can avoid this, and instead use a "data-l10n-id" attribute on the element (as most other viewer code does nowadays).
/botio integrationtest |
From: Bot.io (Linux m4)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/3d4d1345589f99a/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_integrationtest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/78552b83ea59e6f/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/3d4d1345589f99a/output.txt Total script time: 8.76 mins
|
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/78552b83ea59e6f/output.txt Total script time: 20.62 mins
|
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/61a7ff7b3768e46/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/61a7ff7b3768e46/output.txt Total script time: 1.06 mins Published |
Looks good! |
Currently we manually fetch the "pdfjs-additional-layers" string and update the DOM-element, which was needed since we want to avoid triggering a bunch of otherwise unnecessary translation when appending the entire layer-tree to the DOM.
By introducing a new helper method in the
L10n
-class we can avoid this, and instead use a "data-l10n-id" attribute on the element (as most other viewer code does nowadays).