PDF Viewer old bug: Who should fix it or where to report it?
-
A few years ago I reported a Vivaldi bug (VB-79436) which is still actual.
In short, the built-in PDF viewer is broken when browser's language is set to Armenian. It doesn't open anything and in the console this error appears:
Recently, I decided to figure out what exactly is going on, so I opened
chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/pdf_viewer_wrapper.js
in Vivaldi. It's the JavaScript file mentioned in the console error. I copied the code into VS Code and easily found the cause but now I’m not sure what to do with this information. I guess I'll post it here, maybe it can somehow be helpful for finding the solution.First let me tell what causes it. Apparently, some Chromium translators made a tiny mistake. In some strings, they used the backtick symbol instead of the Armenian punctuation mark
՝
(U+055D) which is visually almost identical to the backtick. Since this is a JS file and HTML parts here are template literals, unescaped backtick in it broke the JavaScript syntax.
This problem exists on the lines 275 and 309; the rest is correct. So, if the backticks are replaced with the correct
՝
character, it should fix the issue.Besides translation mistakes, I believe there is also another problem here. Apparently there is an oversight in the code that is responsible for taking the translations and putting them into that HTML in JS. I think Chromium devs should have escaped backticks and other characters that break the syntax because, in theory, backticks could actually be part of a translation. But since Chrome (desktop) doesn’t yet officially support Armenian UI, reporting this to them doesn’t seem very reasonable as there would be no way to reproduce.
On the other hand, Vivaldi is the one that fortunately force-enables unsupported by Chromium languages which unfortunately can reveal some bugs, such as this one. So from this point of view, Vivaldi could also do something about this.I don't have more info about this pdf_viewer_wrapper.js file, such as when it's created and added to the bundle, whether it's generated at build time and separate versions of this file already exist per language, or if it's generated runtime, and so on and so forth. Thus I wander if there is a chance that Vivaldi can somehow provide any solution for this. The possible solutions that I can imagine are:
- To force PDF Viewer in Vivaldi to use English when the language is unsupported (dumb solution but better than a broken feature.)
- To include these strings in Vivaldi translations.
- To fix the buggy Chromium code (escape backticks) before the Chromium devs do that sometime in the future.
Not sure if any of these are technically possible and in general, I don't know what's possible and what's not, I just want this bug to be finally fixed. So any additional information or suggestions that could help move us closer to a solution is welcome.
-
@RammsteinAM I updated bug report and increased priority.
For me that is a issue which should not happen when have release Vivaldi for many languages.