[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] eric locale problem fixed
From: Hans-Peter Jansen <hpj () urpla ! net>
Date: 2002-10-24 14:58:35
[Download RAW message or body]
Hi Detlef, hi Phil,
as promised, I looked into my eric locale issue here.
The attached patch fixes it for me. It boils down to filtering
the locale definition to the major value, and fixes two c/p
glitches. Along the way, hunk 1 and 2 removes some stray ^M's
at EOL.
BTW: Today, I prepared some new SuSE 8.1 rpm's, but won't find
time to throw them on my site today: sip-20021018-1.i586.rpm (112k),
qscintilla-0.2-1.i586.rpm (252k), and PyQt-20021024-2.i586.rpm (3,45m).
I will happily send them everybody directly on short request.
(w or w/o src.rpm's?).
Have a good day,
Hans-Peter
["eric-hp-1.diff" (text/x-diff)]
--- /usr/src/packages/SOURCES/PyQt-x11-gpl-snapshot-20021024/eric/eric.py 2002-10-24 \
11:04:14.000000000 +0200
+++ eric/eric.py 2002-10-24 16:19:41.000000000 +0200
@@ -5,7 +5,7 @@
import os
from qt import QApplication, QTranslator, QTextCodec
-from Dirs import ericDir
+from Dirs import ericDir
import Preferences
qtTrans = None
@@ -27,11 +27,16 @@
prog = None
# Load translation files and install them
- loaded = 0
+ loaded = 0
loc = Preferences.getUILanguage()
if loc is None:
loc = unicode(QTextCodec.locale())
-
+ # grab the major locale
+ try:
+ loc = loc.split("_")[0]
+ except:
+ pass
+
# 1) load translations for qt
qtTrans = QTranslator(None)
qtdir = os.getenv("QTDIR")
@@ -54,10 +59,10 @@
# 2) load translations for eric
ericTrans = QTranslator(None)
- loaded = qtTrans.load("eric_" + loc, ".")
+ loaded = ericTrans.load("eric_" + loc, ".")
# try in our installation if not found
if not loaded:
- loaded = qtTrans.load("eric_" + loc, ericDir)
+ loaded = ericTrans.load("eric_" + loc, ericDir)
# install it if successful
if loaded:
app.installTranslator(ericTrans)
_______________________________________________
PyKDE mailing list PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic