Globalyzer Express

From Lingoport Wiki
Jump to: navigation, search

Overview

Globalyzer i18n Express scans the added and modified files checked in on a GitHub commit, looking for i18n issues.

The committed files are scanned with the 15 rule sets listed below.

If there are files checked in with the extensions below, they will be scanned and a summary will be added as a comment to the commit in GitHub. If no files are scanned, for example, you checked in a .txt file, a summary will not be added as a comment to the commit in GitHub.

Globalyzer i18n Express is one way to use Globalyzer, but not the only one. Licensed users of Globalyzer get additional benefits beyond i18n Express including:

  • Rule set customization to more precisely identify issues and filter out false positives
  • Scan on demand from IDE (Integrated Development Environment). Allows scanning of features as they are being developed.
  • Code scans using the Globalyzer Workbench, a powerful internationalization tool.
  • Dashboard – Provides high level visibility of i18n status

To find out more, please email info@lingoport.com

Globalyzer Rule Sets and Source Files Scanned

A Rule Set is of a set of parameters that Globalyzer uses to detect internationalization issues and generate results. A Rule Set is divided into scanning categories: Embedded Strings, Locale-Sensitive Methods, General Patterns, and Static File References. Within each category, there are detection rules and filtering rules. For more detail about Rule Sets see: What are Rule Sets?

Rule Set Language Source File Extensions Scanned
actionscript as, mxml
c++ c, cc, cpp, cxx, h, hpp, hxx, qml
csharp asax, ascx, ashx, aspx, cs, cshtml
delphi dfm, dpk, dpr, pas
html asa, asax, ascx, ashx, asmx, asp, aspx, axd, cshtml, ejs, htm, html, inc, jsp, jspf, jspx, mas, master, mi, php, shtml, skin, svg, tag, vm, xhtml
java java, jsp, jspf, jspx
javascript as, asax, ascx, asp, aspx, cshtml, ejs, htm, html, js, jsp, jspf, jspx, mas, mi, php, xhtml
mysql sqc, sql, sqx
objectivec h, m, mm
perl max, mi, perl, pl, plx, pm
php inc, php
swift2 swift
vbnet ascx, asp, aspx, bas, cls, ctl, dob, dsr, frm, pag, vb
vbscript asax, ascx, asp, aspx, htm, html, vbs, xhtml
xml jspx, mxml, storyboard, tld, vcxproj, wsdd, wsdl, xaml, xhtml, xib, xlf, xml, xsd, xsl, xslt, xul

Globalyzer Scanning Categories

Globalyzer i18n Express scans your committed code, looking for Embedded Strings, Concatenations, Locale-Sensitive Methods, General Patterns, and Static File References.

Each issue found has an assigned priority. The priority ranges between 1 and 5, 1 being the highest - i.e. the most likely to be an internationalization issue. In addition, issues can be marked as 'Concatenated', or priority 0.

Globalyzer i18n Express only reports the top issues found: those with priority 1 or with priority C (concatenated). Please contact info@lingoport.com if interested in our full scanning capabilities.

Embedded Strings

  • Issues: When you change locale, the string stays the same. The string was hard-coded in the application and is resistant to locale changes.For example if there was simple code that looks like:
 String d ="All the young ones";
 String e ="Having a good time";
  • Remedy: Externalize the Embedded String from the source code. Generate a Key/Value pair in a resource file, refer to that key in the code to retrieve the value. The value is the string itself. With your locale framework, you can then retrieve the string from a locale dependent resource file.

When the string is externalized, the code looks like:

 String d =getString("JAVA_TESTSTR_105");
 String e =getString("JAVA_TESTSTR_106");

And the key/value pair in the resource file looks like:

JAVA_TESTSTR_105=All the young ones
JAVA_TESTSTR_106=Having a good time

Concatenations

  • Issues: It's like an Embedded String which cannot be externalized as such. It first needs some redesign. This one comes in all kinds of shapes and sizes. Here is a concatenation example: "Welcome " + username + " to our Rebel Outfitter store"
  • Remedy: The typical remedy is to create a parameterized strings and keep the parameter variables outside of the string itself. For instance, the parameterized string may look like "Welcome %{userName} to our Rebel Outfitter store".

Locale Sensitive Method

Date/Time Format

  • Issues: The application may look right but provides the wrong information. If the date shown is 05/06/07 independently of the locale, it means:
    • May 6, 2007 for an American
    • June 5, 2007 for a Frenchman
    • 2005, June 7 for a Japanese
  • Remedy: The application needs to format the data based on the user's locale and, for instance, show May 6, 2007 as
    • 05/06/07 to an American user
    • 06/05/07 to a French user
    • 07/06/05 to a Japanese user

In addition, the date/time may be displayed using Time Zone. The entity or value itself may need to be a GMT date / time.

Currency Format

  • Issues: The application displays the same amount whatever the locale/region of the user. For instance, a Canadian user sees $5000 and may think that in Canadian dollars when it's in US Dollars.
  • Remedy: The application needs to format the number, display the symbol, and most likely use some exchange rate to display the actual currency amount for the user's language / region.

General Patterns

  • Issues: This may take the form of a encoding like ISO8859-1 when UTF-8 is required, or set a font that cannot be used in Chinese, even decides a format output.
  • Remedy: Make sure to check for each pattern to decide if it is a General Pattern, if more need to be added to your specific application, and how to refactor the code.

Static Files

  • Issues: The application serves the same file, maybe a video or a legal HTML file, independently of the locale. For example, a Chinese video is shown to a Russian application user. For example:
   placemarkAttributes.imageSource = "./img/marker.png";
  • Remedy: The locale framework needs to provide for an internationalization way to refer to the file so that a locale with a static file name will result in serving a Russian video to the Russian user.

Getting Started

Globalyzer i18n Express is intended to be used by software developers and project managers, especially internationalization (i18n) managers. Developers can make improvements to their code as soon as they check it into the repository. Project managers can see what code has been scanned and what issues have been identified.

In order to set up an Organization plan, the GitHub user must be listed as an owner of the repository.

Installing the Github application

  1. Log into GitHub. In the GitHub Marketplace, search for Globalyzer i18n Express.
  2. Select the Set up a Plan button.
There are two different types of plans: Personal and Organizational. The Personal plan allows one person to scan the repositories that they own. The Organizational plan allows GitHub users who are GitHub organization Owners to set up a plan for the organization's repositories.
For example, for a user Jane Smith, janeSmith is the GitHub user in the Acme GitHub organization.
  • If she sets up a Personal plan, she will use janeSmith as the Account. If she attempts to use Acme as the Account, she will get an error. To use Globalyzer i18n Express, she can only use it on her personal repositories (the ones in https://github.com/janeSmith), not repositories she has access to in the Acme repository.
  • In order to set up an Organizational plan, she must be an Owner in the Acme GitHub organization. If she is an Owner, she would use Acme as the Account. Attempting to set up the plan with the janeSmith user will result in an error. If she is a Member, an Owner would have to set up the plan and then invite Jane Smith to use Globalyzer i18n Express. This is covered in a later section.

Install organization.png


3. After verifying the plan (FREE Organization) and the Account (Acme), select the button to Install it for free


CompleteOrder.png

4. Since this is an Organization plan, select the GitHub organization (Acme) under Billing information.
Select Complete order and begin installation.
5. The next screen will ask which repositories to give Globalyzer i18n Express to. All repositories will apply to all repos in the organization, or specific ones can be selected.
6. Finally, the user will be directed to the Globalyzer i18n Express Server.

Gbli18nexpress.png


7. Select the Sign in with GitHub and if you are already logged into GitHub, it will simply go to the Plan screen.


I18nExpressPlan.png

The Globalyzer i18n Express Server is for internationalization management to monitor the plan, its members, and the scanning that is occurring.

Note:

  • The default page is the Plan tab.
    • Organization: The name of the GitHub organization (Acme)
    • Owners: Users designated as Github organization owners, there can be multiple owners.
    • Plan and Description: What plan was created and its paramenters.
    • Seats: How many people can use this plan. Different-sized plans are available to match the working environment.
    • Commits: Some plans limit the amount of GitHub commits that can be done each month.
    • Created: Date the Plan was created.
  • On the left side, note that the GITHUB ORGANIZATION is set to Acme and the user, janeSmith is shown below.

Scanning and Reviewing Code

The Globalyzer i18n Express Plan has been installed and the Globalyzer i18n Express Server accessed. Next, is time to use Globalyzer i18n Express to scan code and get results.

Continue to Using Globalyzer i18n Express.