B-Translator as a Software Engineering Project

Embed Size (px)

DESCRIPTION

The project B-Translator is presented, trying to illustrate through it some software development/engineering concepts and practices (how they are actually applied in this project).

Citation preview

  • 1. B-Translatoras a Software Engineering Project Dashamir [email protected] Presentation of the project B-Translator Illustration of software engineering concepts and practices

2. What is Software Engineering Soft-Eng = Programing + Project Management Software Engineering tries to make efficientand effective the process of developing newsoftware, by identifying and trying to useprinciples and practices that have proved to besuccessful on the past projects. It is more like an art than like an exactdiscipline. 3. Basic development models and steps Development models Waterfall steps Waterfall requirements Iterative and analysis incremental design Agile development implementation Extreme programing testing Etc. deployment maintenance 4. Requirements:1 - Conception of the software Why it is needed, what it will be used for? The problems that B-Translator tries to solve Getting feedback about the translations from a widecrowd of people and users. votes for the best translation a new alternative translation a new translation suggestion Helping to ensure consistency among the translations. Merging translations from different sources. Are there any existing alternatives Maybe Pootle? 5. The meaning of B-Translator 6. Requirements:2 - Description of desired features Description of what the software should do andhow it should do it.The features of B-Translator Open access Authenticated voting Tracking votes Highly customizable Evaluating the performance Detailed and comprehensive reporting and statistics Integration with the existing workflow of the projecttranslations 7. Analysis:3 - The functionality in more details Think about how the software should work. Steps of the functional analysis: identify the actors (users or otherprograms/components that are interacting with oursoftware/system) identify use cases (all the different cases whenthe actors need to interact with oursoftware/system) describe each use case (the details of how eachinteraction is done) 8. The actors of B-Translator guest (anonymous user) contributor (authenticated user) translator moderator administrator script peer B-Translator installation 9. The use-cases of B-Translator (1) guest (anonymous user) get translation suggestions for a string search strings and translations export translations comment on translations contributor (authenticated user) all the use-cases of guest customize his own preferences and settings vote (or like) translations suggest new translations flag inappropriate comments or translations check his own contribution details in a dashboard 10. The use-cases of B-Translator (2) translator all the use-cases of contributor import translation files export translations and suggestions moderator all the use-cases of contributor access statistics and other details resolve flagged comments and translations administrator manage overall software configuration manage user access rights and permissions 11. The use-cases of B-Translator (3) script update translation data with the latest versions notify users about relevant issues apply suggested translations upstream, whereverpossible and suitable peer B-Translator installation request sync data (in case there are several B-Translation installations, they should be able tosynchronize the data with each-other, if needed) 12. Analysis:3 - The functionality in more details Describing user interfaces (UI) helps to definethe functionality. User Interfaces of B-Translator: search existing strings and translations vote existing translations or suggest new ones export/import PO files Admin interfaces (general config, reports andstats, etc.) User profile (preferencies, settings, etc.) 13. Design:4 Designing the software Design is a description in logical (abstract) terms of the parts andcomponents that will make up the software, how they arecomposed, how they interact with each-other, etc. The design usually describes: database entities and relationships interfaces of the application (in more details) APIs (Application Programing Interfaces) classes, objects and their relationships the most important processes and algorithms, etc. UML diagrams can be useful again for describing concisely andclearly the entities, their relationships and interactions. A good design should try to capture only the most important things,leaving out the obvious or unimportant things. 14. The DB schema of B-Translator The DB tables of B-Translator: Files: Translation (PO) files that can be imported and exported from the DB. Templates: POT files that are imported. Projects: A project is the software/application which is translated by the PO files. Locations: Locations (lines) where a l10n string is found. Strings: Translatable strings that are extracted from projects. Translations: Translations/suggestions of the l10n strings. For each string therecan be translations for different languages, and more than one translation for eachlanguage. Votes: Votes for each translation/suggestion. Users: Users that contribute translations/suggestions/votes. Snapshots: Snapshots are tgz archives of project-lng translation files. Diffs: Diffs between the current state and the last snapshot. 15. DB Diagram: Tables and their relations. 16. Structure of the DB (1) 17. Structure of the DB (2) 18. Structure of the DB (3) 19. Implementation:5 Development tools and infrastructure Implementation is the process of actually building thesoftware. Before the implementation starts, severaldecisions have to be done, like: what platform to use what programing language or framework should be used what database should be used what tools to use for development how to coordinate the work of several developers programing standards to be used etc. 20. Development infrastructure of B-Translator web application running on LAMP(Linux+Apache+MySQL+PHP) Drupal7 as a development framework Emacs for coding Git on github.com for configurationmanagement:https://github.com/dashohoxha/B-Translator There is a group/forum/mailing-list B-Translatoron Google, for notifications, discussions, etc. chatroom #btranslator on irc.freenode.net 21. 6 - Managing the project Software engineering is not just about programing ordevelopment, but also about project management. Projectmanagement includes: making a plan about how we are going to build the software defining the things or tasks that need to be done breaking down the tasks into smaller ones assigning importance or priorities to the tasks finding inter-dependencies between the tasks defining milestones and grouping tasks to them assigning tasks to people, etc The tool that I use for keeping the project organized is themode-org of Emacs (http://orgmode.org) 22. B-Translator has followed an iterative andincremental life cycle The design of the database became more clear only after starting toimplement it. Actually I had to change the structure of the database several times,until it was suitable. Initially I depended on importing the data collected by open-tran.eu.However, I decided later to implement my own scripts for gettingtranslation files and importing them on the DB. Integration with the existing workflow of the project translations wassomething that occurred to me later, after I had startedimplementation. Integration required the ability to import and export PO files, and thismade me add some extra tables for keeping the relevant information. Initially I did not think about the possibility of exporting diff (and ediff)files. After deciding to implement such a feature, I had to add a fewmore tables in the design of the database. The possibility for appending comments to each translation wassuggested to me by one of the translators. 23. How to install B-Translator Install the Drupal7 profile btranslator: cd /var/www/ sudo git clone https://github.com/dashohoxha/B-Translator.git sudo B-Translator/install/all.sh Apache configuration:### directory where application is installedOptions Indexes FollowSymLinks MultiViews# AllowOverride NoneAllowOverride All ### this is needed for clean URLsOrder allow,denyallow from all 24. Documentation:How B-Translator worksThe process/workflow for a project without translation: 1. Checkout POT files from the repository of the project. 2. Import them into the DB. 3. Over some time, collect translation suggestions from the users. These translations can also be reviewed and evaluated by other users. 4. Export the PO files from the DB. 5. Review, fix and reformat them as needed. 6. Upload/commit the PO files into the repository of the project. 7. When a new POT file is released, start over again from the beginning (but this time we also import the PO file, besides the POT file). 25. Documentation:How B-Translator worksThe process/workflow for the case when the feedback provided by thesystem is integrated in the mainstream translation: 1. Checkout the latest version of the POT and PO files from the repository ofthe project. 2. Import POT files and PO files into the DB. 3. Over some time, collect votes and new translation suggestions from theusers. 4. Time after time (for example each month), the mainstream translatorchecks out the last diffs, containing the latest suggestions (and makes asnapshot as well). 5. The translator reviews the latest suggestions and applies them in themainstream translation, if he finds them appropriate. 6. Periodically (for example once or twice a year) go back to steps (1) and(2) and import the POT and PO files again. This re-import may introducenew strings and translations, but will not affect the existing strings,translations and votes. 26. Some software developmentgeneral principles and advices First make it work, then make it better. Build a working prototype, then improve it by incremental changes. Dont break the code, keep it always running. Dont push anything without testing it thoroughly. If possible apply automated testing. Apply zero tolerance to bugs and errors. Solve first the most risky problems. Be transparent with users and stakeholders. Involve users since the early stages. Release early, release often. Try to build a community. Write code for other people. Write clean and readable code. Comment properly. Dont neglect documentation. 27. Where is used B-Translator There is a working demo/testing site at:https://l10n.org.al/translations/ The main goal of the site is to help the process oftranslating programs into Albanian. It also serves as a testbed for B-Translator. If you would like to help, register there and give yourfeedback for translations and for B-Translator. If you would like to help for developing B-Translator,contact me at: [email protected]