Difference between revisions of "Localyzer Dashboard FAQ"

From Lingoport Wiki
Jump to: navigation, search
(Sonar starts but then stops)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= The Resource Manager Completion widget indicates 100% but some kits are outstanding. What does it mean? =
+
= The Resource Manager Completion Report indicates 100% but some kits are outstanding. What does it mean? =
   
 
[[File:DashboardCompleteVTranslation.jpg]]
 
[[File:DashboardCompleteVTranslation.jpg]]
   
The Completion widget is based on the base files (say, en US files) and the translated files (say de and fr) to determine how many keys, how many files, how many base words do not have a translation. If the French files, the keys in the base file, and the translated texts are present, the Completion widget will say 100%.
+
The Completion Report is based on the base files (say, en US files) and the translated files (say de and fr) to determine how many keys, how many files, how many base words do not have a translation. If the French files, the keys in the base file, and the translated texts are present, the Completion Report will say 100%.
   
If the base file text (en US for instance) has been modified, prep kits should be sent for translation. The source files still have the equivalent translated files, with all the keys and all the text, so it remains at 100%.
+
If the base file text (en US for instance) has been modified, prep kits should be sent for translation. The source files still have the equivalent translated files, with all the keys and all the text, so it remains at 100%. If keys are added to the base file text, the Completion Report will show lower than 100% until the new keys are translated and returned.
   
= I keep getting an error on ./sonar start =
 
You can try to start Sonar by launching this command in $DASHBOARD_HOME:
 
java -Djava.awt.headless=true -XX:MaxPermSize=128m -server -Xmx512m -Xms256m -cp lib/*:extensions/jdbc-driver/derby/*:extensions/jdbc-driver/mssql/*:extensions/jdbc-driver/mysql/*:extensions/jdbc-driver/oracle/*:extensions/jdbc-driver/postgresql.*:. org.sonar.application.StartServer
 
   
== Sonar starts but then stops ==
 
   
  +
= What are the Localyzer Source Issues?=
After starting Sonar, check the status multiple times. Sometimes, it will say that it started, but then quit after a few seconds.
 
<pre>
 
> /var/lib/jenkins/lingoport/dashboard-server-5.6.1/bin/linux-x86-64/sonar.sh start
 
Starting SonarQube...
 
Started SonarQube.
 
   
  +
In the Resource Manager Dashboard, the number of Localyzer Issues is shown.
> /var/lib/jenkins/lingoport/dashboard-server-5.6.1/bin/linux-x86-64/sonar.sh status
 
SonarQube is running (13880).
 
> /var/lib/jenkins/lingoport/dashboard-server-5.6.1/bin/linux-x86-64/sonar.sh status
 
SonarQube is running (13880).
 
> /var/lib/jenkins/lingoport/dashboard-server-5.6.1/bin/linux-x86-64/sonar.sh status
 
SonarQube is not running.
 
</pre>
 
   
  +
[[File: LRMSourceIssues.jpg |600px]]
Check to see if the process is still up, even though Sonar thinks it is down. If there is no output, the process is not running.
 
   
  +
Selecting the issues will show all the issues and the cause for that issue and you can see the breakdown in the types of issues using the selections on the left side of the page.
<pre>
 
> fuser 9000/tcp
 
9090/tcp: 14118
 
> fuser 9001/tcp
 
9010/tcp: 13905
 
</pre>
 
   
  +
[[File: LRMIssues.jpg | 800px]]
Kill the processes using the following commands:
 
<pre>
 
> fuser -k 9000/tcp
 
9090/tcp: 14118
 
> fuser -k 9001/tcp
 
9010/tcp: 13905
 
</pre>
 
   
  +
For this case, the majority of the issues are '''<code>LRM Src Tran-Missing File Check</code>''' and '''<code>LRM Src Tran-Missing Key Check</code>''' which simply mean that the files have not been translated yet, so there are no translated files or keys.
And start the sonar process again and check the status multiple times.
 
<pre>
 
> /var/lib/jenkins/lingoport/dashboard-server-5.6.1/bin/linux-x86-64/sonar.sh start
 
Starting SonarQube...
 
Started SonarQube.
 
   
  +
See [[LRM Checks]] for more information about these issues. Unless the issues are 'Critical', these are warnings and prepkits can still be created.
> /var/lib/jenkins/lingoport/dashboard-server-5.6.1/bin/linux-x86-64/sonar.sh status
 
SonarQube is running (13880).
 
</pre>
 
   
= Unable to read and import the source file: What do I do? =
+
= What are critical errors and how do I fix them? =
   
  +
Suppose you have a .properties resource file that looks like:
I'm getting this error when importing files using the Dashboard_Update.sh:
 
<pre>
 
ERROR: Error during Sonar runner execution
 
ERROR: Unable to execute Sonar
 
ERROR: Caused by: Unable to read and import the source file : 'FILENAME HERE' with the charset : 'UTF-8'.
 
ERROR: Caused by: Unable to persist : SnapshotSource[snapshot_id=120719,data=<?php
 
[...] ERROR: Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [org.sonar.api.database.model.SnapshotSource] ERROR: Caused by: could not insert: [org.sonar.api.database.model.SnapshotSource] ERROR: Caused by: Incorrect string value: '\xF0\x9F\x8F\x81 ...' for column 'data' at row 1
 
</pre>
 
   
  +
AKEY_1=Well, my heart went boom
This indicates that the import part of the Dashboard is trying to read a file with an encoding (here UTF-8) which is not the encoding of the file to read, or the file is corrupted for that encoding.
 
  +
AKEY_1=When I crossed that room
  +
AKEY_2=
  +
AKEY_3=And I held her hand in mine
  +
we danced through the night
  +
AKEY_4={num_of_beatles, plural, one{Ringo}}
  +
AKEY_5=And we held each other tight
   
  +
When the automation job is run that contains that resource file, the result on the LRM Dashboard will look like:
Some possible solutions:
 
  +
* Exclude the offending file(s) from being imported using sonar-project.properties <code>sonar.exclusions=com/example/tests/**,com/example/package2/*.java. </code>
 
  +
[[File: LRMCriticalErrors.jpg | 600px]]
* Change the encoding of the Dashboard import using sonar-project.properties <code>sonar.sourceEncoding=Cp1252</code> or whatever is the right encoding for the project.
 
  +
  +
Since there are critical errors, no prepkits can be created. Selecting the red text will go to the Issues page to see what the critical errors are. Opening up the file, there are actually 4 issues, but only 3 of them are critical.
  +
  +
[[File: LRMAllIssues.jpg | 900px]]
  +
  +
The three critical issues are:
  +
# There are two AKEY_1 values. Cannot have duplicate keys.
  +
# "we danced through the night" has no associated key
  +
# <code>AKEY_4={num_of_beatles, plural, one{Ringo}}</code> is badly formatted ICU.
  +
  +
And one Minor issue:
  +
# AKEY_2 has no associated text.
  +
  +
Fix the critical issues, check the resource file into the repository and run the automation job again and the critical errors on the LRM Dashboard should disappear.
   
 
= Why am I getting this Date Format Check? =
 
= Why am I getting this Date Format Check? =
Line 79: Line 61:
 
This check indicates a string in a resource string could be a date format.
 
This check indicates a string in a resource string could be a date format.
 
For instance, the following text could be date formats:
 
For instance, the following text could be date formats:
<code>
 
*mm/dd/yyyy
 
*D
 
*F
 
*km
 
*h:m
 
*mm
 
*m/s
 
</code>
 
and are tagged as such potential date format.
 
   
  +
*<code>mm/dd/yyyy</code>
  +
*<code>D</code>
  +
*<code>F</code>
  +
*<code>km</code>
  +
*<code>h:m</code>
  +
*<code>mm</code>
  +
*<code>m/s</code>
   
  +
and are tagged as such potential date format.
   
*'F' could be the "day of the week in months", etc.
+
*<code>F</code> could be the "day of the week in months", etc.

Latest revision as of 20:35, 23 February 2021

The Resource Manager Completion Report indicates 100% but some kits are outstanding. What does it mean?

DashboardCompleteVTranslation.jpg

The Completion Report is based on the base files (say, en US files) and the translated files (say de and fr) to determine how many keys, how many files, how many base words do not have a translation. If the French files, the keys in the base file, and the translated texts are present, the Completion Report will say 100%.

If the base file text (en US for instance) has been modified, prep kits should be sent for translation. The source files still have the equivalent translated files, with all the keys and all the text, so it remains at 100%. If keys are added to the base file text, the Completion Report will show lower than 100% until the new keys are translated and returned.


What are the Localyzer Source Issues?

In the Resource Manager Dashboard, the number of Localyzer Issues is shown.

LRMSourceIssues.jpg

Selecting the issues will show all the issues and the cause for that issue and you can see the breakdown in the types of issues using the selections on the left side of the page.

LRMIssues.jpg

For this case, the majority of the issues are LRM Src Tran-Missing File Check and LRM Src Tran-Missing Key Check which simply mean that the files have not been translated yet, so there are no translated files or keys.

See LRM Checks for more information about these issues. Unless the issues are 'Critical', these are warnings and prepkits can still be created.

What are critical errors and how do I fix them?

Suppose you have a .properties resource file that looks like:

AKEY_1=Well, my heart went boom
AKEY_1=When I crossed that room
AKEY_2=
AKEY_3=And I held her hand in mine
we danced through the night
AKEY_4={num_of_beatles, plural, one{Ringo}}
AKEY_5=And we held each other tight

When the automation job is run that contains that resource file, the result on the LRM Dashboard will look like:

LRMCriticalErrors.jpg

Since there are critical errors, no prepkits can be created. Selecting the red text will go to the Issues page to see what the critical errors are. Opening up the file, there are actually 4 issues, but only 3 of them are critical.

LRMAllIssues.jpg

The three critical issues are:

  1. There are two AKEY_1 values. Cannot have duplicate keys.
  2. "we danced through the night" has no associated key
  3. AKEY_4={num_of_beatles, plural, one{Ringo}} is badly formatted ICU.

And one Minor issue:

  1. AKEY_2 has no associated text.

Fix the critical issues, check the resource file into the repository and run the automation job again and the critical errors on the LRM Dashboard should disappear.

Why am I getting this Date Format Check?

Date formats should not be the responsibility of a translator. Developers must write i18n code which handle formatting based on a locale framework.

The Date Format check is based on Java's Date Format syntax: https://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html

This check indicates a string in a resource string could be a date format. For instance, the following text could be date formats:

  • mm/dd/yyyy
  • D
  • F
  • km
  • h:m
  • mm
  • m/s

and are tagged as such potential date format.

  • F could be the "day of the week in months", etc.