Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris...

21
Enhancing open-source Enhancing open-source localization localization By By Farzana Forhad Farzana Forhad May 20, 2010 May 20, 2010 Advisor: Dr. Chris Pollett Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun Committee members: Dr. Robert Chun & Professor Frank Butt & Professor Frank Butt
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    213
  • download

    0

Transcript of Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris...

Page 1: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Enhancing open-source Enhancing open-source localizationlocalization

Enhancing open-source Enhancing open-source localizationlocalization

ByBy Farzana Forhad Farzana Forhad

May 20, 2010May 20, 2010

Advisor: Dr. Chris PollettAdvisor: Dr. Chris PollettCommittee members: Dr. Robert Chun & Committee members: Dr. Robert Chun &

Professor Frank ButtProfessor Frank Butt

Page 2: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Agenda•Introduction •Comparing with existing tools•Technology Used•Preliminary Work•Design•User Interface•The Backend•Testing•Conclusion•Reference

Page 3: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Introduction• Many non-English speakers are more comfortable browsing the web in

their mother tongue rather than English. Most of the time, they like to see web pages in their own language, such as Chinese, Japanese, Spanish, and so on.

• “gettext” is An important part of localization and internationalization. It is an open source tool for internationalization. Unfortunately, translating strings into different languages using “gettext” tools takes several steps.

• Pootle is a web-based translation tool that uses gettext. After logging in to a Pootle server we can search as a project or as a language. If we enter inside a project we can see the list of all the languages that are supported by that project. We can add or delete any language. We can also upload any file from the local directory. And then we can translate and save it in the local directory of the local machine.

• For my master’s project, I extended Pootle to make it function smoothly with svn repositories.

Page 4: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Comparing with existing tools

• Mozilla Verbatim has a an extension called, FoxLingo that uses language identifiers, and language search features. This supports 71 languages.

• On the other hand, Launchpad which is a similar tool can translate free software projects and also can distribute packages into one’s own language.

• But if we compare these tools with our tool, none of them really integrates entirely with an online repository. My new add-on for pootle will give advantage to the user to save their work to an online repository and download them as a portable object format. After translating the strings they can upload their translated files with the button click.

Page 5: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Technology Used

• As this project goal is to make an extension to Pootle, we had to modify/make use of several tools and technologies.

• GetText• Portable Object• Subversion• Beanstalk• svn php

Page 6: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Preliminary Work• Extensive research was conducted for

this project. Most of this research was performed in the CS297 during the

preparation for writing project. • Simple research on gettext• Creating an example with PHP and gettext• Front-end and Back-end interaction

Page 7: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Design• Pootle is a web portal which is designed to be a web

translation tool. We can run Pootle like an internet server and run a local copy on an intranet. Pootle has a user friendly interface which ensures better quality and easier translation of projects. Users can log into the Pootle and create their own projects under any language, and they can also add or retrieve any language from any project or any project from any language.

• Pootle server is installed in a local machine. It has feature that is used for translating string into multiple languages. We worked both with back end and front end while making the extension to the Pootle server.

Page 8: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Setting Up the Directory Structure

Page 9: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

The Backend

Page 10: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

User Interface

Page 11: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Svn check out• A user presses the “svn checkout” button: • A consolidated portable object file generates

from the requested files such as, PHP, and HTML.

• The portable object file gets saved in the Pootle server under the project and directory chosen by the user. And user can have a view what checked out from the svn repository.

Page 12: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Svn check out

Page 13: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Svn check in• A user selects the “svn check-in” button:

• The updated and translated files get uploaded to the SVN repository.

• The “svn_add” function is responsible for scheduling the addition of an item in a working directory. It adds the file or the directory to the working directory. The item (directory or the file) will be added to the repository at the next time svn_commit() on this working copy.

Page 14: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Svn check in

Page 15: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Performance Testing• Manual vs. with the extension

Connect to Svn Repository

Do a svn checkout

Find the required file in your machine Run

xgettext to make “.po” file

Connect to Pootle server

Upload the “.po” file to your translation project

Page 16: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Performance Testing• Manual vs. with the extension

Connect to Pootle server

Fill out subversion form and click svn checkout

Figure : Checkout and generating .po file with the extension

Page 17: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Performance testingSVN check-out and check-in time with and without the extension

0

1

2

3

4

5

6

7

8

Manual Check-out

ExtensionCheck-out

Manual Check-in

ExtensionCheck-in

Tim

e, m

inu

te

Page 18: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Robustness• The Pootle server software is written in Python.

• The software mainly provides some important features for localization; such as translation memory, alternative source language, version control, user management, translation interface and all these features were implemented in Python.

• For the user interface other than HTML, KID is used which is a XML based template language.

Page 19: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Robustness

Page 20: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

Conclusion• The goal of the project is to give the user a translation

server with the privilege to share the work globally.

• Our extension extended the functionality of the Pootle server by allowing the user to work with the open source repository by making a bridge between the local serve r and open source repository.

• By the click of a button they can make a connection to the subversion, checkout and check-in all the files to or from their local directory.

Page 21: Enhancing open-source localization By Farzana Forhad Farzana Forhad May 20, 2010 Advisor: Dr. Chris Pollett Committee members: Dr. Robert Chun & Professor.

References• Pootle: http://translate.sourceforge.net/wiki/pootle/index • HTML tutorial: http://www.w3schools.com/html/default.asp• Official page for PHP: http://php.net/index.php• PHP svn manual: http://php.net/manual/en/book.svn.php • xgettext: ttp://www.gnu.org/software/hello/manual/gettext/xgettext-Invocation.html • Exec tutorial: http://php.net/manual/en/function.exec.php• CSS tutorial: http://www.w3schools.com/css/default.asp• Python : http://www.python.org/• Launchpad: https://launchpad.net/ • Mozilla Verbatim: http://localize.mozilla.org/• Subversion: http://subversion.tigris.org/• Selenium: http://seleniumhq.org/• Beanstalk: http://beanstalkapp.com/• Portable object: http://en.wikipedia.org/wiki/Portable_object_%28computing%29• [2000] Practical Guide to Localization (Language International World Directory).

Bert Esselink. Iohn Benjamin's Publishing Co. 2000. • [2000] Localization A Global Manifesto. Hines, Colin. Stylus Pub Llc. March 2000. • [2004] Technical Reports &Notes http://www.w3.org/International/publications • [2007] Internationalization Activity. http://www.w3.org/blog/International?cat=33