Ok. Here's my high level on how I think dLocalize should behave when a given locale can't be used for whatever reason:
1) log to info 2) back off and use en-US 3) continue But I'm still unclear in what/who is setting the error logger incorrectly or whether this is linked to the problem we are discussing or not. Anyway, I think it's fine to make this dLocalize thing an info log entry instead of error log, but you know that won't "fix" anything really- the same misconfiguration you did with your error logger could well have been done to your info logger, and we'd be in the same place, right? Paul > On May 1, 2014, at 8:43, Werner <[email protected]> wrote: > > Hi Paul, > > Sorry to be so unclear on all this. > >> On 5/1/2014 17:22, Paul McNett wrote: >> ... >> >> It feels like the report writer thing is just a symptom though. > Initially it was, as I did not setup the log handler stuff correctly in the > py2exe'd version, that I have corrected in my own code, nothing really to do > with reportWriter or Dabo as it could have shown up elsewhere. >> What happens if you try to call dabo.log.error("hi") versus >> dabo.log.info("hi") from your main script? > Now they will both work, i.e. the first one will show up on a py2exe'd > version, as I set default logging level to 'error' and in debug mode both > will show up. >> >> (Is the problem with the error log, with the dLocalize module, or with the >> report writer)? > In my view it is with dLocalize, as it shows an error if a dabo.mo file is > missing for the users default local, in my case for the 'it' locale, however > it is falling back to 'en', so I think to show an 'info' log would actually > be enough. > > Actually, I believe you can see the problem by just doing > 'dabo.dLocalize.setLanguage('to a not present locale code'), currently this > will show an error when you do it. In my users case this error is showing > when I 'import dabo.lib.reportWriter' as the dLocalize initializing stuff > uses the locale.getdefaultlocale(). > > In my case I get the user selected language from the users record in the > database, so I can not set the desired language at import, which I believe is > my problem that I hit with dLocalize as it does the default language at > import. > > Werner > _______________________________________________ > Post Messages to: [email protected] > Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users > Searchable Archives: http://leafe.com/archives/search/dabo-users > This message: http://leafe.com/archives/byMID/[email protected] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
