Deal with Inconsistencies
In version 1.4.0 of KMFasTrans PRO we introduced a new concept in the process of translating a website that we have called 'inconsistencies'. The purpose of this new feature is to detect potential mistakes that can occur when creating a multi-language site.
We say that an element is inconsistent when one of its parameters is not consistent in the context of the element. For example, an article in English language whose category is in Spanish.
As expected, the detection of inconsistencies is costly in terms of database access. Depending on the size and number of languages on the site you may want to disable the detection of inconsistencies while building a new language and enable it when it has been finished or is about to finish in order to find all the inconsistencies in one detection cycle. A configuration option is available to enable or disable the detection of inconsistencies.
You may also want to disable the detection of inconsistencies if greater freedom to make the translations is desired. The detection of inconsistencies is preventive, preventing certain actions that if taken would create an inconsistency. For example creating a set of translations that lacks an element in the reference language, or creating a translation from a source element that has inconsistencies.
If inconsistencies detection is enabled, inconsistencies will been calculated when editing any element and the result will be displayed in the editing screen. Inconsistencies may also be calculated for all elements in a process we call 'Consistency check'.
With the detection of inconsistencies enabled the Translations Management Dashboard screen will show the current reference language and will signal all items that contain inconsistencies. (See the screenshots of the Translations Dashboard below).
Our advice is to keep enabled the detection of inconsistencies because it helps to find mistakes in the multi-language structure. A website that does not contain inconsistencies provides the guarantee that all that has been translated is consistent and it is going to have the same behavior in any language.
There are two types of inconsistencies that we call 'self' inconsistencies and 'translation' inconsistencies that we will explain in detail below.
The Reference Language
Translation Inconsistencies are always detected in relation to the source of the translation. For example if the item Art1-GB in English language is assigned to the category Cat1-GB in English langauge and the translation of Art1-GB into Spanish language is Art1-ES, then the category Cat1-ES of Art1-ES must be the translation into Spanish language of the category Cat1-GB. If it is not or does not exist, Art1-ES has a translation inconsistency. To detect this inconsistency Art1-ES is analyzed with regard to Art1-GB which in this case is the source of the translation.
Thus it is necessary to have a reliable source with respect to which perform the detection of inconsistencies. This reliable source is one of the content languages defined in the site that we have called the 'Reference Language for detecting inconsistencies'. The reference language is selected on the screen that displays the content languages and it's usually the default site language.
For the reference language to be reliable it shall not contain inconsistent items (items with self-inconsistencies) because if an item has inconsistencies and is used as a translation source it will transfer its inconsistencies to the translated element. Since the reference language is the reference for translations into other languages, by definition the elements in the reference language can not have translation inconsistencies, only self-inconsistencies or no inconsistencies.
Although it is necessary to define a reference language is still possible to make translations from any language to any language because the detection of inconsistencies will check that the source item of the translation is not inconsistent, preventing the translation to occur if it is.
When you install KMFasTrans, the instalation process will choose the default site language as the reference language if it is also a content language. If it wasn't a content language, the first content language found will be used. If there weren't content languages configured the detection of inconsistencies will be disabled.
The reference language can also be manually selected in the Content Languages management screen:
To choose a reference language just click on the desired language in the 'Incons.Reference' column (this column is only visible if the detection of inconsistencies is enabled).
When changing the reference language it is necessary to make a Consistency check for self inconsistencies and translation inconsistencies for all the components.
Self Inconsistencies
Self inconsistencies are those that an element has in itself, regardless of whether or not it is a translation of another element. The example given above of an article whose category is in a language other than that of the article is a self inconsistency.
The main function of detecting self-inconsistencies is to provide a reliable source of translations. Thus its main application is the detection of self-inconsistencies of the chosen reference language. You really do not need to worry about the self inconsistencies of languages that are not the reference language because when creating the translations using the reference language as the source, the self inconsistencies of the translations, if they exist, will be shown as translation inconsistencies
This type of inconsistency is detected in several ways (we are assuming in these examples that the reference language is English(en-GB)):
1). In the list of the translation management dashboard when the self inconsistency affects any element in the reference language. You will see the id in red and framed in a box, and when you hover the mouse over it you will see an explanatory text.
2). An item in the reference language is edited in Joomla.
3). An item in a language that is not the reference language and is not associated with any other (it does not belong to any set of translations), is edited.
Translation Inconsistencies
Translation inconsistencies are those that an element has in relation to another that is its source of translation. For example a menu item in Spanish language(MI1-ES) showing an article in Spanish language (Art1-ES) is inconsistent if the article in Spanish language is not the translation of the article in English language that shows the menu item source of the translation. The figure below explains the example:
If item Art1-ES is not the translation into Spanish of Article Art1-GB, then the menu item MI1-ES is inconsistent. It has a translation inconsistency.
Remember that in KMFasTrans article Art1-ES is the translation into Spanish of the article Art1-GB if both articles are associated, ie if they belong to the same set of translations.
Types of translation inconsistencies:
The types of translations inconsistencies refer to the source item of the translation, the target item and each of the fields of those elements that can have inconsistencies.
First, the existence of inconsistencies is shown by a red ellipse in each element that contains inconsistencies on the Translations Management Dashboard screen:
When editing the element that contains inconsistencies, the following screen is displayed:
This screen is the same as the one obtained when editing an item without inconsistencies, with only two differences:
1). When the element has inconsistencies, as in this example, a line with the source and target items of the translation and a table with one line for each inconsistent field in the target item are shown at the top.
2). All inconsistent fields have a background color to be able to identify them quickly, as in the present example in which the Category field has yellow as the background color.
Let's see how to interpret the contents of the inconsistencies table:
Inconsistent Field
This column represents the field detected as inconsistent on the target element relative to the source element and has two subcolumns:
- Field name: is the name of the field in the source item whose equivalent in the target item is inconsistent. In this case, the inconsistent field is the category of the article.
- Tab: is the tab where the field is located. If it is not visible, click on the name of the tab in the target item to make it visible in both, the source and the target items.
Value of the field in the Source Item
Contains the value of the field in the source item that led to an inconsistency in the target element. In the example this is the value of the field 'Category' in the tab 'Deatils' of the article titled 'Articles Category Module' with ID: 64. The subcolumns of this column are:
- Title/Value: The title or value of the selected item in the field. In this case, 'Content Modules', which is the title of the category.
- Lang: The language of the category 'Content Modules'. In this example 'English'.
- ID: The ID of the selected item in the field. In this example it is a category whose ID is 64.
Value that the field should have in the Target Item
The subcolumns of this column are:
- TitleValue: Is the title or value that the target item should have so as not to be inconsistent. In this case it is the 'Translation into French (FR) language of the value of the field in the Source Item' because the translation into French of the category 'Content Modules (en-GB)' was not found.
- Lang: The language of the category that should be selected in the 'Category' field of the target item. In the example is French because we are translating into French language.
- ID: It is the id of the element that should be selected in the 'Category' field in the target item. In the example the ID is zero because the inconsistency is 'No translation found' indicating that a translation into the French language for the category 'Content Modules (en-GB)' was not found.
Inconsistency description
The inconsistency found. In the example 'No translation found'.
More Info
In this column there is an information icon that when hovering the mouse over it, shows more information about the inconsistency. The information for this example is the following:
Actions
It contains one or more icons to take any of the actions indicated in 'More info'. Hovering the mouse over the icon will show the action that will be taken when you press it.
The following two screens show what would be obtained in this example
Show all
This column contains in each line a 'Hide row' link. It is used to hide the row when the inconsistency has been resolved. In addition to hiding the row, it eliminates the background color of the inconsistent field. In this way it is possible to solve the inconsistencies one by one and remove them from the screen to facilitate the work showing only the unresolved ones.
If you want to see the hidden rows again just press 'Show all' in the header.
Types of translation inconsistencies
-
1. No translation found
This is the case explained above. If the element that it is the translation of the field in the source item into the target language exists but it is not known because it is not associated (not in the same set of translations that the source), the inconsistency is resolved by associating the two. If the translation of the field does not exist it must be created. The fastest way to associate the items or create a new translation from this screen is by clicking the appropiate link found in the Actions column.
This inconsistency usually appears with some frequency when creating a new item translation if you forgot to previously translate some of the fields you are going to need. For example when translating an article from English to Spanish without having previously translated the category. In the above example it would be enough to click on the icon Create to create the translation into French of the category 'Content Modules'.
-
2. Not selected
This inconsistency indicates that a translation of the field in the source item was found but that translation is not selected in the target item. In the example, the category 'SIM TRANS TO nl-NL Components (nl-NL)' (ID: 179) is the Dutch translation of the category 'Components (en-GB)' (ID: 21) but it is not selected in the 'Category' field of the article 'Administrator Components (nl-NL)' (ID: 127) .
This inconsistency is resolved by selecting the translation of the element in the destination field and saving the item.
The info shown by the 'More info' icon is as follows:
3. Unpublished
This inconsistency is only detected when the component configuration option "Detect inconsistencies for unpublished elements" is set to 'Yes' (Default value)
Indicates that the translation of the field in the source item was found and that it is selected in the target item but it is unpublished. The 'More Info' shows the info to solve the inconsistency, that is usually achieved by clicking on one of the icons shown in the Actions column. This info for this example is as follows:
The tips shown in the 'Actions' column icons are as follows:
-
4. Trashed
This inconsistency is only detected when the component configuration option "Detect inconsistencies for trashed elements" is set to 'Yes' (Default value)
Indicates that the translation of the field in the source item was found and that it is selected in the target item but it is in the trash. The 'More Info' shows the info to resolve the inconsistency, that is usually achieved by clicking on one of the icons shown in the Actions column. This info for this example is as follows:
The tips shown in the 'Actions' column icons are as follows:
-
5. Archived
This inconsistency is only detected when the component option "Detect inconsistencies for archived elements" is set to 'Yes' (Default value)
Indicates that the translation of the field in the source item was found and that it is selected in the target item but it is archived. The 'More Info' shows the info to resolve the inconsistency, that is usually achieved by clicking on one of the icons shown in the Actions column. This info for this example is as follows:
The tips shown in the 'Actions' column icons are as follows:
-
6. Selected and should not be
This inconsistency usually appears when the field is a multiple choice field and there is an item selected in the field of the target item that is not a translation of any of the items selected in the field of the source item.
The 'More Info' shows the info to solve the inconsistency. This info for this example is as follows:
-
7. Not selected and should be
This case is very similar to Not selected but the difference here is that it is a field of multiple values that must contain the same values in the target item as in the source item.
The 'More Info' shows the info to solve the inconsistency. This info for this example is as follows:
-
8. Not equal to the source
Indicates that the value of the field in the target item is not equal to the value of the field in the source item and they should be equal. An example is the values of a Checkbox field:
The 'More Info' shows the info to solve the inconsistency. This info for this example is as follows:
All inconsistencies described above are also displayed when editing items using the native editor in Joomla administration area as shown by the following examples:
-
A. Self inconsistency example
-
B. Translation inconsistency example
In this example it is interesting to note that the source element with ID: 262 is not visible on the screen because it is the element in the reference language that is associated with the one visible (ID: 693).
The first inconsistency indicates that the item 'Content Component (en-GB) (ID: 266)' is the value set for the field 'Parent Item' in the tab 'Details' of the source item 'Featured Articles (en-GB) (ID:262)', but a translation of this item into the Dutch language has not been found.
The second inconsistency indicates that the item 'Components (en-GB) (ID: 21)' is the value set for the field Select Categories in the tab 'Layout' of the source item 'Featured Articles (en-GB) (ID:262)', and a translation of this item has been found and it is 'SIM TRANS TO nl-NL Components (nl-NL) (ID:179)' but it is unpublished.
Inconsistencies of articles are also displayed when editing articles in the front-end as shown in the following example:
As in the previous example the source item is the item in the reference language (ID: 5) which is not visible on the screen. The inconsistency indicates that the category of the source item, the article 'Authentication (en-GB)' (ID:25), is 'Plugins (en-GB)' and its Spanish translation titled 'SIM TRANS TO es-ES Plugins (es-ES)' with ID: 230 is not the category of the article in Spanish language titled 'SIM TRANS TO es-ES Authentication (es-ES) (ID:207) (the translated element). This inconsistency would be resolved simply by selecting the value 'SIM TRANS TO es-ES Plugins (es-ES)' as the 'Category' in the translated element.
Detecting Translation Inconsistencies
KMFasTrans detects inconsistencies when displaying the list of items in the Translation Management Dashboard and when editing an item. It is also possible to find inconsistencies manually at any time using the 'Consistency Check' process.
Showing Inconsistencies in the Translations Management Dashboard
The Translation Management Dashboard shows inconsistencies as follows:
- 1. The ID of the element in the ID column is in red color and framed in a box when there is an inconsistency in that item. Hovering on the ID, information on the inconsistency is displayed. Examples:
- 2. The 'box' of the item in the column of its language has a vertical red ellipse. This indicates that the item has inconsistencies.
- 3. The column 'Status' of Translations Set contains a warning icon indicating that some item of the set contains inconsistencies. This is useful when the item containing the inconsistency is in a language not shown on the screen as in the following example. If you click on the set number you will get a list of all the elements contained in the set. In the list those that have some inconsistency are indicated.
Note:
In the Dashboard, only the inconsistencies of associated items are shown. The inconsistencies of non-associated items, ie not belonging to any set of translations are shown only in the editing screen (and of course in the process 'Consistency Check'), and since they are not associated, only self inconsistencies can occur.
Showing Inconsistencies in the Editing screen
- 1. When creating or editing a translation the inconsistencies detection is performed on all the elements of the set, displaying those of the selected target element only. If there are other items of the set in other languages with translation inconsistencies, the links on the language tabs on the righthand side will have a red ellipse as shown in the screen capture.
In this example the selected language is Italian and the item in Italian language does not have inconsistencies but there is an indication that items in Dutch and Spanish do. Pressing any of these two languages will show the item and its inconsistencies.
Consistency Check Process
The Consistency Check process is a process that can be launched manually at any time. This process recalculates self inconsistencies or translation inconsistencies and builds a report with the result of the last time he was launched.
The process is launched from the left menu in any KMFasTrans window clicking the 'Consistency Check' link. The screen that is obtained by clicking on that link is:
As seen in this screen capture you can check the two types of inconsistencies but separately. For self-inconsistencies you have to select a language and click 'Search' in the upper box. For translation inconsistencies you have to select one or more components in the box below and then click 'Search'.
Keep in mind that if you don't select all components, you may have false positives for the inconsistencies that an element can have. Yet it can be useful to reduce the time required to recalculate inconsistencies when you know what you are doing. When in doubt the best thing is to select all components although the process takes a little longer.
When the process ends the results are displayed in the upper part of the screen as shown in the following example:
In self inconsistencies only a message with the number of inconsistencies found is displayed. You can obtain the detail by clicking on the 'View Report of Last Search' button, obtaining the following information (the column Date shows the date in wich the search was done):
When looking for translation inconsistencies you get the following screen
Translation inconsistencies are shown for each component, and the total is also shown. To see the details of the translation inconsistencies found you can click on the 'View Report of Last Search' button on the bottom of the screen. The following information will display:
In the image you can see that there are aids in each row and a column 'Actions' from which you can take actions to solve the inconsistencies in a way similar to how it is done in the editing screen