Script Error when activating preview during translation of an HTML file - Trados Studio 2021 SR1 (Build 16.1.8.4404)

Good morning

I am working on the translation of a long HTML file (about 12,900 segments).

When I activate previewing of the document during translation (View > Preview) I get a series of error messages like the following one.

However, this does not prevent me from continuing... It's just annoying.

Error message in Trados Studio showing 'Errore nello script della pagina' with details about the line number, character, error 'S' non e definito', and a file path.

The alternative is to close the document and reopen it without activating preview.

After delivering the document to the customer (a German software house) and reporting the problem, I received this reply:


Trados stumbles over this valid piece of Javascript:

<script type="text/javascript">
    $(document).ready(function() {
        function getParameterByName(name, url) {
            if (!url) url = window.location.href;
            var name = name.replace(/[\[\]]/g, '\\$&'),
                regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
                results = regex.exec(url);
            if (!results) return null;
            if (!results[2]) return '';
            return decodeURIComponent(results[2].replace(/\+/g, ' '));
        }

(The $ in the second line).


Any suggestions/solutions/comments, or should I proceed, as I usually do, with displaying the HTML document outside Trados?

Thank you.

Claudio



Generated Image Alt-Text
[edited by: Trados AI at 3:58 AM (GMT 0) on 29 Feb 2024]
emoji