Monday, February 18, 2013

Early Feedback - Testing Global ready Apps - using pseudo-localization

I have been talking, preaching and practicing on how to bring testing early on in development cycle to help improve time to market and help build baked in quality.

Early Testing of apps for global readiness is one of my top learning goal for some time. Use of pseudo-localization techniques to test global readiness of app has caught my fancy recently. My colleague Priyanka's( enthusiasm has only added to my desire to learn even stronger.

Recent tool support in open source world for pseudo-localization has only fueled my goal of learning.
Google's Pseudolocalization tool makes testing early much easier. I found it difficult to understand the usage of tool with the available resources.Priyanka and myself put effort to understand the usage of tool.With some effort we were able to learn this tool and we would like to share our understanding of the tool for wider community.

I am going to showcase usage of this tool, using a simple application that we built from using the sample application on Java internationalization trail

Before I go there, below are some links that have some excellent guidelines, definitions, testcases and studies around i18n,l10n and pseudo-localization testing that i found very insightful.

Excellent introduction to Pseudolocalization on wikipedia

Helen Kask's thesis gives in depth understanding of various aspect of internationalization and pseudolocalization, options available and some pros and cons of various approaches - Pseudolocalization Realization for Skype Software

Google open source blog have some simple but excellent example to understand Pseudolocalization to catch i18n errors

Some excellent checklists and testcases below -

Lingotek Internationalization and Pseudo Localization data sheet

Localization and Internationalization testing knowledge paper - excellent test case and approach here Localization and Internationalization testing approach and testcases

Learning to use Google Pseudolocalization tool with Sample app -

1 : Build the sample app

create a java project in eclipse with sample java swing program

along with the resource files supplied
screenshot of the project in eclipse

2 : Play around with application

Run the application by right clicking the and selecting "Run As" -> "Java Application"

Use various "locales" using "Locale" drop down menu and see how selecting different locales and regional language setting changes the UI text and direction (for e.g. selecting ar-AR will make the direction of text and order and location of Menu items from Right to Left) , and locale sensitive information such as Currency etc.

3: Create Pseudo-localized resource file

 Lets create a pseudo localized file for the default locale using Google "Pseudolocalization tool"

Step1 Download

Download the following three in a folder of your choice from

pseudolocalizer (command line script for using the tool)

I have downloaded under $Home/pseudolocalizationtool

Step2 Configure

edit the "pseudolocalizer" shell script and change the DIR variable to point to the folder contatining the above three files. Save

Below is the screenshot for edited pseudolocalizer file as per my setting -

Step3 Run the tool

 Open a terminal window.  cd to your pseudolocalization tool folder.

> sh pseudolocalizer  <path to your default file in your eclipse project>

like this:

note: you can find the full path to your by right clicking "" in the eclipse project explorer and selecting "properties" and copying location from the resulting window.

Once you refresh the project in eclipse , you will find a new file created by tool "".

The default variant is "psaccent". You will notice that "" has

1. All the US-ASCII characters in original "" are accented
2. There will be brackets around every messages coming from your "" file
3. All the messages have been made longer by adding more characters and spaces

Step5 :Run the application with pseudolocalized resource

In Eclipse, Rename the "" file to "" and  "" to "".

Run application from eclipse

You will see the application UI populated with pseudo-localized text.

Step5 :Run the application with fakebidi (using Right to left pseudolocalization)

Run the pseudolocalization tool with --variant flag set to "psbidi" to create a fakebidi resource file

Refresh eclipse project

Rename "" to ""

Rename "" to ""

Rerun the app and you will see the UI populated with "fakebidi"

Below is the screenshot of the same app -

Hope you find this blog useful from the perspective of getting started with "pseudolocalization" tool.

No comments: