pdf.js/test
Jonas Jenwald f07675a6a8 [api-minor] Re-factor NullL10n and remove the hard-coded l10n strings (PR 17115 follow-up)
*Please note:* These changes only affect the GENERIC build, since `NullL10n` is only a stub elsewhere (see PR 17135).

After the changes in PR 17115, which modernized and improved l10n-handling, the `NullL10n`-implementation is no longer a good fallback for the "proper" `L10n`-classes.
To improve this situation, especially for the *standalone* viewer-components, this patch makes the following changes:
 - Let the `NullL10n`-implementation extend an actual `L10n`-class, which is constant and lazily initialized, to ensure that it works *exactly* like the "proper" ones.

 - Automatically bundle the "en-US" l10n-strings in the build, via the pre-processor, such that we don't need to remember to manually update them.

 - Ensure that the *standalone* viewer-components register their DOM-elements for translation, similar to the default viewer, since this will allow future code improvements by using "data-l10n-id"/"data-l10n-args" in most (if not all) parts of the viewer.

 - Remove the `NullL10n` from the `AnnotationLayer`, to avoid affecting bundle size too much.
   For third-party users that access the `AnnotationLayer`, as exposed in the main PDF.js library, they'll now need to *manually* register it for translation. (However, the *standalone* viewer-components still works given the point above.)
2023-10-20 21:49:33 +02:00
..
chromium Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
font Use native import maps in development mode 2023-10-13 20:35:34 +02:00
images [Editor] Support svg images in the stamp annotation 2023-07-07 15:59:13 +02:00
integration [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
pdfs Fix size of maskCanvas to draw image masks correctly 2023-10-20 23:46:24 +09:00
resources Enable the declaration-block-no-redundant-longhand-properties Stylelint rule 2023-03-25 10:08:27 +01:00
stats Enable the import/no-commonjs ESLint plugin rule 2023-10-14 12:49:17 +02:00
ttx Update ttx from version 2.5 to version 3.19.0 2022-07-10 21:18:36 +02:00
types Add support for modern ECMAScript class features 2021-10-22 22:01:17 +02:00
unit [api-minor] Re-factor NullL10n and remove the hard-coded l10n strings (PR 17115 follow-up) 2023-10-20 21:49:33 +02:00
.eslintrc Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
annotation_layer_builder_overrides.css Remove unnecessary alpha-value from CSS rgb colors 2023-10-06 09:50:03 +02:00
downloadutils.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
driver.js [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
integration-boot.mjs Rename the integration test-files, in preparation for converting them to modules 2023-10-12 13:17:56 +02:00
test_manifest.json Fix size of maskCanvas to draw image masks correctly 2023-10-20 23:46:24 +09:00
test_slave.html [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
test.mjs Tweak the protocol timeout configuration for Puppeteer 2023-10-14 18:20:22 +02:00
testutils.mjs [ESM] Convert *most* of test-folder to use standard modules 2023-07-08 13:13:04 +02:00
text_layer_test.css Enable some Stylelint color-related rules to slightly reduce file sizes 2023-10-05 17:51:21 +02:00
webserver.mjs [api-minor] Move to Fluent for the localization (bug 1858715) 2023-10-19 11:20:41 +02:00
xfa_layer_builder_overrides.css Remove unnecessary alpha-value from CSS rgb colors 2023-10-06 09:50:03 +02:00