You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
anaconda/SOURCES/0011-Add-MSVSphere-identifi...

549 lines
26 KiB

From db421686fd05b9bfce86d29654cca30983c7f266 Mon Sep 17 00:00:00 2001
From: Sergey Cherevko <s.cherevko@msvsphere-os.ru>
Date: Tue, 14 Jan 2025 18:41:07 +0300
Subject: [PATCH 11/15] Add MSVSphere identification support
2 months ago
---
data/liveinst/gnome/fedora-welcome.js | 2 +-
.../org.fedoraproject.welcome-screen.desktop | 4 +-
po/ru.po | 153 +++++++++++++++---
pyanaconda/core/product.py | 37 ++++-
.../ui/gui/spokes/installation_progress.glade | 2 +-
.../ui/gui/spokes/installation_progress.py | 8 +-
.../ui/gui/spokes/lib/storage_dialogs.py | 14 +-
pyanaconda/ui/gui/spokes/welcome.py | 28 +++-
pyanaconda/ui/helpers.py | 23 ++-
9 files changed, 226 insertions(+), 45 deletions(-)
2 months ago
diff --git a/data/liveinst/gnome/fedora-welcome.js b/data/liveinst/gnome/fedora-welcome.js
index 61e11ff..a8979d8 100755
2 months ago
--- a/data/liveinst/gnome/fedora-welcome.js
+++ b/data/liveinst/gnome/fedora-welcome.js
@@ -46,7 +46,7 @@ class WelcomeWindow extends Adw.ApplicationWindow {
2 months ago
}
constructor(application) {
- const title = _('Welcome to MSVSphere!');
+ const title = _('Welcome to MSVSphere ARM 10.0!');
super({
2 months ago
application,
title,
diff --git a/data/liveinst/gnome/org.fedoraproject.welcome-screen.desktop b/data/liveinst/gnome/org.fedoraproject.welcome-screen.desktop
index 60ab503..ed47fa6 100644
2 months ago
--- a/data/liveinst/gnome/org.fedoraproject.welcome-screen.desktop
+++ b/data/liveinst/gnome/org.fedoraproject.welcome-screen.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
-Name=Welcome to MSVSphere
-Name[ru]=Добро пожаловать в МСВСфера
+Name=Welcome to MSVSphere ARM 10.0
+Name[ru]=Добро пожаловать в МСВСфера АРМ 10.0
2 months ago
Icon=fedora-logo-icon
Exec=/usr/share/anaconda/gnome/fedora-welcome
Terminal=false
diff --git a/po/ru.po b/po/ru.po
index f64476a..b930cf0 100644
2 months ago
--- a/po/ru.po
+++ b/po/ru.po
@@ -54,9 +54,9 @@ msgstr ""
2 months ago
"Project-Id-Version: anaconda 32.22\n"
"Report-Msgid-Bugs-To: anaconda-devel@lists.fedoraproject.org\n"
"POT-Creation-Date: 2024-12-07 20:44-0500\n"
-"PO-Revision-Date: 2024-08-30 05:20+0000\n"
2 months ago
-"Last-Translator: Aleksey Fedorov <aleksejfedorov963@gmail.com>\n"
-"Language-Team: Russian <https://translate.fedoraproject.org/projects/"
+"PO-Revision-Date: 2025-01-14 20:28+0300\n"
2 months ago
+"Last-Translator: Sergey Cherevko <s.cherevko@msvsphere-os.ru>\n"
+"Language-Team: Russian <https://msvsphere-os.ru>"
"anaconda/rhel-10/ru/>\n"
2 months ago
"Language: ru\n"
"MIME-Version: 1.0\n"
@@ -64,7 +64,7 @@ msgstr ""
2 months ago
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 5.7\n"
+"X-Generator: Poedit 3.4.4\n"
2 months ago
#: pyanaconda/kickstart.py:372
#, python-format
@@ -151,10 +151,10 @@ msgstr ""
2 months ago
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:166
#, python-format
msgid ""
-" You don't have enough space available to install <b>%(product)s</b>, even "
+" You don't have enough space available to install <b>MSVSphere</b>, even "
"if you used all of the free space available on the selected disks."
2 months ago
msgstr ""
-" Недостаточно места для установки <b>%(product)s</b>, даже если "
+" Недостаточно места для установки <b>МСВСфера ОС</b>, даже если "
"использовать все свободное место на выбранных дисках."
2 months ago
#: pyanaconda/ui/gui/spokes/custom_storage.py:1720
@@ -276,7 +276,42 @@ msgstr "%(name)s может иметь следующий тип метки ди
#: pyanaconda/ui/helpers.py:70
2 months ago
#, python-format
msgid "%(productName)s %(productVersion)s INSTALLATION"
-msgstr "УСТАНОВКА %(productName)s %(productVersion)s"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s"
+
2 months ago
+#: pyanaconda/product.py:83
+#, python-format
+msgid "MSVSphere %(productVersion)s Server INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s Сервер"
+
+#: pyanaconda/product.py:85
+#, python-format
+msgid "MSVSphere %(productVersion)s Certified INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s Сертифицированная"
+
+#: pyanaconda/product.py:87
+#, python-format
+msgid "MSVSphere %(productVersion)s ARM INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s АРМ"
+
+#: pyanaconda/product.py:89
+#, python-format
+msgid "MSVSphere %(productVersion)s Cinnamon INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s Cinnamon"
+
+#: pyanaconda/product.py:91
+#, python-format
+msgid "MSVSphere %(productVersion)s KDE INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s KDE"
+
+#: pyanaconda/product.py:93
+#, python-format
+msgid "MSVSphere %(productVersion)s XFCE INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s XFCE"
+
+#: pyanaconda/product.py:95
+#, python-format
+msgid "MSVSphere %(productVersion)s OS INSTALLATION"
+msgstr "УСТАНОВКА МСВСфера %(productVersion)s ОС"
2 months ago
#: pyanaconda/startup_utils.py:90
2 months ago
#, python-format
@@ -306,6 +341,23 @@ msgstr[2] "Выбраны %d устройств _хранения"
msgid "%s The disks you've selected have the following amounts of free space:"
msgstr "%s На выбранных дисках доступно:"
2 months ago
+#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:177
+#, python-format
+msgid ""
+"<b>You don't have enough space available to install "
+"MSVSphere</b>, even if you used all of the free space "
+"available on the selected disks. You could add more "
+"disks for additional space, "
+"modify your software selection to install a smaller "
+"version of <b>MSVSphere</b>, or quit the installer."
+msgstr ""
+"<b>У вас недостаточно свободного места для установки "
+"МСВСфера ОС</b>, даже если вы использовали все свободное пространство "
+", доступное на выбранном диске. Вы можете добавить дополнительные "
+"диски для получения дополнительного пространства, "
+"изменить выбранное программное обеспечение, чтобы установить уменьшенную "
+"версию МСВСфера ОС, или выйти из программы установки."
+
#: pyanaconda/modules/storage/bootloader/base.py:580
#: pyanaconda/modules/storage/bootloader/base.py:709
2 months ago
#, python-format
@@ -329,20 +381,20 @@ msgstr "Нет %s. Настройка сетевого экрана невозм
2 months ago
#: pyanaconda/ui/gui/spokes/installation_progress.py:120
#, python-format
msgid ""
-"%s is now successfully installed and ready for you to use!\n"
+"MSVSphere is now successfully installed and ready for you to use!\n"
2 months ago
"Go ahead and quit the application to start using it!"
msgstr ""
-"%s успешно установлено и готово к использованию!\n"
-"Выйдите из приложения и начните использовать его!"
+"МСВСфера ОС успешно установлено и готово к использованию!\n"
+"Необходимо выйти из приложения чтобы приступить к использованию!"
2 months ago
#: pyanaconda/ui/gui/spokes/installation_progress.py:115
#, python-format
msgid ""
-"%s is now successfully installed and ready for you to use!\n"
+"MSVSphere is now successfully installed and ready for you to use!\n"
2 months ago
"Go ahead and reboot your system to start using it!"
msgstr ""
-"%s успешно установлена и готова к использованию!\n"
-"Давайте, перезагружайте систему и начинайте использовать ее!"
+"МСВСфера ОС успешно установлена и готова к использованию!\n"
+"Необходимо перезагрузить систему чтобы приступить к использованию!"
2 months ago
#: pyanaconda/modules/storage/bootloader/base.py:436
#, python-format
@@ -449,12 +501,12 @@ msgstr ""
2 months ago
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:178
#, python-format
msgid ""
-"<b>You don't have enough space available to install %(productName)s</b>, "
+"<b>You don't have enough space available to install MSVSphere</b>, "
"even if you used all of the free space available on the selected disks. You "
"could add more disks for additional space, modify your software selection to "
"install a smaller version of <b>%(productName)s</b>, or quit the installer."
2 months ago
msgstr ""
-"<b>Недостаточно места для установки %(productName)s</b>, даже если "
+"<b>Недостаточно места для установки МСВСфера ОС</b>, даже если "
"использовать всё свободное место на выбранных дисках. Можно добавить ещё "
"диски, чтобы получить дополнительное место, изменить выбор программного "
"обеспечения, чтобы установить меньший вариант <b>%(productName)s</b>, или "
@@ -463,11 +515,11 @@ msgstr ""
2 months ago
#: pyanaconda/ui/gui/spokes/lib/storage_dialogs.py:142
#, python-format
msgid ""
-"<b>You don't have enough space available to install %s</b>. You can shrink "
+"<b>You don't have enough space available to install MSVSphere</b>. You can shrink "
2 months ago
"or remove existing partitions via our guided reclaim space tool, or you can "
"adjust your partitions on your own in the custom partitioning interface."
msgstr ""
-"<b>Недостаточно места для установки %s</b>. Можно уменьшить или удалить "
+"<b>Недостаточно места для установки МСВСфера ОС</b>. Можно уменьшить или удалить "
"существующие разделы с помощью помощника или самостоятельно выбрать размеры "
"разделов в окне настройки разделов."
@@ -5443,6 +5495,41 @@ msgstr "ДОБРО ПОЖАЛОВАТЬ"
msgid "WELCOME TO %(name)s %(version)s."
msgstr "ДОБРО ПОЖАЛОВАТЬ В %(name)s %(version)s."
2 months ago
+#: pyanaconda/ui/gui/spokes/welcome.py:213
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s Server"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Сервер"
+
+#: pyanaconda/ui/gui/spokes/welcome.py:215
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s Certified"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Сертифицированная"
+
+#: pyanaconda/ui/gui/spokes/welcome.py:217
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s ARM"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s АРМ"
+
+#: pyanaconda/ui/gui/spokes/welcome.py:219
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s Cinnamon"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s Cinnamon"
+
+#: pyanaconda/ui/gui/spokes/welcome.py:221
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s KDE"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s KDE"
+
+#: pyanaconda/ui/gui/spokes/welcome.py:223
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s XFCE"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s XFCE"
+
+#: pyanaconda/ui/gui/spokes/welcome.py:225
+#, python-format
+msgid "WELCOME TO MSVSphere %(version)s OS"
+msgstr "ДОБРО ПОЖАЛОВАТЬ В МСВСфера %(version)s ОС"
+
#: pyanaconda/ui/gui/spokes/network.py:1104
msgid "WEP"
msgstr "WEP"
@@ -5972,7 +6059,7 @@ msgid ""
"of available space, including <b>%(software)s</b> for software and "
"<b>%(swap)s</b> for swap space."
2 months ago
msgstr ""
-"Для установки <b>%(product)s</b> требуется <b>%(total)s</b>, в том числе "
+"Для установки <b>МСВСфера ОС</b> требуется <b>%(total)s</b>, в том числе "
"<b>%(software)s</b> для программ и <b>%(swap)s</b> для подкачки."
2 months ago
#: pyanaconda/ui/gui/spokes/lib/summary.glade:89
@@ -7249,6 +7336,31 @@ msgstr "{} смонтирован как {}"
msgid "{}. {}"
msgstr "{}. {}"
2 months ago
+#: data/liveinst/gnome/fedora-welcome.js:49
+msgid "Welcome to MSVSphere ARM 10.0!"
+msgstr "Добро пожаловать в МСВСфера АРМ 10.0!"
+
+#: data/liveinst/gnome/org.fedoraproject.welcome-screen.desktop:3
+msgid "Welcome to MSVSphere ARM 10.0"
+msgstr "Добро пожаловать в МСВСфера АРМ 10.0"
+
+#: data/liveinst/gnome/fedora-welcome.js:74
+msgid "Install MSVSphere…"
+msgstr "Установить МСВСфера…"
+
+#: data/liveinst/gnome/fedora-welcome.js:82
+msgid "Not Now"
+msgstr "Не сейчас"
+
+#: data/liveinst/gnome/fedora-welcome.js:61
+msgid ""
+"This live media can be used to install MSVSphere or as a temporary system. "
+"Installation can be started at any time using the install icon in Activities."
+msgstr ""
+"Этот интерактивный носитель можно использовать для установки МСВСфера ОС или в "
+"качестве временной системы. Установку можно начать в любое время, нажав на "
+"значок установки в разделе Действия."
+
#~ msgid "1 subscription attached to the system"
#~ msgstr "1 подписка прикреплена к системе"
@@ -8301,11 +8413,6 @@ msgstr "{}. {}"
#~ msgid "Error: $0"
#~ msgstr "Ошибка"
-#, fuzzy
-#~| msgid "Installed"
-#~ msgid "Install Fedora…"
-#~ msgstr "Установлено"
-
#, fuzzy
#~| msgid "Welcome to Fedora"
#~ msgid "Welcome to Fedora!"
diff --git a/pyanaconda/core/product.py b/pyanaconda/core/product.py
index 329b859..69965c7 100644
--- a/pyanaconda/core/product.py
+++ b/pyanaconda/core/product.py
@@ -16,6 +16,7 @@
# Red Hat, Inc.
#
import os
+import re
import configparser
from functools import cache
from collections import namedtuple
@@ -26,6 +27,8 @@ ProductData = namedtuple("ProductData", [
"name",
"version",
"short_name",
+ "flavor",
+ "base",
])
@@ -83,6 +86,7 @@ def get_product_values():
config.add_section("Main")
config.set("Main", "IsFinal", os.environ.get("ANACONDA_ISFINAL", "false"))
config.set("Main", "Product", os.environ.get("ANACONDA_PRODUCTNAME", "anaconda"))
+ config.set("Main", "Variant", os.environ.get("ANACONDA_PRODUCTVARIANT", ""))
config.set("Main", "Version", os.environ.get("ANACONDA_PRODUCTVERSION", "bluesky"))
# Now read in the .buildstamp file, wherever it may be.
@@ -91,12 +95,35 @@ def get_product_values():
# Set up some variables we import throughout, applying a couple transforms as necessary.
is_final_release = config.getboolean("Main", "IsFinal")
product_name = config.get("Main", "Product")
+ productVariant = config.get("Main", "Variant")
product_version = trim_product_version_for_ui(config.get("Main", "Version"))
+ # MSVSphere
+ if product_name.startswith("MSVSphere"):
+ productBase = "MSVSphere"
+ if product_name == "MSVSphere Server" or \
+ (product_name == "MSVSphere" and productVariant == "Minimal"):
+ productFlavor = "Server"
+ elif product_name == "MSVSphere" and productVariant == "Certified":
+ productFlavor = "Certified"
+ elif product_name == "MSVSphere" and productVariant == "BaseOS":
+ productFlavor = "OS"
+ elif product_name == "MSVSphere":
+ os_release = open("/etc/os-release", "r")
+ for line in os_release:
+ match = re.match("VERSION=.*\((.*?)\)", line)
+ if match:
+ productFlavor = match.group(1)
+ else:
+ productFlavor = "OS"
+ else:
+ productBase = product_name
+ productFlavor = None
+
# for use in device names, eg: "fedora", "rhel"
product_short_name = shorten_product_name(product_name)
2 months ago
- result = ProductData(is_final_release, product_name, product_version, product_short_name)
+ result = ProductData(is_final_release, product_name, product_version, product_short_name, productFlavor, productBase)
return result
2 months ago
@@ -114,3 +141,11 @@ def get_product_short_name():
2 months ago
def get_product_version():
return get_product_values().version
2 months ago
+
+
+def get_product_base():
+ return get_product_values().base
2 months ago
+
+
+def get_product_flavor():
+ return get_product_values().flavor
diff --git a/pyanaconda/ui/gui/spokes/installation_progress.glade b/pyanaconda/ui/gui/spokes/installation_progress.glade
index b7547dd..35ac4e7 100644
--- a/pyanaconda/ui/gui/spokes/installation_progress.glade
+++ b/pyanaconda/ui/gui/spokes/installation_progress.glade
@@ -129,7 +129,7 @@
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="valign">end</property>
- <property name="label">%s is now successfully installed and ready for you to use!
+ <property name="label">MSVSphere is now successfully installed and ready for you to use!
Go ahead and reboot to start using it!</property>
<property name="justify">right</property>
<property name="wrap">True</property>
diff --git a/pyanaconda/ui/gui/spokes/installation_progress.py b/pyanaconda/ui/gui/spokes/installation_progress.py
index 7cd1cd2..8d7cb6f 100644
--- a/pyanaconda/ui/gui/spokes/installation_progress.py
+++ b/pyanaconda/ui/gui/spokes/installation_progress.py
@@ -112,14 +112,14 @@ class ProgressSpoke(StandaloneSpoke):
# Set the reboot label.
if conf.target.is_hardware:
continue_text = _(
- "%s is now successfully installed and ready for you to use!\n"
+ "MSVSphere is now successfully installed and ready for you to use!\n"
"Go ahead and reboot your system to start using it!"
- ) % get_product_name()
+ )
else:
continue_text = _(
- "%s is now successfully installed and ready for you to use!\n"
+ "MSVSphere is now successfully installed and ready for you to use!\n"
"Go ahead and quit the application to start using it!"
- ) % get_product_name()
+ )
label = self.builder.get_object("rebootLabel")
label.set_text(continue_text)
diff --git a/pyanaconda/ui/gui/spokes/lib/storage_dialogs.py b/pyanaconda/ui/gui/spokes/lib/storage_dialogs.py
index 697b96d..ae911cf 100644
--- a/pyanaconda/ui/gui/spokes/lib/storage_dialogs.py
+++ b/pyanaconda/ui/gui/spokes/lib/storage_dialogs.py
@@ -140,10 +140,10 @@ class NeedSpaceDialog(InstallOptionsDialogBase):
self._set_free_space_labels(disk_free, fs_free)
label_text = _("<b>You don't have enough space available to install "
- "%s</b>. You can shrink or remove existing partitions "
+ "MSVSphere</b>. You can shrink or remove existing partitions "
"via our guided reclaim space tool, or you can adjust your "
"partitions on your own in the custom partitioning "
- "interface.") % escape_markup(get_product_name())
+ "interface.")
self.builder.get_object("need_space_options_label").set_markup(label_text)
self._add_modify_watcher(label)
@@ -164,9 +164,8 @@ class NoSpaceDialog(InstallOptionsDialogBase):
def refresh(self, required_space, sw_space, auto_swap, disk_free, fs_free):
label_text = self._get_sw_needs_text(required_space, sw_space, auto_swap)
label_text += (_(" You don't have enough space available to install "
- "<b>%(product)s</b>, even if you used all of the free space "
- "available on the selected disks.")
- % {"product": escape_markup(get_product_name())})
+ "<b>MSVSphere</b>, even if you used all of the free space "
+ "available on the selected disks."))
label = self.builder.get_object("no_space_desc_label")
label.set_markup(label_text)
@@ -176,12 +175,11 @@ class NoSpaceDialog(InstallOptionsDialogBase):
self._set_free_space_labels(disk_free, fs_free)
label_text = _("<b>You don't have enough space available to install "
- "%(productName)s</b>, even if you used all of the free space "
+ "MSVSphere</b>, even if you used all of the free space "
"available on the selected disks. You could add more "
"disks for additional space, "
"modify your software selection to install a smaller "
- "version of <b>%(productName)s</b>, or quit the installer.") % \
- {"productName": escape_markup(get_product_name())}
+ "version of <b>MSVSphere</b>, or quit the installer.")
self.builder.get_object("no_space_options_label").set_markup(label_text)
self._add_modify_watcher(label)
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index e9f02a0..a5bb893 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -35,7 +35,7 @@ from pyanaconda.ui.gui.spokes.lib.lang_locale_handler import LangLocaleHandler
from pyanaconda import localization
from pyanaconda.ui.helpers import get_distribution_text
from pyanaconda.core.product import get_product_is_final_release, get_product_name, \
- get_product_version
+ get_product_version, get_product_flavor, get_product_base
from pyanaconda import flags
from pyanaconda.core.i18n import _
from pyanaconda.core.util import ipmi_abort
@@ -205,8 +205,30 @@ class WelcomeLanguageSpoke(StandaloneSpoke, LangLocaleHandler):
# The welcome label is special - it has text that needs to be substituted.
welcomeLabel = self.builder.get_object("welcomeLabel")
- welcomeLabel.set_text(_("WELCOME TO %(name)s %(version)s.") %
- {"name" : get_product_name().upper(), "version" : get_product_version()})
+ # MSVSphere
+# welcomeLabel.set_text(_("WELCOME TO %(name)s %(version)s.") %
+# {"name" : get_product_name().upper(), "version" : get_product_version()})
+ productBase = get_product_base()
+ productFlavor = get_product_flavor()
2 months ago
+
+ if productBase == "MSVSphere" and productFlavor == "Server":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s Server")
+ elif productBase == "MSVSphere" and productFlavor == "Certified":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s Certified")
+ elif productBase == "MSVSphere" and productFlavor == "ARM":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s ARM")
+ elif productBase == "MSVSphere" and productFlavor == "Cinnamon":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s Cinnamon")
+ elif productBase == "MSVSphere" and productFlavor == "KDE":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s KDE")
+ elif productBase == "MSVSphere" and productFlavor == "XFCE":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s XFCE")
+ elif productBase == "MSVSphere" and productFlavor == "OS":
+ welcome_text = _("WELCOME TO MSVSphere %(version)s OS")
+ else:
+ welcome_text = _("WELCOME TO %(name)s %(version)s")
+ welcomeLabel.set_text(welcome_text %
+ {"name" : get_product_name().upper(), "version" : get_product_version()})
# Retranslate the language (filtering) entry's placeholder text
languageEntry = self.builder.get_object("languageEntry")
diff --git a/pyanaconda/ui/helpers.py b/pyanaconda/ui/helpers.py
index 5d617e6..563847a 100644
--- a/pyanaconda/ui/helpers.py
+++ b/pyanaconda/ui/helpers.py
@@ -60,14 +60,33 @@ from pyanaconda.core import constants
from pyanaconda.core.constants import DRACUT_REPO_DIR
from pyanaconda.core.i18n import _
from pyanaconda.core.path import join_paths
-from pyanaconda.core.product import get_product_name, get_product_version
+from pyanaconda.core.product import get_product_name, get_product_version, get_product_flavor, get_product_base
from pyanaconda.core.payload import create_nfs_url, create_hdd_url
from pyanaconda.modules.common.structures.payload import RepoConfigurationData
from pyanaconda.ui.lib.payload import create_source, set_source, tear_down_sources
def get_distribution_text():
- return _("%(productName)s %(productVersion)s INSTALLATION") % {
+ productBase = get_product_base()
+ productFlavor = get_product_flavor()
2 months ago
+
+ if productBase == "MSVSphere" and productFlavor == "Server":
+ distro_text = _("MSVSphere %(productVersion)s Server INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "Certified":
+ distro_text = _("MSVSphere %(productVersion)s Certified INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "ARM":
+ distro_text = _("MSVSphere %(productVersion)s ARM INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "Cinnamon":
+ distro_text = _("MSVSphere %(productVersion)s Cinnamon INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "KDE":
+ distro_text = _("MSVSphere %(productVersion)s KDE INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "XFCE":
+ distro_text = _("MSVSphere %(productVersion)s XFCE INSTALLATION")
+ elif productBase == "MSVSphere" and productFlavor == "OS":
+ distro_text = _("MSVSphere %(productVersion)s OS INSTALLATION")
+ else:
+ distro_text = _("%(productName)s %(productVersion)s INSTALLATION")
+ return distro_text % {
"productName": get_product_name().upper(),
"productVersion": get_product_version().upper()
}
2 months ago
--
2.43.5