Web Preview - Usage Requirements

BWX has enabled the web preview for translating and reviewing websites. In order to see how it works, we need to follow a few guidelines and best practices.

How It Works

When a Work Unit is opened, you can select the web preview on the bottom left panel. When the web preview is enabled, type a URL in the box as you would do in the web browser and click on GO. The page should load on the preview panel.

The Web Preview works with a “best attempt” approach. You don’t necessarily need to translate the site HTML to see the preview, it can be any file - TXT, JSON, YAML, XLIFF, XML, etc., as long as it has the site content. As the content is translated and the text is confirmed, the system you identify the text in the web panel and replace it with the confirmed translations. Some characters and line breaks may stop a translation to be properly rendered, but this happens in very rare occasions. Also, the preview only translates elements rendered in the DOM, which means that if you have strings embedded in CSS or JavaScript, these may not be translated in the preview.

Requirements

In order to successfully preview a web site, these requirements should be observed:

  1. The URL is publicly accessible

  2. Content such as images, media and scripts need to be publicly accessible in the website or a CDN

  3. The web site does not actively block certain HTTP agents - the web preview is a backend service operation that requests and renders the page before rendering the content in the web browser inside the BWX Editor.

Basic HTTP Auth Option

BWX may be configured to support basic HTTP authentication. You can setup an Organizational Unit to use it and render the web preview.

Caveat: if the remote images and other assets that are accessed are inside the same authenticated HTTP domain, the user interface will display the browser’s default auth request popup:

If the first request suffices the authentication request, and the assets are publicly visible in CDNs for example, the web preview will work as expected. However, if you do have the basic http credentials, you can input those and the web preview will also load normally.

Things to Consider

CORS

Your website may use 3rd party cookies, trackers and external functionalities. If the rendering of your page is affected by these 3rd parties, this may be affected due to CORS (Cross-Origin Resource Sharing) rules set on the target sites.

Robots & Scraping Protection

If your website has some sort of protection to disallow robots, this may break the web preview functionality. Even though BWX is neither a robot or a scraping agent, some systems will detect its programmatic requests as such, and thus block the rendering of the page.

Bulk Translation

In the Editor, when you bulk translate all segments with either Machine Translation or Translation memory, the segments may or may not be confirmed. If you press Apply Targets to visualize the web page with the translated strings, not all strings will load. The Editor uses pagination of segments for performance, which means that not necessarily all segments will be loaded in your browser at first. As segments are confirmed or you scroll the Editor to load more segments, this action will “feed” your browser storage to allow for a full preview of the web page.