Changes between Version 15 and Version 16 of BluePrint/Translation


Ignore:
Timestamp:
06/01/13 13:32:25 (8 years ago)
Author:
nownikhil
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/Translation

    v15 v16  
    44
    55== Current situation ==
    6 Sahana Eden uses the translation features of web2py. For the application programmer this requires the use of the function T() when displaying strings which will be displayed on the screen and so will need to be translated. The core web2py translation functionality extracts the strings and stores them in a *.py file, unfortunately this file only has space for the original and the translated string. For the translator it is often helpful to have a comment that can explain the context of a particular phrase. For other features to be introduced as part of this work it would also be necessary to know the origin of the string, this would be the file and possibly also the line number. (Note the string may have more than one origin, i.e. it appears in the code in more than one place).
     6The current translation functionality in Sahana-Eden does the following ( Most of these are in s3translate.py file) :-
    77
    8 
    9 Currently the strings for translation are held in a *.py file in the languages directory. To test this you can create a '''new''' language (see 000_config.py deployment_settings.L10n.languages) create an empty file in the languages directory and then visit a few Sahana-Eden pages having selected the '''new''' language. Now go back to the code and see that the file has been populated with some new strings.
    10 
    11 The extracted strings with location could be held in a temporary place different from the languages file. This could be a plain file or possibly a database. Extra data that would be useful to retain here would be:
    12  * the location,
    13    * file name
    14    * line number
    15  * any comment to the translator,
    16  * translation status,
    17  * date of extraction,
    18  *
    19 
    20 
     8* Provide a menu to select a list of modules from which strings are to be translated ( doesn’t default modules corresponding to active template)
     9* Extract strings from the selected modules using parse tree approach. Also extracts strings of deployment.settings variables (but not database variables)
     10* Strings can be exported in xls and po formats
     11* Merges uploaded translations ( in csv) with the existing .py language file ( doesn’t overwrite)
     12* Pootle translations are not synced currently.
     13* Doesn’t account for conflicts due to pulls and pomerge.
     14* External dependencies due to calls to methods in Translate Toolkit
    2115== Round-trip translation UI ==
    2216The 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: