Our experience, knowledge and lessons learned - all here just for you.
LingoChecks
LingoChecks represent one of the core tools of LingoHub. They are quality checks that keep your projects' translations within predetermined criteria and notify you simply and efficiently whenever there are any deviations from the defined rules.
Defining LingoChecks...
There are three ways you can define LingoChecks, from the project's preferences, from the editor side panel, or in the resource files. The methods are described below.
...from the project's preferences
You can add your LingoChecks rules in the project's preferences which are accessible from the dashboard.
To define LingoChecks, follow the steps below:
- Click dashboard in the top navigation bar.
- Select a project from the left side panel.
- Click on preferences in the dashboard overview of the project.
- Click on LingoChecks.
The image below displays all available options for LingoChecks.
You can apply rules on:
Text segments: Activate the checkbox if you want to allow the reviewers to approve a translation with failed LingoChecks. Be aware that once a text segment is approved, the failed LingoChecks will not show up anymore.
Term bases: The term base stores pre-defined translations. Activate this checkbox to ensure that the specified terms are correctly translated.
Placeholders: Verifies that all the placeholders in the source text are correctly represented in the translated text.
HTML tags: Ensures that the HTML tags in the translated text conform with those of the source text.
You can also choose which of the HTML attributes you allow to be changed. If your text segment contains one of the defined HTML tags, you will be allowed to translate the values of its attributes.
By default, the following tags are set as translatable attributes:
src, alt, label, title, content, formAction, download, codebase, action, placeholder, href, abbr, lang, value
You can check if an HTML tag has translatable attributes by simply clicking on it in the editor, as shown below.
Line breaks: Verifies that the source text and the translated text have the same number of linebreaks.
All the LingoChecks, except the check for line breaks, are enabled by default.
...from the editor side panel
You can define length constraints for a selected text segment from the settings option in the editor side panel. These constraints are verified by LingoChecks when validating the text segment.
To define a length constraint, follow the steps below:
Access the editor.
Select a text segment.
Click settings in the right side panel.
Enter the minimal and maximal length of the text segment.
When setting the length constraints, you can define:
a fixed limit: i.e., min. 45, max. 128, which allows a minimum of 45 characters and a maximum of 128 characters.
an offset limit: i.e., min. -15, max. +20, which allows up to 15 characters less and 20 characters more than the original text.
Click save changes.
...in the resource file
In addition to setting LingoChecks in the Lingohub application, you can also set them directly in your resource files in the form of comments.
To distinguish them from the basic comments (which are used as the text segment description), the LingoChecks comment lines must start with an lh-check keyword, followed by a curly braces block containing the checks separated by a comma.
The following example defines LingoChecks for a text segment in a grails resource file:
# lh-check { min: -4, max: 35 }
welcome = Hooray, you're here! The day just got better - enjoy the following tips!
LingoChecks in action
Once your LingoChecks are set, they alert you whenever one of the rules you have defined is not respected. The failed LingoChecks are displayed in two locations.
In the dashboard
The LingoChecks alert symbols show up in the project progress bar found in the dashboard overview.
Clicking on them will redirect you to the editor and filter all the text segments, presenting all failed LingoChecks in the project.
In the editor
Failed LingoChecks are also displayed in the editor with a description of the cause of the failure.
Congratulations! You finished the article on LingoChecks. If there's anything we can help you with, please get in touch with our support.
Looking for further resources?
/f/42908/844x778/b4ec12788a/cta.png)