Picon

Re: [Localization] New localisation workflow: Overview and status

On 10/31/07, Sayamindu Dasgupta <sayamindu <at> gmail.com> wrote:
> ** Current Status **
>
> Most of the scripts, etc are ready, and we are quite satisfied with the
> results of what we have seen so far using local repositories. The only
> major "blocker" issue that is left to be resolved is the question of GIT
> access to dev.laptop.org for the Pootle user. The most optimal solution
> for this is to use the newly released support for GIT submodules (where
> the po directory can be a separate submodule of a project). This
> isolates the PO directory from the rest of the project, minimising the
> chances of Pootle messing something other than translations :-).
>
> However, we would like to hear from developers on this - does having a
> new submodule under your project tree complicate your job ? Information
> on git submodules and how to use them is available at
> http://git.or.cz/gitwiki/GitSubmoduleTutorial

Is this really necessary? Git is complicated enough for new comers so
if we can avoid additional complexity I think we should do it.

Also, a short tutorial on how an activity author would set it up would
probably help to evaluate this better.

Thanks,
Marco
Picon

Re: [Localization] New localisation workflow: Overview and status



On 10/31/07, Marco Pesenti Gritti <mpgritti <at> gmail.com> wrote:
On 10/31/07, Sayamindu Dasgupta <sayamindu <at> gmail.com> wrote:
> ** Current Status **
>
> Most of the scripts, etc are ready, and we are quite satisfied with the
> results of what we have seen so far using local repositories. The only
> major "blocker" issue that is left to be resolved is the question of GIT
> access to dev.laptop.org for the Pootle user. The most optimal solution
> for this is to use the newly released support for GIT submodules (where
> the po directory can be a separate submodule of a project). This
> isolates the PO directory from the rest of the project, minimising the
> chances of Pootle messing something other than translations :-).
>
> However, we would like to hear from developers on this - does having a
> new submodule under your project tree complicate your job ? Information
> on git submodules and how to use them is available at
> http://git.or.cz/gitwiki/GitSubmoduleTutorial

From my point of view this is not really necessary, we can keep on doing our actual simlinks and script scheme, although is not an entirely integration to git (from the pootle point of view), from the d.l.o side is the  better solution, but anyway  im not saying that we shouldn't keep on trying to find a complete solution for this, but this solution  does not have to be so complex.

So i agree with marco that we have to write a tutorial about this, but the procedure is not difficult, taking in count that we have to handle the translation sync from the translate machine, and this is made by git pull from all the activities.

cheers!

Is this really necessary? Git is complicated enough for new comers so
if we can avoid additional complexity I think we should do it.



Also, a short tutorial on how an activity author would set it up would
probably help to evaluate this better.

Thanks,
Marco
_______________________________________________
Localization mailing list
Localization <at> lists.laptop.org
http://lists.laptop.org/listinfo/localization



--
Rafael Enrique Ortiz Guerrero
One Laptop Per Child
rafael <at> laptop.org
_______________________________________________
Devel mailing list
Devel <at> lists.laptop.org
http://lists.laptop.org/listinfo/devel
Picon

Re: [Localization] New localisation workflow: Overview and status

On 11/1/07, Rafael Enrique Ortiz Guerrero <dirakx <at> gmail.com> wrote:
>
>
> On 10/31/07, Marco Pesenti Gritti <mpgritti <at> gmail.com> wrote:
> > On 10/31/07, Sayamindu Dasgupta <sayamindu <at> gmail.com> wrote:
> > > ** Current Status **
> > >
> > > Most of the scripts, etc are ready, and we are quite satisfied with the
> > > results of what we have seen so far using local repositories. The only
> > > major "blocker" issue that is left to be resolved is the question of GIT
> > > access to dev.laptop.org for the Pootle user. The most optimal solution
> > > for this is to use the newly released support for GIT submodules (where
> > > the po directory can be a separate submodule of a project). This
> > > isolates the PO directory from the rest of the project, minimising the
> > > chances of Pootle messing something other than translations :-).
> > >
> > > However, we would like to hear from developers on this - does having a
> > > new submodule under your project tree complicate your job ? Information
> > > on git submodules and how to use them is available at
> > > http://git.or.cz/gitwiki/GitSubmoduleTutorial
>
> From my point of view this is not really necessary, we can keep on doing our
> actual simlinks and script scheme, although is not an entirely integration
> to git (from the pootle point of view), from the d.l.o side is the  better
> solution, but anyway  im not saying that we shouldn't keep on trying to find
> a complete solution for this, but this solution  does not have to be so
> complex.
>
> So i agree with marco that we have to write a tutorial about this, but the
> procedure is not difficult, taking in count that we have to handle the
> translation sync from the translate machine, and this is made by git pull
> from all the activities.

Yeah, my request for a "tutorial" was about the submodule part. It
felt too complex at first sight but I wanted to see exactly what we
was going to require for activity authors.

Anyway if we can avoid the step altogether I'll be happy :)

Marco
tekelsey | 1 Nov 17:31
Picon
Gravatar

Re: [Localization] New localisation workflow: Overview and status

I hope I don't get whacked over the head with a wet noodle, but would it make sense to use subversion for
general content (such as user created documentation) instead of git? a) keeps content away from git, b) is
easier to use for educators?

not as authoritative as git but maybe it's ok with documentation since one can do a visual read? Then if
pootle was connected to subversion, you could always have a border crossing where any strings going over
the border are given git hashes and checksumsm

-----Original Message-----

From:  "Rafael Enrique Ortiz Guerrero" <dirakx <at> gmail.com>
Subj:  Re: [Localization] New localisation workflow: Overview and status
Date:  Thu Nov 1, 2007 12:48 am
Size:  1K
To:  "Marco Pesenti Gritti" <mpgritti <at> gmail.com>
cc:  devel <devel <at> lists.laptop.org>; sugar <at> lists.laptop.org;localization <at> lists.laptop.org

On 10/31/07, Marco Pesenti Gritti <mpgritti <at> gmail.com> wrote:
>
> On 10/31/07, Sayamindu Dasgupta <sayamindu <at> gmail.com> wrote:
> > ** Current Status **
> >
> > Most of the scripts, etc are ready, and we are quite satisfied with the
> > results of what we have seen so far using local repositories. The only
> > major "blocker" issue that is left to be resolved is the question of GIT
> > access to dev.laptop.org for the Pootle user. The most optimal solution
> > for this is to use the newly released support for GIT submodules (where
> > the po directory can be a separate submodule of a project). This
> > isolates the PO directory from the rest of the project, minimising the
> > chances of Pootle messing something other than translations :-).
> >
> > However, we would like to hear from developers on this - does having a
> > new submodule under your project tree complicate your job ? Information
> > on git submodules and how to use them is available at
> > http://git.or.cz/gitwiki/GitSubmoduleTutorial

From my point of view this is not really necessary, we can keep on doing our
actual simlinks and script scheme, although is not an entirely integration
to git (from the pootle point of view), from the d.l.o side is the  better
solution, but anyway  im not saying that we shouldn't keep on trying to find
a complete solution for this, but this solution  does not have to be so
complex.

So i agree with marco that we have to write a tutorial about this, but the
procedure is not difficult, taking in count that we have to handle the
translation sync from the translate machine, and this is made by git pull
from all the activities.

cheers!

Is this really necessary? Git is complicated enough for new comers so
> if we can avoid additional complexity I think we should do it.

--- message truncated ---
Sayamindu Dasgupta | 1 Nov 20:24
Picon
Gravatar

Re: [Localization] New localisation workflow: Overview and status

Hi,

On Thu, 2007-11-01 at 11:09 +0100, Marco Pesenti Gritti wrote:
> On 11/1/07, Rafael Enrique Ortiz Guerrero <dirakx <at> gmail.com> wrote:
> >
> >
> > On 10/31/07, Marco Pesenti Gritti <mpgritti <at> gmail.com> wrote:
> > > On 10/31/07, Sayamindu Dasgupta <sayamindu <at> gmail.com> wrote:
> > > > ** Current Status **
> > > >
> > > > Most of the scripts, etc are ready, and we are quite satisfied with the
> > > > results of what we have seen so far using local repositories. The only
> > > > major "blocker" issue that is left to be resolved is the question of GIT
> > > > access to dev.laptop.org for the Pootle user. The most optimal solution
> > > > for this is to use the newly released support for GIT submodules (where
> > > > the po directory can be a separate submodule of a project). This
> > > > isolates the PO directory from the rest of the project, minimising the
> > > > chances of Pootle messing something other than translations :-).
> > > >
> > > > However, we would like to hear from developers on this - does having a
> > > > new submodule under your project tree complicate your job ? Information
> > > > on git submodules and how to use them is available at
> > > > http://git.or.cz/gitwiki/GitSubmoduleTutorial
> >
> > From my point of view this is not really necessary, we can keep on doing our
> > actual simlinks and script scheme, although is not an entirely integration
> > to git (from the pootle point of view), from the d.l.o side is the  better
> > solution, but anyway  im not saying that we shouldn't keep on trying to find
> > a complete solution for this, but this solution  does not have to be so
> > complex.
> >
> > So i agree with marco that we have to write a tutorial about this, but the
> > procedure is not difficult, taking in count that we have to handle the
> > translation sync from the translate machine, and this is made by git pull
> > from all the activities.
> 
> Yeah, my request for a "tutorial" was about the submodule part. It
> felt too complex at first sight but I wanted to see exactly what we
> was going to require for activity authors.
> 
> Anyway if we can avoid the step altogether I'll be happy :)

It will actually add an extra level of complication for the software
developers. 
To add a GIT submodule, one would have to do a git submodule add <repo>
inside the existing main repo. However, it will probably cause confusion
since the submodules are not checked out automatically and one has to
pull them in explicitly.

The only reason we wanted submodules was to ensure that Pootle had write
access to _only_ the translations, and nothing else - but I guess it
adds too much complexity for the developers (and on top of that,
migrating existing projects to a submodule based setup might be a major
pain in the backside :-). I had a small discussion with Xavi on IRC
about this, and he thinks likewise on the complexity issue.

I would love to hear some comments from someone from the server admin
team on this. 

Warm regards,
Have a great day,
Sayamindu

 
--

-- 
Sayamindu Dasgupta
http://sayamindu.randomink.org/ramblings
Erik Blankinship | 2 Nov 00:05
Favicon
Gravatar

how to make a grayscale image?

Anyone know of an easy technique for turning a pixbuf or cairo context into grayscale? 

(& telling me to put the xo into grayscale mode isn't the right answer :-) )

_______________________________________________
Sugar mailing list
Sugar <at> lists.laptop.org
http://lists.laptop.org/listinfo/sugar
Eben Eliason | 2 Nov 00:16
Picon

Re: how to make a grayscale image?

Roughly speaking, you can calculate a colored pixel's effective luminance by:

Y = 0.3*R+0.59*G+0.11*B

Just set R, G and B to Y, or use a single channel image with the Y
values.  If python were Matlab  (Which I hate, but it's good at this
kind of thing...) you could do that in "one step." Who knows, maybe
there's a built-in filter you can use to accomplish this anyway, but
that's not my territory.

- Eben

On 11/1/07, Erik Blankinship <erikb <at> mediamods.com> wrote:
> Anyone know of an easy technique for turning a pixbuf or cairo context into
> grayscale?
>
> (& telling me to put the xo into grayscale mode isn't the right answer :-) )
>
> _______________________________________________
> Sugar mailing list
> Sugar <at> lists.laptop.org
> http://lists.laptop.org/listinfo/sugar
>
>
Picon

Re: how to make a grayscale image?


Erik Blankinship wrote:
> Anyone know of an easy technique for turning a pixbuf or cairo context
> into grayscale?

I can't tell what you mean.  Do you mean to take a snapshot of an existing
pixbuf, convert that snapshot to grayscale, and display the snapshot over the
existing pixbuf?  If so, the easiest way I know of is
gtk.gdk.Pixbuf.get_pixels_array and gtk.gdk.pixbuf_new_from_array [1].  These
methods allow you to do math on the pixels as a Numeric Python array, and then
make a new Pixbuf from the resulting array.

1.
http://www.pygtk.org/docs/pygtk/class-gdkpixbuf.html#method-gdkpixbuf--get-pixels-array
Chris Ball | 2 Nov 02:15
Favicon
Gravatar

[PATCH] Fix startup sound playback.

Hi,

The sugar startup sound playback broke sound in Joyride, because a
callback for closing the playback pipeline was not registered, and as a
result gstreamer kept the pipeline (and audio device) open for as long
as the process (sugar-shell) stayed running.  I fixed this in two ways
that make sense to me, and one that doesn't:

* We now supply a callback for the "message::eos" signal, and change
  the player state to NULL instead of PLAYING in it.

* I tried doing this with a lambda, but exposed another problem with the
  current function -- Python pulls down variables as a function is
  exited, and our playback function exited before the sound finished (or
  started) playing.  I stuck the player object into main as a property
  so that it sticks around until it can close the pipeline.

* That still didn't fix it; any activities launched retained an open
  pcm device.  I tried calling _shell_started() directly, instead
  of as a gobject_idle_add() callback, and this fixed it.  I don't
  understand why.  The playback happens in roughly the same part
  of the startup sequence as it originally did.

All three changes are necessary to get sound working again.
Please review and apply.

---
 bin/sugar-shell |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/bin/sugar-shell b/bin/sugar-shell
index 8f78289..c439085 100755
--- a/bin/sugar-shell
+++ b/bin/sugar-shell
@@ -82,20 +82,29 @@ def check_cm(bus_name):
         pass
     return False

-def _shell_started_cb():
+def _eos_cb(bus, message):
+    main.player.set_state(gst.STATE_NULL)
+
+def _error_cb(bus, message):
+    error = message.parse_error()
+    print error[1]
+
+def _shell_started():
     # Unfreeze the display
     hw_manager = hardwaremanager.get_manager()
     hw_manager.set_dcon_freeze(0)

     startup_sound = os.path.join(env.get_data_path('startup.flac'))
     if os.path.exists(startup_sound):
-        player = gst.element_factory_make("playbin", "player")
-        player.set_property("uri", "file://" + startup_sound)
-        player.set_state(gst.STATE_PLAYING)
+        main.player = gst.element_factory_make("playbin", "player")
+        main.player.set_property("uri", "file://" + startup_sound)
+        bus = main.player.get_bus()
+        bus.add_signal_watch()
+        bus.connect("message::eos", _eos_cb)
+        bus.connect("message::error", _error_cb)
+        main.player.set_state(gst.STATE_PLAYING)

 def main():
-    gobject.idle_add(_shell_started_cb)
-
     logsmanager.setup()
     logger.start('shell')

@@ -145,6 +154,7 @@ def main():
     model = ShellModel()
     shell = Shell(model)
     service = ShellService(shell)
+    shell_started()

 if __name__ == '__main__':
     # running the gtk.main outside of the main() function allows us to 
--

-- 
Chris Ball   <cjb <at> laptop.org>
Erik Blankinship | 2 Nov 02:29
Favicon
Gravatar

Re: how to make a grayscale image?

thanks everyone!

import gtk


def grayScalePixBuf( pb, copy ):
    arr = pb.get_pixels_array()
    if (copy):
        arr = arr.copy()
    for row in arr:
        for pxl in row:
            y = 0.3*pxl[0][0]+0.59*pxl[1][0]+0.11*pxl[2][0]
            pxl[0][0] = y
            pxl[1][0] = y
            pxl[2][0] = y
    return gtk.gdk.pixbuf_new_from_array(arr, pb.get_colorspace(), pb.get_bits_per_sample())

pb = gtk.gdk.pixbuf_new_from_file("cat.jpg")
pb = grayScalePixBuf(pb, True)
pb.save( "grayCat.png", "png", {} )


On 11/1/07, Benjamin M. Schwartz <bmschwar <at> fas.harvard.edu> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Erik Blankinship wrote:
> Anyone know of an easy technique for turning a pixbuf or cairo context
> into grayscale?

I can't tell what you mean.  Do you mean to take a snapshot of an existing
pixbuf, convert that snapshot to grayscale, and display the snapshot over the
existing pixbuf?  If so, the easiest way I know of is
gtk.gdk.Pixbuf.get_pixels_array and gtk.gdk.pixbuf_new_from_array [1].  These
methods allow you to do math on the pixels as a Numeric Python array, and then
make a new Pixbuf from the resulting array.

1.
http://www.pygtk.org/docs/pygtk/class-gdkpixbuf.html#method-gdkpixbuf--get-pixels-array
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHKmkCUJT6e6HFtqQRAgrjAJ47VHqmT9j7xVAyNzgKXdgDTxQWMQCffJ6k
D26RDImuualfzAdlJNaP4k0=
=Oc7S
-----END PGP SIGNATURE-----

_______________________________________________
Sugar mailing list
Sugar <at> lists.laptop.org
http://lists.laptop.org/listinfo/sugar

Gmane