Difference between revisions of "Globalyzer Installation and Configuration"

From Lingoport Wiki
Jump to: navigation, search
(Created page with "Globalyzer consists of a Globalyzer Client and a Globalyzer Server. The Server manages user accounts and rule sets created within those accounts. The Client creates projects...")
 
(Globalyzer Client: The Workbench)
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Globalyzer consists of a Globalyzer Client and a Globalyzer Server.
+
Globalyzer consists of a <b>Globalyzer Server</b> and <b>Globalyzer Clients</b>.
   
  +
== Globalyzer Server ==
The Server manages user accounts and rule sets created within those accounts.
 
  +
The Globalyzer Server manages user accounts and rule sets. Lingoport provides a (hosted) Globalyzer Server at <b>www.globalyzer.com</b>. Alternatively, companies can purchase and install their own on premises Globalyzer Server to run on their site. To access a server, you must already have an account; simply browse to the server URL (either our hosted server or your on premises server) and log in with your account credentials.
The Client creates projects and scans, accessing the rule sets on the server to run the scans looking for internationalization issues.
 
   
  +
== On Premises Globalyzer Server: LDAP Configuration ==
Lingoport provides a Globalyzer Server at www.globalyzer.com (hosted); alternatively, companies can purchase and install their own server (enterprise) to run on their site. To access a server, you must already have an account created; simply browse to the server URL (either our hosted server or your enterprise server) and log in with your account credentials.
 
  +
An on premises Globalyzer Server can be configured to use your company's LDAP system. When users log in to Globalyzer, they will enter their LDAP username and LDAP password. If they are authenticated (exist in the LDAP system) and are authorized to use Globalyzer (belong to a Globalyzer group as configured in LDAP), then a Globalyzer account is created with information gathered from LDAP. Click [[Globalyzer_Server_LDAP_Installation|<b>here</b>]] for detailed information.
   
  +
== On Premises Globalyzer Server: SSO Configuration ==
The Globalyzer Client comes in several flavors. The client creates projects and scans, accessing the rule sets on the server to run those scans.
 
  +
An on premises Globalyzer Server can be configured to use SAML SSO with your company's chosen Identity Provider. When users log in to the Globalyzer Server, they will click the SSO button which will authenticate the user
Lingoport provides a hosted server at www.globalyzer.com Globalyzer Lite scans source code for internationalization issues. It is well suited for use within automation routines and Continuous Integration (CI) systems. Additionally, it is designed to be used as an external tool from within Integrated Development Environments (IDEs) such as Visual Studio, IntelliJ IDEA, and Eclipse.
 
  +
for the Globalyzer application. On initial login, a Globalyzer account will be created. Click [[Globalyzer_Server_SSO_Installation|<b>here</b>]] for detailed information.
   
  +
== Globalyzer Client ==
Globalyzer Lite generates scan reports to a directory specified via command line arguments / a project definition file. Scan reports are available in a variety of formats.
 
  +
The Globalyzer Client manages projects and scans, accessing the rule sets on the Globalyzer Server to execute the scans, resulting in internationalization issues. The Globalyzer Client comes in several flavors and is downloaded by each individual user. To download a Client, login to the Server, scroll to the bottom of your home page, and click on the <b>download the Globalyzer Client here</b> link. This displays the Client Download page with several Globalyzer Client options, detailed below.
   
  +
== Globalyzer Client: The Workbench ==
Globalyzer Lite is a product that requires special licensing. It is delivered in a zip file.
 
   
  +
The Globalyzer Workbench is a standalone development environment designed for i18n work. This can include refactoring code for the purpose of fixing i18n issues, externalizing embedded strings, and refining rule sets for detecting i18n issues. It is well suited for i18n experts. The Globalyzer Workbench is a full Eclipse-based i18n IDE which may not be appropriate for non-i18n specialists.
'''Note''': For Eclipse, the <code>Clickable Console Plugin (1.0.0)</code> requires Eclipse Luna and above.
 
   
  +
To download, select the appropriate jar file for your OS platform from the Client Download page. Then run the jar to install the Workbench. <b>Note: The Workbench requires the Java JDK (not just JRE) to be installed.</b> See [[Lingoport_Suite_Installation#Supported_Versions|Versions]] for the appropriate version.
== Using Globalyzer Lite from an Integrated Development Environment ==
 
   
  +
== Globalyzer Client: Lite ==
Lite may be used within many IDEs that support external tools, including Visual Studio, IntelliJ IDEA, and Eclipse. Configuring Lite as an external tool takes some initial setup, but is relatively easy to accomplish. Once configured, Lite may be used through the IDE's external tool menu, with the click of a button. The recommended, documented tools:
 
   
  +
Globalyzer Lite forgoes the interactivity of Globalyzer Workbench. Instead, it focuses on being lightweight, fast, parallelizable, and friendly towards typical developers. All configuration necessary for running multiple project scans with Globalyzer Lite is contained within Project Definition files, which can be distributed to an entire team. Globalyzer Lite can be run from IDEs with the click of a button and has been tested with Visual Studio, Eclipse, and Intellij IDEA.
# Scan the currently selected file/directory.
 
# Scan everything within the parent directory of the currently selected file/directory.
 
# Scan the entire project.
 
   
  +
To download, select the globalyzer-lite.zip file from the Client Download page, unzip, and follow instructions in the README.
Demonstration videos are available for:
 
  +
Click [https://www.globalyzer.com/gzserver/help/referenceLite/globalyzer-lite-overview.html here] for more information on Globalyzer Lite.
   
  +
== Globalyzer Client: Command Line Interface ==
* [https://player.vimeo.com/video/137641243 Visual Studio]
 
* [https://player.vimeo.com/video/137641242 IntelliJ IDEA]
 
* [https://player.vimeo.com/video/137641241 Eclipse]
 
   
  +
The Command Line Interface (CLI) allows you to run much of the Globalyzer Workbench from a command line, such as listing project and scan information, scanning, exporting, and importing.
The developer can then use the power of the IDE to refactor the relevant issues or to mark false positives in the code using Globalyzer ignore comments, such as $NON-NLS-L$. For more information, see the Globalyzer Comment Tags in [[ False Positives | False Positives ]] .
 
  +
In addition, it supports calculating and reporting on the differences in scans. It is useful for running nightly scans.
   
  +
Note: Not all Globalyzer functionality is available from the command line; you will still need either the Workbench or Lite to create projects and scans. Also, the Workbench is the only client
Those refactoring and the comment tags are now part of the code: The Continuous Globalization System using the same Lite project definition file will show the same results in the Dashboard.
 
  +
that supports code fixing, such as string externalization.
   
  +
To download CLI, download and install the Workbench, which installs the globalyzer-cli.jar file. Click [https://www.globalyzer.com/gzserver/help/referenceCommandLine/cmd-line-client.html here] for more information on CLI.
== Using Globalyzer Lite in a Continuous Globalization System ==
 
   
  +
== Globalyzer Client: API ==
Globalyzer Lite is easy to integrate into Continuous Integration (CI) systems. For instance, using Lite from Jenkins can be done through the following steps:
 
   
  +
The Globalyzer API allows you to create Globalyzer projects and scans, execute scans, and generate reports from a Java program. Globalyzer Lite makes use of the API, and most users prefer using Lite instead of writing their own Java program.
# Check in a project definition file into source control (or, if you prefer, place one in the Jenkins server's filesystem).
 
# Run the following from Jenkins' shell:
 
#:<code>java -jar globalyzer-lite.jar -f "${WORKSPACE}/GlobalyzerProjectDefinitionFile.xml" --project-path "${WORKSPACE}" --report-path "globalyzer-lite-reports"</code>
 
# Use the Lingoport Dashboard to display the results from the generated reports.
 
   
  +
Note: Not all Globalyzer functionality is available from the Globalyzer API; you will still need the Globalyzer Workbench to create customized projects and scans (the API relies on defaults, though the rule sets can be customized), and the Workbench is required for string externalization.
You may also pass the reports to your own reporting system.
 
   
  +
If you want to use the API with an in-memory database, download and install Lite.
== Using Globalyzer Lite from the Command Prompt / Shell ==
 
  +
If you want to use the API with a physical database, download and install the Workbench.
 
  +
Click [https://www.globalyzer.com/gzserver/help/referenceAPI/globalyzer-api-overview.html here] for instructions on writing your Java program.
Globalyzer Lite can be executed from a command prompt or shell via the following command:
 
 
<code>java -jar globalyzer-lite.jar some_location/YourProjectDefinitionFile.xml</code>
 
 
After lite finishes each scan, a relevant Globalyzer report is created at the location specified in the Project Definition's report path.
 
 
Lite also allows for altering the following parameters via command line options:
 
 
* The Project Path
 
* The Report Path
 
* The Files/Directories to scan
 
 
 
== Sharing Project Definition Files Between IDEs and Build Systems ==
 
 
It is common to check in a single project definition file per code repository. However, the desired IDE configuration may sometimes be incompatible with the desired build system configuration.
 
 
These incompatibilities are best solved by modifying the project definition file within the build system. The IDE config can then be used as the default.
 
 
Here is an example: The desired report type for Lite may be ScanDetailedCSV for developer usage, but will need to be ScanDetailedXML within the build system. The project definition file would then be written out with the <report-type> set to ScanDetailedCSV:
 
<pre><gzproject>
 
...
 
<report-type>ScanDetailedCSV</report-type>
 
...
 
</gzproject></pre>
 
 
The build system can then be set to auto-replace "ScanDetailedCSV" with "ScanDetailedXML". The following Linux command will do so:
 
 
<code>$ sed --in-place 's|ScanDetailedCSV|ScanDetailedXML|' $WORKSPACE/ProjectDefinition.xml</code>
 
 
If desired, the opposite replacement also may be performed at the end of the build.
 
 
Finally, here is a bash function to replace the content of any XML field:
 
 
<pre>replace_xml_token() {
 
token_name=$1
 
new_content=$2
 
sed -ri "s|(<${token_name}>).*(</${token_name}>)|\1${new_content}\2|g" $WORKSPACE/ProjectDefinition.xml
 
}</pre>
 
 
It may be used like so:
 
 
<code>$ replace_xml_token "report-type" "ScanDetailedXML"</code>
 
 
== Ease of Installation ==
 
 
Installing Lite is easy. To install:
 
 
# Unzip the Globalyzer Lite zip file at a desired location
 
# Run either lite-setup.bat or lite-setup.sh depending on your system.
 
 
== Configuration & Rule Sets ==
 
 
Before use of Globalyzer Lite, rule sets will need to be configured on the Globalyzer Server. Properly configured rule sets better detect i18n issues, and cut down the rate of false positives.
 
 
A Project Definition File will then need to be created for the given project. This file may be distributed to multiple users working on the same project.
 
 
The project definition file will need to make use of the correct rule sets relevant to the project, and to specify which directories to scan with each rule set. It is recommended that this file be configured by an i18n knowledgeable developer or i18n specialist.
 
 
== Project Definition Format==
 
 
Here is the template for a project definition file. For the full instructions to setup a project definition file, see our
 
[https://www.globalyzer.com/gzserver/help/referenceLite/project-definition-file-overview.html help page].
 
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
&lt;!-- All items should be allowed anywhere in the xml as long as the hierarchy
 
is preserved -->
 
<gzproject>
 
<login>
 
<username></username>
 
<password></password>
 
<server></server>
 
&lt;!-- Optional Parameters --&gt;
 
<optional>
 
<proxy-user></proxy-user>
 
<proxy-password></proxy-password>
 
<proxy-host></proxy-host>
 
<proxy-port></proxy-port>
 
<optional>
 
</login>
 
<project-path></project-path> &lt;!-- May instead be specified from command line --&gt;
 
<project-name></project-name>
 
<report-path></report-path> &lt;!-- May instead be specified from command line --&gt;
 
<report-type></report-type>
 
<scans>
 
<scan>
 
&lt;!-- create and execute a single scan with this info -->
 
<scan-name></scan-name>
 
<ruleset-name></ruleset-name>
 
<ruleset-owner></ruleset-owner>
 
</scan>
 
<scan>
 
&lt;!-- create and execute a single scan with this info -->
 
<scan-name></scan-name>
 
<ruleset-name></ruleset-name>
 
<ruleset-owner></ruleset-owner>
 
&lt;!-- optional: specify files/directories to scan -->
 
<scan-items>
 
<item></item>
 
<item></item>
 
</scan-items>
 
</scan>
 
</scans>
 
</gzproject>
 
 
== The .globalyzerrc File ==
 
 
Globalyzer Lite supports an optional .globalyzerrc file. This file may be used to specify login, server, and proxy parameters. Below is an example .globalyzerrc file. It contains all parameters that may be set within the rc file:
 
 
<pre>server https://www.globalyzer.com/gzserver
 
 
username user@company.com
 
password aPasswordHere
 
 
proxy-host https://internalhost.company.com
 
proxy-port 81038
 
proxy-user ExampleUser
 
proxy-password ExamplePassword</pre>
 
 
All settings besides 'server' are optional. And project definition files do not need to specify parameters set in the rc file (with one exception). Any parameter that is set in the project definition file will override the rc file setting.
 
 
If you choose to use a .globalyzerrc, the 'server' parameter is mandatory. It must match the server specified in project definition files. This helps prevent rule sets from being retrieved from the wrong server.
 
 
== Setting Proxy Settings via Java ==
 
 
If you prefer to specify proxy settings via Java, rather than through the project definition file, you may use any of the following Java settings.
 
 
-Dhttp.proxyHost=your.server.com
 
-Dhttp.proxyPort=80
 
-Dhttps.proxyHost=your.server.com
 
-Dhttps.proxyPort=80
 
-Dhttp.nonProxyHosts=123.210.123.210
 
-DsocksProxyHost=your.server.com
 
-DsocksProxyPort=1080
 
 
More info at: https://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html
 
 
== Exit Error Codes ==
 
{| style="text-align: left;"
 
|- style="font-size: 125%;"
 
! colspan="2" | Type
 
|-
 
! Name !! style="padding-left: 15px;" | Exit Code
 
|-
 
| ||
 
 
|- style="font-size: 125%;"
 
! colspan="2" | Normal
 
|-
 
| EXIT_NORMAL || style="padding-left: 15px;" | 0
 
|-
 
| ||
 
 
|- style="font-size: 125%;"
 
! colspan="2" |XML Issues
 
|-
 
|NO_PATH_TO_XML_FILE || style="padding-left: 15px;" | 10
 
|-
 
| DUPLICATE_PARAMETER_IN_XML || style="padding-left: 15px;" | 11
 
|-
 
| XML_PARAMETER_BLANK || style="padding-left: 15px;" | 12
 
|-
 
| XML_INVALID_PARAMETER || style="padding-left: 15px;" | 13
 
|-
 
| UNABLE_TO_READ_SCHEMA || style="padding-left: 15px;" | 14
 
|-
 
| ||
 
 
|- style="font-size: 125%;"
 
! colspan="2" | Globalyzer API compatibility
 
|-
 
| GLOBALYZER_API_REPORT_TYPE_NOT_MATCHED || style="padding-left: 15px;" | 30
 
|-
 
| GLOBALYZER_API_EXCEPTION || style="padding-left: 15px;" | 31
 
|- style="height:20px"
 
|-
 
| ||
 
 
|- style="font-size: 125%;"
 
! colspan="2" | Input issues
 
|-
 
| IMPROPER_INPUT || style="padding-left: 15px;" | 51
 
|-
 
| INVALID_COMMANDS || style="padding-left: 15px;" | 52
 
|-
 
| PROJECT_PATH_DOES_NOT_EXIST || style="padding-left: 15px;" | 53
 
|-
 
| ||
 
 
|- style="font-size: 125%;"
 
! colspan="2" | Output Issues
 
|-
 
| SCAN_FAILED || style="padding-left: 15px;" | 60
 
|}
 
 
== Language Support ==
 
Globalyzer Lite supports the same languages as the full Globalyzer product. It allows users to scan a number of source code in different programming languages:
 
* ActionScript,
 
* C#,
 
* C/C++ (many variations),
 
* Delphi,
 
* HTML (in various web files),
 
* Java,
 
* JavaScript, (includes AngularJS, NodeJS, and other libraries)
 
* Objective-C,
 
* MXML,
 
* Perl,
 
* PHP,
 
* Qt,
 
* SQL (Oracle, MS SQL, MySQL, PostgreSQL),
 
* Visual Basic (Classic, .NET),
 
* VBScript, and
 
* XML
 
 
== Lite vs the Globalyzer API ==
 
 
Globalyzer Lite utilizes the Globalyzer API. Using the API directly is more powerful, but also requires writing a custom java application.
 
 
== Lite vs the Globalyzer Workbench ==
 
 
In comparison to the Globalyzer Workbench, Globalyzer Lite is smaller, faster to install and does not require a database. Lite supports direct integration with IDEs, while the Workbench is its own standalone program. Additionally, unlike the workbench, multiple instances of Lite may be run concurrently. This allows Continuous Integration systems to use Lite to provision the scanning of multiple projects.
 

Latest revision as of 18:47, 25 August 2022

Globalyzer consists of a Globalyzer Server and Globalyzer Clients.

Globalyzer Server

The Globalyzer Server manages user accounts and rule sets. Lingoport provides a (hosted) Globalyzer Server at www.globalyzer.com. Alternatively, companies can purchase and install their own on premises Globalyzer Server to run on their site. To access a server, you must already have an account; simply browse to the server URL (either our hosted server or your on premises server) and log in with your account credentials.

On Premises Globalyzer Server: LDAP Configuration

An on premises Globalyzer Server can be configured to use your company's LDAP system. When users log in to Globalyzer, they will enter their LDAP username and LDAP password. If they are authenticated (exist in the LDAP system) and are authorized to use Globalyzer (belong to a Globalyzer group as configured in LDAP), then a Globalyzer account is created with information gathered from LDAP. Click here for detailed information.

On Premises Globalyzer Server: SSO Configuration

An on premises Globalyzer Server can be configured to use SAML SSO with your company's chosen Identity Provider. When users log in to the Globalyzer Server, they will click the SSO button which will authenticate the user for the Globalyzer application. On initial login, a Globalyzer account will be created. Click here for detailed information.

Globalyzer Client

The Globalyzer Client manages projects and scans, accessing the rule sets on the Globalyzer Server to execute the scans, resulting in internationalization issues. The Globalyzer Client comes in several flavors and is downloaded by each individual user. To download a Client, login to the Server, scroll to the bottom of your home page, and click on the download the Globalyzer Client here link. This displays the Client Download page with several Globalyzer Client options, detailed below.

Globalyzer Client: The Workbench

The Globalyzer Workbench is a standalone development environment designed for i18n work. This can include refactoring code for the purpose of fixing i18n issues, externalizing embedded strings, and refining rule sets for detecting i18n issues. It is well suited for i18n experts. The Globalyzer Workbench is a full Eclipse-based i18n IDE which may not be appropriate for non-i18n specialists.

To download, select the appropriate jar file for your OS platform from the Client Download page. Then run the jar to install the Workbench. Note: The Workbench requires the Java JDK (not just JRE) to be installed. See Versions for the appropriate version.

Globalyzer Client: Lite

Globalyzer Lite forgoes the interactivity of Globalyzer Workbench. Instead, it focuses on being lightweight, fast, parallelizable, and friendly towards typical developers. All configuration necessary for running multiple project scans with Globalyzer Lite is contained within Project Definition files, which can be distributed to an entire team. Globalyzer Lite can be run from IDEs with the click of a button and has been tested with Visual Studio, Eclipse, and Intellij IDEA.

To download, select the globalyzer-lite.zip file from the Client Download page, unzip, and follow instructions in the README. Click here for more information on Globalyzer Lite.

Globalyzer Client: Command Line Interface

The Command Line Interface (CLI) allows you to run much of the Globalyzer Workbench from a command line, such as listing project and scan information, scanning, exporting, and importing. In addition, it supports calculating and reporting on the differences in scans. It is useful for running nightly scans.

Note: Not all Globalyzer functionality is available from the command line; you will still need either the Workbench or Lite to create projects and scans. Also, the Workbench is the only client that supports code fixing, such as string externalization.

To download CLI, download and install the Workbench, which installs the globalyzer-cli.jar file. Click here for more information on CLI.

Globalyzer Client: API

The Globalyzer API allows you to create Globalyzer projects and scans, execute scans, and generate reports from a Java program. Globalyzer Lite makes use of the API, and most users prefer using Lite instead of writing their own Java program.

Note: Not all Globalyzer functionality is available from the Globalyzer API; you will still need the Globalyzer Workbench to create customized projects and scans (the API relies on defaults, though the rule sets can be customized), and the Workbench is required for string externalization.

If you want to use the API with an in-memory database, download and install Lite. If you want to use the API with a physical database, download and install the Workbench. Click here for instructions on writing your Java program.