Re: [Ilugc] marking strings for translation in emacs

2011-05-11 Thread Vijay Kumar B .
Kenneth Gonsalves lawgon@... writes: hi, in python to mark strings for translation one does this: string: somestring marked string: _(somestring) and in django templates: string: somestring marked string: {% trans somestring %} can anyone suggest a very quick and easy way of

Re: [Ilugc] marking strings for translation in emacs

2011-05-11 Thread Kenneth Gonsalves
On Wed, 2011-05-11 at 06:21 +, Vijay Kumar B. wrote: Add the following code (simple and not so accurate code) to your ~/.emacs file, and restart emacs. Open up a Python module, move the cursor to a string and press C-c t. -- (defun py-mark-trans () (interactive)

Re: [Ilugc] marking strings for translation in emacs

2011-05-11 Thread Kenneth Gonsalves
On Wed, 2011-05-11 at 07:23 +, Vijay Kumar B. wrote: Kenneth Gonsalves lawgon@... writes: thanks - works well, but one more thing - sometimes the strings are marked with '' and not - how to handle this case? The following code handles both the quoting styles. -- (defun

Re: [Ilugc] marking strings for translation in emacs

2011-05-11 Thread Kumar Appaiah
Hi. On Wed, May 11, 2011 at 07:00:30AM +0530, Kenneth Gonsalves wrote: in python to mark strings for translation one does this: string: somestring marked string: _(somestring) and in django templates: string: somestring marked string: {% trans somestring %} can anyone suggest a very

Re: [Ilugc] marking strings for translation in emacs

2011-05-11 Thread Kenneth Gonsalves
On Wed, 2011-05-11 at 07:27 -0500, Kumar Appaiah wrote: Then you can basically just keep doing C-x e, or do C-u 100 C-x e to run the macro, say 100 times. the only problem with this is that it will mark *every* string for translation. Actually a human is needed to decide which strings to mark.

[Ilugc] marking strings for translation in emacs

2011-05-10 Thread Kenneth Gonsalves
hi, in python to mark strings for translation one does this: string: somestring marked string: _(somestring) and in django templates: string: somestring marked string: {% trans somestring %} can anyone suggest a very quick and easy way of doing this? -- regards KG

Re: [Ilugc] marking strings for translation in emacs

2011-05-10 Thread Balachandran Sivakumar
Hi, On Wed, May 11, 2011 at 7:00 AM, Kenneth Gonsalves law...@thenilgiris.com wrote: hi, can anyone suggest a very quick and easy way of doing this? I haven't worked much on translation as such. But if you choose type it as somestring and then use substitute option for substituting

Re: [Ilugc] marking strings for translation in emacs

2011-05-10 Thread Kenneth Gonsalves
On Wed, 2011-05-11 at 10:52 +0530, Balachandran Sivakumar wrote: I haven't worked much on translation as such. But if you choose type it as somestring and then use substitute option for substituting somestring with {% trans somestring %}, then you can do either 1) M-x replace-string