wiki:BluePrint/Translation

Version 17 (modified by nownikhil, 11 years ago) ( diff )

--

Blueprint for an Upgrade to the Translation Functionality

This is beign actions in GSoC2012

Current situation

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

Priority

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.

Outputs

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

Technical help

  • For the translation process see the chapter in the book on Localisation
  • For the translation code see web2py/gluon/languages.py
  • 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 eden/applications/modules/s3db/survey.py::S3TranslateModel

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.