[Sugar-devel] [PATCH v3 Word] Updated translated word when language to translate is changed. (Ticket #2210)
Ishan Bansal
ishan at seeta.in
Wed Oct 13 07:41:20 EDT 2010
Hi
I have attached the screenshots to illustrate the bug and the patch for the
same.
For the bug check
[1] http://seeta.in/dextrose/sl2010/initialword1.png
[2] http://seeta.in/dextrose/sl2010/initialword2.png
To check for the patch
[1] http://seeta.in/dextrose/sl2010/finalword1.png
[2] http://seeta.in/dextrose/sl2010/finalword2.png
Regards
ishan
On Tue, Oct 12, 2010 at 12:32 PM, Ishan Bansal <ishan at seeta.in> wrote:
> New global variable 'newtotranslate' added to update the translated text
> when
> the language to translate is being changed.
>
> Signed-off-by: Ishan Bansal <ishan at seeta.in>, Anubhav Aggarwal <
> anubhav at seeta.in>
> ---
> pippy_app.py | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> v1->v2 : Global variable removed and subject updated.
> v2->v3 : Co-author fields added in accordance with the guidelines for patch
> submission
>
> diff --git a/pippy_app.py b/pippy_app.py
> index b9a5a25..f9b0be7 100644
> --- a/pippy_app.py
> +++ b/pippy_app.py
> @@ -49,6 +49,7 @@ class WordsActivity(ViewSourceActivity):
> self.fromlang = "English"
> self.tolang = "Spanish"
> self.languagemodel = LanguageModel.LanguageModel()
> + self.newtotranslate = 'none'
>
> # Main layout.
> hbox = gtk.HBox(homogeneous=True)
> @@ -151,6 +152,8 @@ class WordsActivity(ViewSourceActivity):
>
> def lang2combo_cb(self, combo):
> self.languagemodel.SetLanguages("English",
> self.langs[combo.get_active()])
> + self.translated.set_text("")
> + self.totranslate_cb(self.newtotranslate)
>
> def lang1sel_cb(self, column):
> # FIXME: Complete the text entry box
> @@ -177,6 +180,7 @@ class WordsActivity(ViewSourceActivity):
>
> def totranslate_cb(self, totranslate):
> entry = totranslate.get_text()
> + self.newtotranslate = totranslate
> # Ask for completion suggestions
> if not entry:
> return
> --
> 1.7.0.4
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101013/b032a58e/attachment.html>
More information about the Sugar-devel
mailing list