On 5/1/14, 6:47 AM, Werner wrote:
Hi Paul,
On 5/1/2014 15:13, Paul McNett wrote:
On 5/1/14, 3:47 AM, Werner wrote:
It was me not initializing a log handler correctly when not being in dev
mode.
I still have the question what is the correct thing to do that a user
does not see this 'soft error'?
Option 1: change line 107 in dLocalize to "dabo.log.info(.... , would a
patch to that effect be accepted?
Option 2: ??, somehow force Dabo not to look at the OS language
configuration, how could I do that before 'dLocalize.setLanguage' is
executed the first time.
I need to understand better before offering suggestions. Can you
implement this problem in a very simple script that doesn't include Dabo?
Not quickly - I am off on vacation tomorrow:-) , but let me try to
explain it a bit better.
Can you show me where Dabo causes this problem and what the fix would be?
With my app I distribute only locale's 'de', 'fr' and 'en', now the user
originally reporting my problem runs my app in 'en' but on an Italian
Windows OS, so locale.getdefaultlocale()[1] returns 'it' (I only use wx
stuff for the gettext stuff, so never do locale.setlocale) which when I
import the reportWriter hits the exception mentioned earlier.
BTW, option 1 does the trick for me for the moment so a final solution
to this is not urgent, which is to change line 106+ in dLocalize as
follows:
# No translation file found
dabo.log.error("""
No translation file found for domain 'dabo'.
Locale dir = %s
Languages = %s
Codeset = %s """ % (daboLocaleDir, ustr(lang), charset))
# Default to US English
to:
# No translation file found
dabo.log.info("""
No translation file found for domain 'dabo'.
Locale dir = %s
Languages = %s
Codeset = %s """ % (daboLocaleDir, ustr(lang), charset))
# Default to US English
It feels like the report writer thing is just a symptom though. What
happens if you try to call dabo.log.error("hi") versus
dabo.log.info("hi") from your main script?
(Is the problem with the error log, with the dLocalize module, or with
the report writer)?
Paul
_______________________________________________
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]