From: Doug B. <dou...@gm...> - 2011-03-18 12:53:32
|
On Fri, Mar 18, 2011 at 8:43 AM, jerome <rom...@ya...> wrote: > Doug, > > > I see it now! > > There is an exception try/test on two Addons: > * SetMarkerTool > * SetAttributeTool > > try: > from TransUtils import get_addon_translator > _ = get_addon_translator(__file__).ugettext > except: > import gettext > _ = gettext.gettext > > It looks at available translations on addon domain, else it uses standard gettext (and gramps domain/session). > > On this code, does __file__ link to local translation file ? or it is just need for the test ? It doesn't matter if you use __file__ or nothing... if you leave it out, it defaults to __file__. Are you saying that an exception is being thrown and it isn't using the code in the try? If so, do you know what the exception is? -Doug > > Jérôme > > > --- En date de : Jeu 17.3.11, Doug Blank <dou...@gm...> a écrit : > >> De: Doug Blank <dou...@gm...> >> Objet: Re: [Gramps-devel] Translation of some reports. >> À: "jerome" <rom...@ya...> >> Cc: gra...@li..., "Helge@Gramps" <Hel...@ka...> >> Date: Jeudi 17 mars 2011, 15h08 >> On Thu, Mar 17, 2011 at 9:27 AM, >> jerome <rom...@ya...> >> wrote: >> > Note, I have no idea why I used __file__ on >> get_addon_translator() ? >> > >> > _ = get_addon_translator(__file__).ugettext >> > >> > >> > Was it the previous way ? >> > >> > Does it work if you remove '__file__' ? >> >> That should have no effect. If it does, that is a bug. >> >> -Doug >> >> > >> > Jérôme >> > >> > >> > --- En date de : Jeu 17.3.11, Helge@Gramps <Helge.Privat@Kabelmail.de> >> a écrit : >> > >> >> De: Helge@Gramps <Helge.Privat@Kabelmail.de> >> >> Objet: Re: [Gramps-devel] Translation of some >> reports. >> >> À: gra...@li... >> >> Date: Jeudi 17 mars 2011, 0h26 >> >> I tried the 'Repositories Report >> >> Options' on Win 7, German using both English >> >> and German Gramps (LANG and LANGUAGE used for >> control). So >> >> far I'm now, I >> >> never got an German report: >> >> Author: ... >> >> Abbreviation: ... >> >> Publication information: ... >> >> Data: ... >> >> >> >> >> >> -- >> >> View this message in context: http://gramps.1791082.n4.nabble.com/Translation-of-some-reports-tp3382515p3383325.html >> >> Sent from the GRAMPS - Dev mailing list archive >> at >> >> Nabble.com. >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Colocation vs. Managed Hosting >> >> A question and answer guide to determining the >> best fit >> >> for your organization - today and in the future. >> >> http://p.sf.net/sfu/internap-sfd2d >> >> _______________________________________________ >> >> Gramps-devel mailing list >> >> Gra...@li... >> >> https://lists.sourceforge.net/lists/listinfo/gramps-devel >> >> >> > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > Colocation vs. Managed Hosting >> > A question and answer guide to determining the best >> fit >> > for your organization - today and in the future. >> > http://p.sf.net/sfu/internap-sfd2d >> > _______________________________________________ >> > Gramps-devel mailing list >> > Gra...@li... >> > https://lists.sourceforge.net/lists/listinfo/gramps-devel >> > >> > > > > |