I wrote the addon translation system and the wiki documentation, but I'm not a translation expert, and would only consider make.py that is in gramps-addons as a first draft. It mostly works, but could be refined.

I think we could replace all of the gettext, ngettext functions that get_addon_translation returns to optionally take a context. That will keep the API simple.

It should be the case that one can just update a translation without having to redo it. If you lose previous translations, that is a bug.

The tar.gz should contain the locale subdir. If not, that's a bug.

The make.py process is a bit convoluted. It might be better as a pure make function, or maybe just a little more work. I don't think it check dependencies, but could. It also could be made to do more, and make for all addons. For example, it would be nice to make update all languages, and update all download packages.

If someone wants to fix any issues that come along, please do. Else, put a bug in the tracker and assign to me.

-Doug

On Wed, Dec 30, 2009 at 1:58 PM, jerome <romjerome@yahoo.fr> wrote:
> "Maybe Jerome knows ?"

I know that into Gramps, context uses sgettext.
http://www.gramps-project.org/wiki/index.php?title=Coding_for_translation#Provide_a_context_support.

But there is a change on gettext context[1] which seems not to be properly managed by python yet[2].
So, Gramps still use the "old hack" on context[3] !


[1] http://www.gnu.org/software/hello/manual/gettext/Contexts.html
[2] http://bugs.python.org/issue2504
[3] http://www.gramps-project.org/bugs/view.php?id=3416


--- En date de : Mer 30.12.09, Peter Landgren <peter.talken@telia.com> a écrit :

> De: Peter Landgren <peter.talken@telia.com>
> Objet: Re: [Gramps-devel] Translation in gramps-addons
> À: "Nick Hall" <nick__hall@hotmail.com>
> Cc: gramps-devel@lists.sourceforge.net
> Date: Mercredi 30 Décembre 2009, 19h20
> Yes, I see the note now, but I have
> no idea why not. Maybe Jerome knows?
>
> /Peter
>
>
> > Yes, that would be a solution, but is it available for
> addons?
> >
> > In this link:
> >
> > http://www.gramps-project.org/wiki/index.php?title=Addons_Development#Local
> >ization
> >
> > there is the following note:
> >
> > "NOTE: currently we don;t have a method of using a
> context in any of
> > these functions."
> >
> > I assumed that I could not add a context yet.
> >
> > Nick.
> >
> > Peter Landgren wrote:
> > > <snip>
> > >
> > >> 3. Main Gramps translations override the
> addon translations.
> > >>
> > >> I translated a string in the po file, but an
> existing translation in the
> > >> main Gramps program was used instead. 
> This may cause a problem if the
> > >> string is used in a different context in the
> addon and a different
> > >> translation is required.
> > >
> > > You can use "explanation of string|string to
> translate". The characters
> > > to the left of "|" is not shown in the translated
> string.
> > >
> > > /Peter
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer
> Community
> Take advantage of Verizon's best-in-class app development
> support
> A streamlined, 14 day to market process makes app
> distribution fast and easy
> Join now and get one step closer to millions of Verizon
> customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Gramps-devel mailing list
> Gramps-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gramps-devel
>




------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Gramps-devel mailing list
Gramps-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gramps-devel