Difference between revisions of "Globalyzer Lite"

From Lingoport Wiki
Jump to: navigation, search
(Project Definition Format)
Line 1: Line 1:
  +
Globalyzer Lite scans source code for internationalization issues. It is well suited for use within automation routines and continuous build systems. Additionally, it is designed to be used as an external tool from within IDEs such as Visual Studio, Eclipse and Intellij's IDEA.
Globalyzer Lite is a lightweight version of the Globalyzer Client. It is smaller and faster to install than the Globalyzer Workbench and CLI and requires no database. It is ideal for creating temporary projects and scans on the fly, executing those scans, and generating corresponding reports.
 
   
  +
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.
Globalyzer Lite calls the Globalyzer API, but uses an in-memory, temporary database, rather than a physical one. This improves performance and allows multiple Globalyzer Lite programs to be running at the same time. In addition, Globalyzer Lite parses and executes Globalyzer projects that are defined in Globalyzer Project Definition XML files, bypassing the need to create projects and scans using the Globalyzer Workbench, or by writing your own Java program that calls the Globalyzer API.
 
   
Globalyzer Lite is useful for scripts and automation routines, as well as continuous integration systems.
+
Globalyzer Lite is a product that requires special licensing. It is delivered in a zip file.
   
  +
== Using Globalyzer Lite from an IDE ==
== Getting Started ==
 
Globalyzer Lite is a product that requires special licensing. It is delivered in a zip file.
 
   
  +
Lite may be used within many IDEs that support external tools, including Visual Studio, Eclipse and Intellij's IDEA. Configuring Lite as an external tool takes some initial setup, but is relatively easy to accomplish. Once configured, Lite may be used through the IDEs external tool menu, with the click of a button. The recommended, documented tools:
Globalyzer Lite uses a Project Definition file which is an XML file with all the information for creating and scanning a project.
 
   
  +
# Scan the currently selected file/directory
== Language Support ==
 
  +
# Scan everything within the parent directory of the currently selected file/directory
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:
 
  +
# Scan the entire project
* 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
 
   
  +
== Using Globalyzer Lite as Part of a Build ==
Globalyzer Lite uses the same rule sets that have been created for Globalyzer so that the reports created in either are identical.
 
   
  +
Globalyzer Lite is easy to integrate into build systems. For instance, using Lite from Jenkins can be done through the following steps:
== Using Globalyzer Lite ==
 
   
  +
# Check in a project definition file into source control (or, if you prefer, place one in the Jenkins build server's filesystem)
Before using Lite i18n teams must have created and refined Globalyzer rule sets to scan for internationalization issues. An i18n knowledgeable developer (or small i18n team) must have also filled in a Project Definition XML file (see below).
 
  +
# 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.
   
  +
You may also pass the reports to your own reporting system.
Once a Project Definition XML file has been built, it can be executed from a build using the following command:
 
  +
  +
== Using Globalyzer Lite from the Command Prompt / Shell ==
  +
  +
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>
 
<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.
 
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
  +
  +
== 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 ==
  +
  +
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==
 
== 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"?>
 
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Line 51: Line 66:
 
<password></password>
 
<password></password>
 
<server></server>
 
<server></server>
<!-- Optional Parameters -->
+
&lt;!-- Optional Parameters --&gt;
 
<proxy-user></proxy-user>
 
<proxy-user></proxy-user>
 
<proxy-password></proxy-password>
 
<proxy-password></proxy-password>
Line 57: Line 72:
 
<proxy-port></proxy-port>
 
<proxy-port></proxy-port>
 
</login>
 
</login>
<project-path></project-path>
+
<project-path></project-path> &lt;!-- May instead be specified from command line --&gt;
 
<project-name></project-name>
 
<project-name></project-name>
<report-path></report-path>
+
<report-path></report-path> &lt;!-- May instead be specified from command line --&gt;
 
<report-type></report-type>
 
<report-type></report-type>
 
<scans>
 
<scans>
Line 81: Line 96:
 
</scans>
 
</scans>
 
</gzproject>
 
</gzproject>
  +
  +
== 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. Additionally, unlike the workbench, multiple instances of Lite may be run concurrently. This allows build systems to use Lite to provision the scanning of multiple projects.

Revision as of 20:17, 2 September 2015

Globalyzer Lite scans source code for internationalization issues. It is well suited for use within automation routines and continuous build systems. Additionally, it is designed to be used as an external tool from within IDEs such as Visual Studio, Eclipse and Intellij's IDEA.

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.

Globalyzer Lite is a product that requires special licensing. It is delivered in a zip file.

Using Globalyzer Lite from an IDE

Lite may be used within many IDEs that support external tools, including Visual Studio, Eclipse and Intellij's IDEA. Configuring Lite as an external tool takes some initial setup, but is relatively easy to accomplish. Once configured, Lite may be used through the IDEs external tool menu, with the click of a button. The recommended, documented tools:

  1. Scan the currently selected file/directory
  2. Scan everything within the parent directory of the currently selected file/directory
  3. Scan the entire project

Using Globalyzer Lite as Part of a Build

Globalyzer Lite is easy to integrate into build systems. For instance, using Lite from Jenkins can be done through the following steps:

  1. Check in a project definition file into source control (or, if you prefer, place one in the Jenkins build server's filesystem)
  2. Run the following from Jenkins' shell:
java -jar globalyzer-lite.jar -f "${WORKSPACE}/GlobalyzerProjectDefinitionFile.xml" --project-path "${WORKSPACE}" --report-path "globalyzer-lite-reports"
  1. Use the Lingoport Dashboard to display the results from the generated reports.

You may also pass the reports to your own reporting system.

Using Globalyzer Lite from the Command Prompt / Shell

Globalyzer Lite can be executed from a command prompt or shell via the following command:

java -jar globalyzer-lite.jar some_location/YourProjectDefinitionFile.xml

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

Ease of Installation

Installing Lite is easy. To install:

  1. Unzip the Globalyzer Lite zip file at a desired location
  2. Run either lite-setup.bat or lite-setup.sh depending on your system.

Configuration

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 help page.

  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <!-- All items should be allowed anywhere in the xml as long as the hierarchy
    is preserved -->
  <gzproject>
    <login>
       <username></username>
       <password></password>
       <server></server>
       <!-- Optional Parameters -->
       <proxy-user></proxy-user>
       <proxy-password></proxy-password>
       <proxy-host></proxy-host>
       <proxy-port></proxy-port>
    </login>
    <project-path></project-path> <!-- May instead be specified from command line -->
    <project-name></project-name>
    <report-path></report-path>   <!-- May instead be specified from command line -->
    <report-type></report-type>
    <scans>
       <scan>
          <!-- create and execute a single scan with this info -->
          <scan-name></scan-name>
          <ruleset-name></ruleset-name>
          <ruleset-owner></ruleset-owner>
       </scan>
       <scan>
       <!-- create and execute a single scan with this info -->
          <scan-name></scan-name>
          <ruleset-name></ruleset-name>
          <ruleset-owner></ruleset-owner>
          <!-- optional: specify files/directories to scan -->
          <scan-items>
             <item></item>
             <item></item>
          </scan-items>
       </scan>
    </scans>
 </gzproject>

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. Additionally, unlike the workbench, multiple instances of Lite may be run concurrently. This allows build systems to use Lite to provision the scanning of multiple projects.