Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate

#dextrose, 2010-10-06

 « Previous day | Index | Today | Next day »     Channels | Search | Join

All times shown according to UTC.

Time Nick Message
03:36 manusheel is now known as manusheel_afk
09:01 manusheel_afk is now known as manusheel
10:08 ishan <ishan!~ishan@> has joined #dextrose
10:11 ishan alsroot, around?
10:18 alsroot ishan: yup
10:19 ishan alsroot, check http://bugs.sugarlabs.org/ticket/2210
10:20 anuragc <anuragc!~anurag@> has joined #dextrose
10:22 alsroot ishan: whats the probelm w/ this ticket, (btw do not as to ask, just ask)
10:23 ishan alsroot, sorry actually i am confused as to where the language is being selected by user in pippy_act.py
10:25 alsroot ishan: sorry, I didn't see Word activity, dunno how it works
10:25 ishan alsroot, its not presently present in git repo
10:25 you would have to download the package and install it
10:32 alsroot ishan: you can ask Word maintainer, http://wiki.laptop.org/go/Words
10:32 ishan alsroot, thanks no problem
10:49 mukul_afk is now known as mukul
11:17 ishan alsroot, around
11:17 alsroot ishan: yup
11:19 ishan alsroot, can you give me any idea as to how a existing word can be translated as we change the language
11:19 *only a idea
11:19 any feature that can help me do this?
11:20 alsroot ishan: use gettext, look into sugar-toolkit sources for "_(" substring
11:20 ishan alsroot, its already there
11:20 alsroot ishan: text for _() method will be transalted in runtime
11:21 ishan alsroot, sorry didnt get you
11:21 alsroot, this has to nothing to do with get text since the language translation is inbuild in the activity
11:22 is does not do translation with the help of cp section
11:22 alsroot ishan: transaltion related stuff does not relate to sugar itlsef, it is basic things
11:22 ishan: use "from gettext import gettext as _" to import _()
11:23 ishan alsroot, okay
11:23 alsroot ishan: and wrap any text you want to trnaslate (in runtime) to _() eg _('word')
11:24 ishan: so, "word" will be all time in current locale (of course if "word" was translated into current locale)
11:25 ishan alsroot, got it
12:47 ayushg <ayushg!~ayush@> has joined #dextrose
12:55 ishan has quit IRC
12:55 ishan <ishan!~ishan@> has joined #dextrose
12:56 mukul is now known as mukul_afk
12:57 ayushg has quit IRC
13:01 ayushg <ayushg!~ayush@> has joined #dextrose
13:07 ayushg has quit IRC
13:12 ayushg <ayushg!~ayush@> has joined #dextrose
13:25 ayush_ <ayush_!~ayushg@> has joined #dextrose
13:25 ayushg has quit IRC
13:25 ayush_ is now known as ayushg
13:26 ishan alsroot, around?
13:26 alsroot ishan: yup
13:27 ishan alsroot, can you direct me to any command which could clear text present in HBox
13:28 alsroot ishan: what text do you mean? HBox is container which does not contain text
13:28 ishan alsroot, sorry what i meant was clearing the text defined in transbox1 = gtk.HBox()
13:29 *text entered in the box
13:30 ishan has quit IRC
13:30 alsroot ishan: code you mentioned just creates new HBox, HBox might contain any widget (including text based), so you need to clear text in text widget not in HBox
13:37 anuragc has quit IRC
13:48 anuragc <anuragc!~anurag@> has joined #dextrose
14:00 alsroot ishan: code you mentioned just creates new HBox, HBox might contain any widget (including text based), so you need to clear text in text widget not in HBox
14:07 ayushg has quit IRC
15:30 ayushg <ayushg!~ayushg@> has joined #dextrose
16:03 ayushg has quit IRC
16:03 ayushg <ayushg!~ayushg@> has joined #dextrose
16:34 anuragc has quit IRC
16:45 mukul_afk is now known as mukul
16:54 anuragc <anuragc!~anurag@> has joined #dextrose
17:09 anuragc has quit IRC
17:57 ishan <ishan!~ishan@> has joined #dextrose
18:07 ishan alsroot, as you said in the last statement , thats exactly what i am planning to do
18:08 but i am stil confused how i can clear text in textbox
18:09 alsroot ishan: see list of properties for text widget you are using, http://library.gnome.org/devel/gtk/stable/
18:09 ishan: what is your text widget class
18:11 ishan alsroot, it is present in class class WordsActivity(ViewSourceActivity) in pippy_app.py
18:15 alsroot ishan: ok, but what is the exact class of widget you are going to clear text from?
18:16 ishan alsroot, sorry didnt get you
18:18 alsroot ishan: if you are going to clear text widget, you need to know at least variable w/ this widget, so you can track what is gtk class for this
18:19 object, see docs for this class on http://library.gnome.org/devel/gtk/stable/, there should be property w/ text or so
18:19 ishan alsroot, true
18:19 but i am able to find any particular class only for this widget
18:20 check http://pastebin.com/FWvci4JE
18:21 alsroot ishan: you mean you can't find exact variable to clean?
18:21 ishan alsroot, that i know
18:21 alsroot, i am just looking for the code
18:21 thanks for the link , that is really helpful
18:22 alsroot ishan: whats name of this variable?
18:22 ishan self.totranslate = gtk.Entry(max=50)
18:23 alsroot, acc to me ^^
18:24 alsroot ishan: so you know the gtk class for self.totranslate, see its docs on http://library.gnome.org/devel[…]ble/GtkEntry.html
18:24 ishan: there is "text" property
18:27 ishan alsroot, thanks
18:41 alsroot, need a small help
18:42 i am stuck on how to use gtk_entry_set_text ()
18:43 alsroot ishan: it is gtk C function, transfer it to <entry-object>.set_text()
18:43 ishan alsroot, i am using it as self.totranslate = gtk.Entry(set_text = None)
18:43 is there something wrong?
18:44 alsroot ishan: self.totranslate.set_text()
18:44 ishan alsroot, okay
18:45 alsroot, can you direct me to any reference where i can find the commands with a example of how they are used
18:46 alsroot ishan: http://www.pygtk.org/tutorial.html
18:47 ishan alsroot, thanks
18:48 alsroot, any idea what should i pass as text while using self.totranslate.set_text(text)
18:50 alsroot ishan: a text you want to set, but read pugtk tutorial first
18:51 ishan alsroot, okay
18:51 will definately go through them tommorow
18:57 alsroot, is there some problem with using set_text since once i use the above, the text dosent appear but also get stagnant
18:57 means even if i change my word no language translation is shown
18:58 ayushg has quit IRC
19:00 alsroot ishan: you need to learn code of activity as a whole, if set_text doesn't work as you think then you missed something in activity process, learn to code
19:00 ishan alsroot, okay
19:01 alsroot, last thing
19:02 when we change the language it shows no change in the translated word but as soon as we make some changes in the text to be translated it shows the translated text
19:02 can you tell me how that is being done?
19:02 mukul is now known as mukul_afk
19:05 alsroot ishan: no ideas, to answer to this Q I need to follow my own suggestion least the code :)
19:05 s/least/learn/
19:06 ishan alsroot, okay
19:09 alsroot, when i have changed the language to         self.langs = ["French", "German", "Italian", "Portuguese", "Spanish"]
19:09        # Initial values.
19:09        self.fromlang = "English"
19:09        self.tolang   = "German"
19:09        import LanguageModel
19:09        self.languagemodel = LanguageModel.LanguageModel()
19:10 it still initially shows spanish in the activity as the initial language to be translated inspite of changing to german
19:16 alsroot ishan: well, python doesn't do any magic, track the whole execution path from class constructor to answer to your question
19:24 ishan: and do not guess while your investigation, use debug output to make sure that execution process is going as you think
19:31 ishan alsroot, will make sure of that
19:44 alsroot, can you explain the line model, _iter = column.get_selected()
19:45 what is the above code doing?
19:46 alsroot ishan: see get_selected() implementation
19:46 ishan alsroot, okay
19:47 alsroot, is this particular to VBox or HBox?
19:48 alsroot ishan: you see to code, not me :)
19:49 ishan alsroot, i was asking in general whether this is a attribute of VBox or HBox
19:49 not particular to the code
19:50 alsroot ishan: see gtk docs fot these clases http://library.gnome.org/devel/gtk/stable/
19:50 ishan alsroot, thanks
19:51 alsroot ishan: if you are seeking for a symbol, see index page w/ all methods, http://library.gnome.org/devel[…]i-index-full.html
19:54 ishan_ <ishan_!~ishan@> has joined #dextrose
19:55 ishan_ has left #dextrose
20:23 ishan has quit IRC

 « Previous day | Index | Today | Next day »     Channels | Search | Join

Powered by ilbot/Modified.