From e724ebaba0747ba4c9cf69687be7da9ab5575b7c Mon Sep 17 00:00:00 2001 From: ShyPike Date: Sat, 25 Sep 2010 10:53:28 +0200 Subject: [PATCH] Convert existing 0.5.x language string to new style AND write back to INI file. Plush now needs a default color ("gold"). --- sabnzbd/__init__.py | 5 ++++- sabnzbd/constants.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sabnzbd/__init__.py b/sabnzbd/__init__.py index 17d80d2..f94782d 100644 --- a/sabnzbd/__init__.py +++ b/sabnzbd/__init__.py @@ -222,9 +222,12 @@ def initialize(pause_downloader = False, clean_up = False, evalSched=False, repa ### Set cache limit ArticleCache.do.new_limit(cfg.cache_limit.get_int()) + ### Handle language upgrade from 0.5.x to 0.6.x + cfg.language.set(LANG_MAP.get(cfg.language(), 'en')) + ### Set language files lang.set_locale_info('SABnzbd', DIR_LANGUAGE) - lang.set_language(LANG_MAP.get(cfg.language(), cfg.language())) + lang.set_language(cfg.language()) sabnzbd.api.cache_skin_trans() ### Check for old queue (when a new queue is not present) diff --git a/sabnzbd/constants.py b/sabnzbd/constants.py index 4ef1888..5447192 100644 --- a/sabnzbd/constants.py +++ b/sabnzbd/constants.py @@ -80,7 +80,7 @@ DEF_INTERFACES = 'interfaces' DEF_INT_LANGUAGE = 'locale' DEF_EMAIL_TMPL = 'email' DEF_STDINTF = 'smpl' -DEF_SKIN_COLORS = {'smpl':'white', 'classic':'darkblue', 'mobile':'light'} +DEF_SKIN_COLORS = {'smpl':'white', 'classic':'darkblue', 'mobile':'light', 'plush' : 'gold'} DEF_MAIN_TMPL = 'templates/main.tmpl' DEF_INI_FILE = 'sabnzbd.ini' DEF_HOST = 'localhost'