Skip to main content

Rigi Documentation

HTML previews-related questions and answers

It is usually hard to get 100% coverage, especially for large applications.

Possible causes are:

  • specific state. It can be hard to display some specific strings in the UI. Some messages can only appear when a device is in a particular state. How about a message only shown on February 29th in a leap year?

  • dead strings. Some strings might not be used anymore in the software application. So-called 'dead strings' can still appear in a .properties file but are not being used anymore. In this case, you should ask the developers to remove such strings.

  • lack of permissions. You might not have access rights to see all information in the UI.

  • page content depends on the role. You might need to log in in a different role to see some specific messages. In an HR software application, a user in an HR manager role sees different strings than an employee and vice versa.

You do not always need to reach 100% string coverage.

For example, if you have a big project already translated and documented, you might be interested in only generating HTML previews for the new features being created. In that case, a coverage of 1% can be sufficient for your purposes.

However, much higher coverage is required when translating a new language from scratch. We recommend considering the 80/20 rule, where 20% of the most-used pages probably show 80% of the strings. Another option, in this case, would be to offer the translator the opportunity to translate the live application in context. For details, see the Translate using live links guide.

In live mode, the RigiJS script can replace multiple texts in an element with a single translation. It is caused by the so-called row-texts phenomenon (for details, see the Will Rigi support my web application? section).

There is no way to suppress this phenomenon in live mode, but the saved Rigi HTML Previews will create an element for each text.

Rigi captures HTML previews of the DOM in the browser using the RigiJS script. It copies everything, including images, fonts, CSS, etc. This approach has its limitations. For example, cross-site scripting can prevent the Rigi script from accessing resources. For details, see the Can Rigi capture iframes that are hosted in another domain? section.

Rigi captures HTML previews based on the source locale extended with Rigi tokens. Rigi stores captured variables unchanged.

For example, in the sentence "John has 10 apples," Rigi will store the value of the variable "10." 

This approach works well for user names, small values, etc., but can be problematic for variables representing numbers, dates, or times. In those cases, the previews will display the captured values. For example, a preview in German can display "1,000" instead of "1.000".