Web Application for Effective Management of Localization Resources
Total Page:16
File Type:pdf, Size:1020Kb
Masaryk University Faculty of Informatics Web application for effective management of localization resources Bachelor’s Thesis Martin Galajda Brno, Spring 2017 Declaration Hereby I declare that this paper is my original authorial work, which I have worked out on my own. All sources, references, and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Martin Galajda Advisor: Mgr. Michálek Juraj i Acknowledgement I would like to express my special thanks to my supervisor Mgr. Juraj Michálek who gave me the opportunity to do the research on the topic of managing localization resources and also for the valuable guidance he provided during the research. ii Abstract This thesis targets the area of software localization. Software localiza- tion is an important part of the software development. In particular, the thesis aims to solve a problem with managing localization resources. The goal of a thesis is to develop web application for effective manage- ment of localization resources. It starts by providing motivation for solving the problem and then it presents and analyses available solu- tions. Next, the thesis contains description of the developed solution along with verification, validation and deployment of the solution. iii Keywords software localization, Angular 2.0, Play Framework, RxJS, TypeScript, Firebase iv Contents 1 Introduction 1 2 Managing localization resources 3 2.1 Motivation ..........................3 2.2 Available solutions ......................3 2.2.1 Pootle . .3 2.2.2 GlobalSight . .4 2.2.3 Missing parts in open source solutions . .4 2.2.4 Transifex . .5 2.2.5 Crowdin . .6 2.2.6 POEditor . .6 2.2.7 Overview of commercial solutions . .7 2.3 Conclusion ..........................8 3 Requirements engineering, systems design 9 3.1 Requirements engineering ..................9 3.2 Systems design ........................ 10 3.2.1 Microservices . 11 3.2.2 The front-end application . 11 3.2.3 The back-end application . 12 3.3 Choosing front-end technologies ............... 13 3.3.1 Choosing between React and Angular 2.0 . 13 3.3.2 TypeScript for the front-end development . 15 3.3.3 Summarizing front-end technology choices . 15 3.4 Choosing back-end technologies ................ 16 3.4.1 Choosing server-side language . 16 3.4.2 Play Framework . 17 3.4.3 Choosing persistence solution . 17 3.4.4 Using Firebase as persistence mechanism . 18 4 Implementation 22 4.1 Implementing front-end application ............. 22 4.1.1 Directory structure . 22 4.1.2 Components . 22 4.1.3 Services . 23 4.1.4 Model . 24 v 4.2 Implementing the back-end application ............ 24 4.2.1 Actions and Controllers . 26 4.2.2 Services . 26 4.3 Reactive programming .................... 27 4.3.1 Simplified view . 28 4.3.2 The observer design pattern . 28 4.3.3 RxJS library . 28 4.4 Integration with the Atlassian Stack ............. 29 4.4.1 Architecture of the integration . 29 4.4.2 Updating the status of translation . 29 4.5 Price estimation ........................ 30 4.6 Implementing authentication via OAuth 2.0 protocol .... 30 4.6.1 OAuth 2.0 protocol overview . 30 4.6.2 Implementation of OAuth 2.0 in the project . 32 5 Verification and validation 35 5.1 The difference between verification and validation ...... 35 5.2 Test design .......................... 35 5.2.1 Tools used for verification . 36 5.2.2 Behavior-Driven development . 36 6 Deployment 37 6.1 Deploying to the cloud .................... 37 6.2 Deployment steps ....................... 37 6.2.1 Setup of Firebase . 38 6.2.2 Configuring Google OAuth 2.0 . 38 6.2.3 Filling in configuration files . 39 6.2.4 Authorize third party software . 39 6.2.5 Application secret . 39 6.3 Desktop application for configuration ............ 40 7 Conclusion 42 Bibliography 44 Index 46 A Pricing for commercial solutions 46 A.1 Transifex ............................ 46 vi A.2 Crowdin ............................ 46 A.3 POEditor ........................... 47 B Firebase model example 48 C List of electronic attachments 49 vii List of Figures 4.1 The model of the application 25 4.2 The visualization of the state of the translation process 31 4.3 The flow of OAuth 2.0 34 6.1 The GUI for configuring application in Electron 41 viii 1 Introduction Localization is an important part of software development. Proper translation of applications helps a user to better utilize applications. Process of translation can be time consuming and costly, therefore it is necessary to leverage tooling to make this process as easy as possible. The part of thesis is to implement a web application which allows developers to define and maintain projects with resources. The web application should support these three areas: • Management of projects with resources • Price estimation for translation of new resources • Integration with the Atlassian Stack First, motivation and available solutions for the problem will be presented. The available solutions will involve both open-source and commercial solutions. They will be compared based on various factors such as pricing, features, documentation and deployment process. The next chapter will describe the process of discovering system requirements and systems design. The architecture of a system will be presented along with technology choices for implementation. The world of web development is very dynamic and it is important to keep up with latest technologies as they provide high productivity, robustness and optimized performance. Various cutting-edge tech- nologies will be examined such as Firebase, Angular 2.0, React and Play Framework. Next, the thesis will continue with describing the implementa- tion. The structure of both the back-end and the front-end application will be briefly presented. Reactive programming paradigm will be described as it influenced the implementation. Consequently, the inte- gration with the Atlassian Stack and support for the price estimation will be introduced. The chapter will end with a description of authen- tication via OAuth 2.0 protocol. The fourth chapter will be about validation and verification of the solution. The difference between them will be presented along with a description on how they were achieved. The chapter will briefly describe behaviour-driven development. 1 1. Introduction The fifth chapter will provide a description of the deployment process. It will begin with description on how the application was deployed to the cloud environment. Then, it will present a problem with a deployment which occurred during the first delivery of the solution. The solution for the problem will be consequently presented. 2 2 Managing localization resources This chapter will provide motivation for managing localization re- sources. Then, it will continue by presenting open-source and com- mercial solutions. The solutions will be analysed and compared. The conclusion will be drawn from the facts that were discovered. 2.1 Motivation The motivation for managing localization resources comes from the fact that software developers and translators use different file formats during a localization process. Software developers are used to work with file formats like po, xml, json, which are subsequently usedby software to handle translations. On the other hand, translators are used to working with xliff, xml-based file format created with agoal to have a single interchange file format that can be understood by any localization provider [1]. There are a lot of editors supporting xliff format and that makes it very popular among translators as they do not need to worry about more technical things. 2.2 Available solutions There are already translation management tools available. Among the most popular open source solutions belong Pootle and GlobalSight. From commercial solutions, the most popular seem to be Crowdin, Transifex and POEditor. The thesis examines each of these solutions and compares their advantages and disadvantages. 2.2.1 Pootle Pootle [2] is one of the aforementioned open source tools which offers a lot of functionality. It supports multiple file formats, adapting be- haviour through event hooks and also version control integration. It even provides a way to define a custom file format. Pootle requires quite enough time and sysadmin skills to install and configure the application. In addition, the fact that Pootle offers alot 3 2. Managing localization resources of features might not be always a good thing because it can be redun- dant for many software development teams. The deployment process involves installing virtual environment, some relational database man- agement system (RDBMS), and also Redis server. The documentation contains example which demonstrates deployment of the application using SQLite as RDBMS, but there is also a remark which encourages usage of MySQL or PostgreSQL database for a production deployment. Moreover, it is advised to install optional optimization packages and make use of a front-end web server, which makes the deployment even more demanding. After successful deployment, it is expected that developers spend some time learning how to use rather complex application and include it in their workflow. For these reasons, the solution is not ideal for every company. 2.2.2 GlobalSight GlobalSight [3] is another open source solution. It is a system which builds on cooperation between developers, project managers, admin- istrators and translators. GlobalSight has a forum dedicated for each type of a user, wiki, and videos demonstrating basic usage of the application. The advantage of GlobalSight is that it provides Web services application programming interface (API), which allows users to integrate external systems to GlobalSight. The drawback of this solution is that setting up system is difficult and time consuming. Moreover, the fact that it requires developers, project managers, administrators, and translators to study wiki and learn how to use the application might pose a problem. 2.2.3 Missing parts in open source solutions Neither Pootle nor GlobalSight support authentication via OAuth pro- tocol, a mechanism allowing users to share information about their already existing accounts with third party applications.