From 6a2201e338bbafa5673d18b2436e02af64893789 Mon Sep 17 00:00:00 2001 From: Eugene Zamriy Date: Wed, 19 Apr 2023 12:06:57 +0300 Subject: [PATCH 10/11] Set English as fallback language for help --- pyanaconda/core/constants.py | 4 ++++ pyanaconda/ui/lib/help.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pyanaconda/core/constants.py b/pyanaconda/core/constants.py index 966b2ac..d1950d9 100644 --- a/pyanaconda/core/constants.py +++ b/pyanaconda/core/constants.py @@ -74,6 +74,10 @@ ANACONDA_CONFIG_TMP = "/run/anaconda/anaconda.conf" # NOTE: this should be LANG_TERRITORY.CODESET, e.g. en_US.UTF-8 DEFAULT_LANG = "ru_RU.UTF-8" +# NOTE: MSVSphere change, set English as a fallback help language because +# we use Russian by default for UI +DEFAULT_HELP_LANG = "en_US.UTF-8" + DEFAULT_VC_FONT = "eurlatgr" DEFAULT_KEYBOARD = "us" diff --git a/pyanaconda/ui/lib/help.py b/pyanaconda/ui/lib/help.py index 271e587..b8f424d 100644 --- a/pyanaconda/ui/lib/help.py +++ b/pyanaconda/ui/lib/help.py @@ -25,7 +25,7 @@ from collections import namedtuple from pyanaconda.anaconda_loggers import get_module_logger from pyanaconda.core.configuration.anaconda import conf -from pyanaconda.core.constants import DEFAULT_LANG, DisplayModes +from pyanaconda.core.constants import DEFAULT_HELP_LANG, DisplayModes from pyanaconda.core.util import startProgram, join_paths from pyanaconda.localization import find_best_locale_match @@ -224,7 +224,7 @@ def _find_best_help_file(current_locale, available_files): :param dict available_files: a dictionary of langcodes and help paths :return str: a path to the best help file or None """ - for locale in (current_locale, DEFAULT_LANG): + for locale in (current_locale, DEFAULT_HELP_LANG): best_lang = find_best_locale_match(locale, available_files.keys()) best_path = available_files.get(best_lang, None) -- 2.41.0