Set English as fallback language for anaconda help

al changed/i9/anaconda-34.25.1.14-1.el9.inferit.5
Eugene Zamriy 2 years ago
parent 7ccf99b162
commit 2cfacb5e9e
Signed by: ezamriy
GPG Key ID: 7EBF95C7DCFA496C

@ -0,0 +1,50 @@
From 60612774beab21f7a51c7e18011d7b245da69f3a Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <eugene@zamriy.info>
Date: Wed, 19 Apr 2023 12:06:57 +0300
Subject: [PATCH 10/10] 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 b3c574c..350ef10 100644
--- a/pyanaconda/core/constants.py
+++ b/pyanaconda/core/constants.py
@@ -73,6 +73,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.39.2

@ -1,7 +1,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 34.25.1.14
Release: 1%{?dist}.inferit.4
Release: 1%{?dist}.inferit.5
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -22,6 +22,7 @@ Patch1006: 0006-Add-MSVSphere-product-config.patch
Patch1007: 0007-Set-Russian-language-as-default.patch
Patch1008: 0008-Replace-Fedora-references-and-update-translations.patch
Patch1009: 0009-Set-Russian-as-default-language-for-new-regions.patch
Patch1010: 0010-Set-English-as-fallback-language-for-help.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -422,6 +423,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{_prefix}/libexec/anaconda/dd_*
%changelog
* Wed Apr 19 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 34.25.1.14-1.inferit.5
* Set English as fallback language for anaconda help
* Mon Apr 17 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 34.25.1.14-1.inferit.4
- Set Russian as default language for new regions
- Updated Russian translation patch

Loading…
Cancel
Save