Globalyzer i18n Express

From Lingoport Wiki
Revision as of 17:32, 4 May 2020 by MaryH (talk | contribs)
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 following 15 rule sets.

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 Rule Sets and Source Files Scanned

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.


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".