From f5d4e865b2256798c638ece6d168789235e9dac7 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Tue, 1 Oct 2019 12:08:37 -0300 Subject: [PATCH] fix: not retrieving the system default locale to translate the application texts --- CHANGELOG.md | 1 + bauh/app_args.py | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08b65130..9b864020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixes - Update-check daemon not showing notifications +- Not retrieving the system default locale to translate the application texts - Installed button available after a recent installation if a new search is done ## [0.6.1] 2019-09-26 diff --git a/bauh/app_args.py b/bauh/app_args.py index 5460a7de..ee7ab010 100644 --- a/bauh/app_args.py +++ b/bauh/app_args.py @@ -14,8 +14,7 @@ def read() -> Namespace: help='default memory caches expiration time in SECONDS. Default: %(default)s') parser.add_argument('-ie', '--icon-exp', action="store", default=int(os.getenv('BAUH_ICON_EXPIRATION', 60 * 5)), type=int, help='cached icons expiration time in SECONDS. Default: %(default)s') - parser.add_argument('-l', '--locale', action="store", default=os.getenv('BAUH_LOCALE', 'en'), - help='Translation key. Default: %(default)s') + parser.add_argument('-l', '--locale', action="store", default=os.getenv('BAUH_LOCALE'), help='Locale key. e.g: en, es, pt, ...') parser.add_argument('-i', '--check-interval', action="store", default=int(os.getenv('BAUH_CHECK_INTERVAL', 60)), type=int, help='Updates check interval in SECONDS. Default: %(default)s') parser.add_argument('-n', '--system-notifications', action="store", choices=[0, 1], @@ -48,7 +47,7 @@ def validate(args: Namespace, logger: logging.Logger): if args.icon_exp < 0: logger.info("'icon-exp' set to '{}': cache will not expire.".format(args.cache_exp)) - if not args.locale.strip(): + if args.locale and not args.locale.strip(): logger.info("'locale' set as '{}'. You must provide a valid one. Aborting...".format(args.locale)) exit(1)