Vanakkam! (Customary Tamil greeting)
The weekly update for the project during the week from *06/16/2011 to
06/23/2011* is as follows.
During the above week, the following tasks were carried out:
- Research on using xgettext invocation in the terminal with the
--keyword option. Upon reading the manual, it was found out that the
--keyword option can specify a context for each string in 3 different ways:
1. String in code should be in the format _t('context','string'); and
xgettext invocation should be in the form --keyword=_t:1c,2 (this basically
explains to xgettext that there are 2 arguments in the keyword function, 1st
one is context, 2nd one is string)
2. String in code in the format _t('string','context'); and xgettext
invocation should be in the form --keyword=_t:1,2c
3. String in the code should be as _t('context|string') and xgettext
invocation should be in the form --keyword=_t:1g
- Out of the above 3, the 3rd option was chosen as the suitable method to
include context within the strings of Vesuvius as it takes a single argument
to the function.
- As the above was decided upon, the idea of having different *.pot files
based on context became unnecessary, as both Launchpad and Pootle are
capable of recognizing contexts from *.pot files and they display the
contexts in the following manner:
Launchpad:
[image: http://img29.imageshack.us/img29/5724/lpcontexts.png]
Pootle (note 'person' context below translatable word):
[image: http://img12.imageshack.us/img12/9331/cntxtpootle.png]
- As a result of the above, it was decided during the meeting held on
06/23/2011 with Greg that there would be no need for multiple *.pot files
based on context, and that we would be going for the creation of a single
*.pot file which would contain contexts.
- According to Glenn's specification, we will be going ahead with
syntactic and granular contexts which will explain a great deal about the
string being translated to the translator. This means that there will be
many contexts as opposed to having few as per the previous strategy that was
being followed.
- This could lead to the inclusion of volunteers from among the other
Sahana GSoC students to help with deciding upon which contexts to use. A
document has been opened up at [1] to record all the contexts that are being
added to the code on the translations branch.
Within the next week, the main goal of the project will be to begin the
adding of contexts and cleaning up _t() functions on as many modules within
Vesuvius as possible while discovering and confirming new contexts for
strings. (I have started on RAP).
Thank You.
Intha Naal Iniya Naalaha Amaya En Vazthukal! (Have a nice day, in Tamil).
[1]
https://spreadsheets.google.com/spreadsheet/ccc?key=0Au_DJLDF3bc6dDJYM3pQR2dxbHVuWks0dEl1OXlOY3c&authkey=CO6k6ssI&hl=en_US#gid=0
On Fri, Jun 17, 2011 at 1:15 AM, Ramindu Deshapriya <rasade88@...:
> Namaste! (Customary Indian greeting)
>
> The Weekly update for the project during the week from *06/09/2011 to
> 06/16/2011* is presented here.
>
> The above week saw the following tasks being carried out:
>
> - Creation of the dump script (using PHP) to get translatable (_t('')
> enclosed) strings off of Vesuvius and into a format where the context (the
> text in square brackets on the strings) gets removed and xgettext can be
> invoked in them for final integration into Pootle or the Launchpad
> translation engine.
> - Debugging the above script, which uses preg_match to find _t based on
> a regex search, then uses preg_match again to search and replace the '[[]]'
> part of the string. A problem that came up with this is that the strings
> will get re-written to another context-based PHP file before xgettext was
> run on them, meaning that translators would not be able to see the correct
> location in the code where the original output string came from.
> - Meeting with Greg and Glenn on 06/16 which shed some light on methods
> to solve the problems that came up with the PHP dump script. Here we decided
> that, rather than going with PHP, we would make use of the --keyword option
> of the xgettext shell command, which would allow us to search for PHP
> strings which contain a particular substring. We realized that we could use
> this functionality to create *.pot files based on the context keyword by
> invoking xgettext with option --keyword=[[context]]. It was decided to write
> up these xgettext commands and test them to verify their feasibility.
> - A design document based on the above (new) idea for the dump script
> was created, and can be found at [1].
>
> The tasks for the next week include:
>
> 1. Finalize (after discussing with Greg and Glenn) the contexts that
> will be used in Vesuvius translatable strings.
> 2. Write the xgettext commands that will pull these contexts and create
> context-based *.pot files.
> 3. Test the above commands.
>
> Thank You.
>
> Accha dina! (Good day, in Hindi)
>
> [1]
> https://docs.google.com/document/d/1GvEwOTwXFtlold6nSQd51TnnW2nTlknFs5CmFQRoxdE/edit?hl=en_US&authkey=COak84QG
>
>
> On Fri, Jun 10, 2011 at 6:22 PM, Darlene McCullough <
> darlene@...> wrote:
>
>> Lookin' good Ramindu! Thanks so much.
>>
>>
>> --
Au revoir!
Ramindu Deshapriya.
Assistant Editor - FOSS User Magazine http://fossuser.lk
Member - Joomla! Bug Squad http://joomlacode.org/gf/project/joomla
<http://joomlacode.org/gf/project/joomla>
Twitter: rami_desh
Blog: http://lmakuthan.blogspot.com, http://lmakuthan.tumblr.com
|