def setLocale(locale, force = False):
if not locale:
return
if (not force) and locale == getSetting('locale'):
return
link = getLink(locale)
if link:
locale = link
m = {}
d = os.path.join(mDir, v, locale)
m.update(findMenu(d))
sDir = ''
d = os.path.join(mDir, version)
ld = os.path.join(d, locale)
if (not os.path.isdir(ld)) and getSetting('findSimilarVer', True):
sDir = findSimilarVer()
if not sDir:
return
d = os.path.join(mDir, sDir)
d = os.path.join(d, locale)
if not os.path.isdir(d):
return
m.update(findMenu(d))
d = os.path.join(d, p)
m.update(findMenu(d))
d = os.path.join(d, sublime.arch())
m.update(findMenu(d))
updateMenu(m)
if getSetting('updateTopMenu', True):
updateTopMenu()
sublime.status_message('Locale ' + locale + ' has loaded.')
评论列表
文章目录