|Version 16 (modified by 11 years ago) ( diff ),|
Blueprint for an Upgrade to the Translation Functionality
This is beign actions in GSoC2012
The current translation functionality in Sahana-Eden does the following ( Most of these are in s3translate.py file) :-
- Provide a menu to select a list of modules from which strings are to be translated ( doesn’t default modules corresponding to active template)
- Extract strings from the selected modules using parse tree approach. Also extracts strings of deployment.settings variables (but not database variables)
- Strings can be exported in xls and po formats
- Merges uploaded translations ( in csv) with the existing .py language file ( doesn’t overwrite)
- Pootle translations are not synced currently.
- Doesn’t account for conflicts due to pulls and pomerge.
- External dependencies due to calls to methods in Translate Toolkit
Round-trip translation UI
The journey from an untranslated string to a translated one can involve several different tools and can take different paths. The idea here is to integrate these tools (so this is not really about replacing them) into a single portal. One such route is as follows:
- Extract the strings from Eden
- build a spreadsheet that can be given to the translators
- convert the spreadsheet back to a *.py language file
- add back into Eden trunk
Then the code changes and a string needs to be modified. At this point the person managing the translation doesn't specifically know that a string is no longer required and so redundant strings hang around in the translated files (and some that may not yet have been translated which have since been superseded are still awaiting translation)
A second, and different, approach to translating the string is to use the Pootle tool, the integration of this would be nice but the key area is to be able to identify the strings for translation.
Once the strings for translation have been identified then the UI needs to provide a seamless mechanism to integrate them back into Sahana-Eden.
This is purely indicative and may change
- Able to retrieve strings from currently active modules.
- Excluding Deprecated Strings.
- Conflict in strings due to pull requests.
- Including Prepop Csv files
- Pootle Integration
- Avoiding system calls in Translate Toolkit.
Community bonding period
- Learning Goals : I will utilize this time to familiarize myself with the eden code structure, particularly the existing translation module. This will include:
- Understanding the parser library of python and how the current code uses the parse tree.
- Exploring the Pootle software and its features.
- Relevant modules of Translate Toolkit.
- Outstanding blueprint Questions : The scope of the project will be discussed, modified and understood by me during this period. Also, the design and implementation details will be discussed with the mentors to prepare for the Coding phase.
- Initial Tasks :
- Use the parser library to try and extract data from the code. Once I am comfortable with the parser, I can use it to extract the currently active template and modules from the corresponding files as mentioned earlier.
- Discuss and work on implementing the script that handles merge conflicts when merging translations from pull requests and pootle.
Mid Term Evaluation I plan to provide the following features by mid-term:
- Excluding deprecated strings
- Retrieving strings from active templates
- Including prepop csv files
- Provide option to select all templates in GUI.
Final Evaluation The final project will contain the following deliverables (apart from those mentioned above)
- Handling conflicts from pull requests
- Handling conflicts from Pootle
- Syncing Pootle with Web2py with respect to translation
- Removing external dependency on Translate Toolkit
- For the translation process see the chapter in the book on Localisation
- For the translation code see
- For translating to and from a spreadsheet see the Translate Toolkit, also mentioned in the Eden book. (versions are packaged for .deb and .rpm just search for translate-toolkit within your package manager)
- The survey application uses it's own translation so that the survey forms can be translated independent of the application. Check the code for this