|
|
|
@ -182,6 +182,37 @@ class fillVars(object, cl_base.glob_attr):
|
|
|
|
|
|
|
|
|
|
def get_os_locale_xkb(self):
|
|
|
|
|
"""раскладка клавиатуры для X"""
|
|
|
|
|
path = '/etc/conf.d/keymaps'
|
|
|
|
|
mapDict={"by":"us,by",
|
|
|
|
|
"be-latin1":"be,us",
|
|
|
|
|
"br-abnt2":"br,us",
|
|
|
|
|
"cf":"ca,us",
|
|
|
|
|
"dk-latin1":"dk,us",
|
|
|
|
|
"fr-latin9":"fr,us",
|
|
|
|
|
"de-latin1":"de,us",
|
|
|
|
|
"is-latin1":"is,us",
|
|
|
|
|
"it":"it,us",
|
|
|
|
|
"no-latin1":"no,us",
|
|
|
|
|
"pl":"pl,us",
|
|
|
|
|
"-u ru4":"us,ru(winkeys)",
|
|
|
|
|
"es euro2":"es,us",
|
|
|
|
|
"sv-latin1":"se,us",
|
|
|
|
|
"ua-utf":"us,ua(winkeys)",
|
|
|
|
|
"uk":"gb,us",
|
|
|
|
|
"us":"us"}
|
|
|
|
|
if os.path.exists(path):
|
|
|
|
|
FD = open(path)
|
|
|
|
|
data = FD.readlines()
|
|
|
|
|
FD.close()
|
|
|
|
|
shortNameList = filter(lambda y:y,
|
|
|
|
|
map(lambda x:\
|
|
|
|
|
len(x.split("="))==2 and\
|
|
|
|
|
x.split("=")[0]=="KEYMAP" and\
|
|
|
|
|
x.split("=")[1].replace('"',"").strip(),\
|
|
|
|
|
data))
|
|
|
|
|
if shortNameList:
|
|
|
|
|
if shortNameList[0] in mapDict.keys():
|
|
|
|
|
return mapDict[shortNameList[0]]
|
|
|
|
|
lang = self.Get("os_locale_lang")
|
|
|
|
|
# Языки:
|
|
|
|
|
# Португальский - pt_BR
|
|
|
|
|