1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
From 05da7c284dbdeeea895084b4d6b91d8783a66aae Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Mon, 30 Jul 2018 14:57:38 +0800
Subject: [PATCH 61/65] Tweak label name
In yocto, the product name is too long, which enlarge
the gui window, short them.
Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
pyanaconda/product.py | 4 ++++
pyanaconda/ui/gui/spokes/welcome.py | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/product.py b/pyanaconda/product.py
index 9d97dab..5548f99 100644
--- a/pyanaconda/product.py
+++ b/pyanaconda/product.py
@@ -52,6 +52,10 @@ if productVersion == "development":
productVersion = "rawhide"
def distributionText():
+ if '(' in productName and ')' in productName:
+ return _("%(productName)s %(productVersion)s INSTALLATION") % \
+ {"productName": productName.split()[0], "productVersion": productVersion}
+
return _("%(productName)s %(productVersion)s INSTALLATION") % \
{"productName": productName, "productVersion": productVersion}
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index dddc83b..71822c8 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -37,7 +37,7 @@ from pyanaconda import flags
from pyanaconda import geoloc
from pyanaconda.core.i18n import _, C_
from pyanaconda.core.util import is_unsupported_hw, ipmi_abort
-from pyanaconda.core.constants import DEFAULT_LANG, WINDOW_TITLE_TEXT
+from pyanaconda.core.constants import DEFAULT_LANG, WINDOW_TITLE_TEXT, shortProductName
from pyanaconda.modules.common.constants.services import TIMEZONE, LOCALIZATION
from pyanaconda.anaconda_loggers import get_module_logger
@@ -236,7 +236,7 @@ class WelcomeLanguageSpoke(LangLocaleHandler, StandaloneSpoke):
welcomeLabel = self.builder.get_object("welcomeLabel")
welcomeLabel.set_text(_("WELCOME TO %(name)s %(version)s.") %
- {"name" : productName.upper(), "version" : productVersion}) # pylint: disable=no-member
+ {"name" : shortProductName.upper(), "version" : productVersion}) # pylint: disable=no-member
# Retranslate the language (filtering) entry's placeholder text
languageEntry = self.builder.get_object("languageEntry")
--
2.7.4
|