[Patches] [ python-Patches-1118341 ] unknown locale: lt_LT (patch)

SourceForge.net noreply at sourceforge.net
Wed Mar 9 19:31:06 CET 2005


Patches item #1118341, was opened at 2005-02-08 02:39
Message generated for change (Comment added) made by sorlov
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1118341&group_id=5470

Category: Library (Lib)
Group: None
Status: Open
Resolution: None
Priority: 8
Submitted By: Nerijus Baliunas (nerijus)
Assigned to: Nobody/Anonymous (nobody)
Summary: unknown locale: lt_LT (patch)

Initial Comment:
When running wxPython app I get:
...
    from wx._core import *
  File
"/usr/lib/python2.3/site-packages/wx-2.5.4-gtk2-ansi/wx/_core.py",
line 11035, in ?
    default = locale.getdefaultlocale()[1]
  File "/usr/lib/python2.3/locale.py", line 346, in
getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.3/locale.py", line 280, in
_parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: lt_LT

Attached patch helps.
I also changed Latvian, as ISO8859-13 is an official
standard in both Latvia and Lithuania, and Estonian, as
they use ISO8859-15 now. Also added Windows language
identifiers for all 3 languages.

It can be applied to both 2.3 and 2.4.

----------------------------------------------------------------------

Comment By: Serge Orlov (sorlov)
Date: 2005-03-09 18:31

Message:
Logged In: YES 
user_id=1235914

I don't think the values in locale_alias should be changed
in minor releases (They have been changed in 2.5 as in your
patch)  Please apply changes that only add lt_lt and lv_lv
aliases. I suspect the whole alias thing has wrong values
for many countries (not only in Python). At least it has
wrong values for Russian in Solaris and Linux for more than
ten years. I know that many Russian users have given up
relying on it. They just set charset explicitly: 
LANG=ru_RU.koi8-r or LANG=ru_RU.utf-8. Nerijus,
LANG=lt_LT.ISO8859-13 should work for you. Besides OpenDict
should catch the exception, print a warning and fall back to
C locale if the locale set by the user is not available.

The windows language identifiers are OK to add.

----------------------------------------------------------------------

Comment By: Nerijus Baliunas (nerijus)
Date: 2005-02-27 22:14

Message:
Logged In: YES 
user_id=3416

I'm increasing priority, as I have real world application
(OpenDict using wxPython) not starting w/o this patch:
$ opendict 
...
ValueError: unknown locale: lt_LT

It's really a very simple patch, please apply it to both 2.3
and 2.4.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1118341&group_id=5470


More information about the Patches mailing list