'View Controls' naming has gone weird

PDF.js Express Version
7.1.2

Detailed description of issue
My ‘View Controls’ names have gone weird. For example, instead of saying “Rotate Clockwise” it says “action.rotateClockWise”

image

Expected behaviour
For example, “action.rotateClockWise” should be “Rotate Clockwise”.

Does your issue happen with every document, or just one?
Yes

Code snippet

const allowed_features = [
    "MouseWheelZoom",
    "PageNavigation",
    "Search",
    "TextSelection",
    "TouchScrollLock"
];

// disable some unneeded features
this.instance.disableTools();
this.instance.disableFeatures(Object.values(this.instance.Feature).filter(feature => 
!allowed_features.includes(feature)));
this.instance.disableElements(["pageNavOverlay"]);

Hi there!

This means that the JSON translation files aren’t being served properly. If you look in the network tab there will probably be a 404 or some kind of error loading the translation file.

Please make sure these files are being served correctly. They are located at ui/i18n/.

Thanks!
Logan

1 Like