Fix translations and FLAVOUR detection

i10-beta changed/i10-beta/lorax-templates-msvsphere-10.0-52.el10.1
Arkady L. Shane 2 weeks ago
parent 89f47b6d73
commit 87d3d69add
Signed by: tigro
GPG Key ID: 1EC08A25C9DB2503

@ -1,17 +1,17 @@
From 043884dd1c10537ccdca06943d9cea4b350450b9 Mon Sep 17 00:00:00 2001
From 675effa97f762b5f2bfc6e7244d2035e4ec3ddd4 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <evgeniy.zamriy@softline.com>
Date: Wed, 26 Jul 2023 23:51:00 +0300
Subject: [PATCH 2/8] Translate installation image bootloader to Russian
Subject: [PATCH 2/2] Translate installation image bootloader to Russian
---
80-rhel/aarch64.tmpl | 12 +++++++++-
80-rhel/config_files/aarch64/grub2-efi.cfg | 15 ++++++++----
80-rhel/config_files/x86/grub2-bios.cfg | 17 ++++++++-----
80-rhel/config_files/x86/grub2-efi.cfg | 13 ++++++----
80-rhel/config_files/x86/grub2-bios.cfg | 19 +++++++++------
80-rhel/config_files/x86/grub2-efi.cfg | 15 ++++++++----
80-rhel/config_files/x86/isolinux.cfg | 28 ++++++++++++----------
80-rhel/efi.tmpl | 9 ++++++-
80-rhel/x86.tmpl | 12 +++++++++-
7 files changed, 76 insertions(+), 30 deletions(-)
80-rhel/x86.tmpl | 23 ++++++++++++++++--
7 files changed, 88 insertions(+), 33 deletions(-)
diff --git a/80-rhel/aarch64.tmpl b/80-rhel/aarch64.tmpl
index 14099d6..353436a 100644
@ -87,7 +87,7 @@ index 1ce5d33..5dd2002 100644
initrd @INITRDPATH@
}
diff --git a/80-rhel/config_files/x86/grub2-bios.cfg b/80-rhel/config_files/x86/grub2-bios.cfg
index cfca1bf..8b8c0ef 100644
index cfca1bf..30dcd9e 100644
--- a/80-rhel/config_files/x86/grub2-bios.cfg
+++ b/80-rhel/config_files/x86/grub2-bios.cfg
@@ -5,7 +5,12 @@ function load_video {
@ -118,8 +118,9 @@ index cfca1bf..8b8c0ef 100644
initrd @INITRDPATH@
}
-submenu 'Troubleshooting -->' {
- menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
+submenu 'Устранение неполадок -->' {
menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
+ menuentry 'Установить @PRODUCT@ @VERSION@ (базовый графический режим)' --class fedora --class gnu-linux --class gnu --class os {
linux @KERNELPATH@ @ROOT@ nomodeset quiet
initrd @INITRDPATH@
}
@ -138,7 +139,7 @@ index cfca1bf..8b8c0ef 100644
}
}
diff --git a/80-rhel/config_files/x86/grub2-efi.cfg b/80-rhel/config_files/x86/grub2-efi.cfg
index 8c9adad..0d5bd2d 100644
index 8c9adad..b174e48 100644
--- a/80-rhel/config_files/x86/grub2-efi.cfg
+++ b/80-rhel/config_files/x86/grub2-efi.cfg
@@ -9,7 +9,12 @@ function load_video {
@ -169,8 +170,9 @@ index 8c9adad..0d5bd2d 100644
initrdefi @INITRDPATH@
}
-submenu 'Troubleshooting -->' {
- menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
+submenu 'Устранение неполадок -->' {
menuentry 'Install @PRODUCT@ @VERSION@ in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
+ menuentry 'Установить @PRODUCT@ @VERSION@ (базовый графический режим)' --class fedora --class gnu-linux --class gnu --class os {
linuxefi @KERNELPATH@ @ROOT@ nomodeset quiet
initrdefi @INITRDPATH@
}
@ -299,7 +301,7 @@ index 80600d2..d36aefa 100644
replace @KERNELNAME@ vmlinuz ${eficonf}
replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf}
diff --git a/80-rhel/x86.tmpl b/80-rhel/x86.tmpl
index 3945ce4..9dbd419 100644
index 3945ce4..b83a484 100644
--- a/80-rhel/x86.tmpl
+++ b/80-rhel/x86.tmpl
@@ -22,6 +22,16 @@ if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
@ -319,7 +321,27 @@ index 3945ce4..9dbd419 100644
%>
mkdir images
@@ -60,7 +70,7 @@ replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUB2DIR}/grub.cfg
@@ -42,9 +52,18 @@ mkdir ${KERNELDIR}
## configure grub2 config file
mkdir ${GRUB2DIR}
+mkdir ${GRUB2DIR}/fonts/
+mkdir ${GRUB2DIR}/locale/
+install usr/share/grub/unicode.pf2 ${GRUB2DIR}/fonts/
+install /usr/share/locale/ru/LC_MESSAGES/grub.mo ${GRUB2DIR}/locale/ru.mo
install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
-replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
+%if product.name in ("MSVSphere", "MSVSphere Server"):
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/grub.cfg
+%else:
+replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
+%endif
+replace @FLAVOR@ '${FLAVOR}' ${GRUB2DIR}/grub.cfg
replace @KERNELPATH@ /${KERNELDIR}/vmlinuz ${GRUB2DIR}/grub.cfg
replace @INITRDPATH@ /${KERNELDIR}/initrd.img ${GRUB2DIR}/grub.cfg
replace @ISOLABEL@ '${isolabel}' ${GRUB2DIR}/grub.cfg
@@ -60,7 +79,7 @@ replace @ROOT@ 'inst.stage2=hd:LABEL=${isolabel|udev}' ${GRUB2DIR}/grub.cfg
<% efiarch64 = 'X64' %>
%endif
%if (efiarch32 or efiarch64):

@ -1,16 +1,16 @@
From 7dd752779308586b809b7afaa13e692c2edab5cb Mon Sep 17 00:00:00 2001
From 936994d7fcb092945885e876ba40ecf38bb7831f Mon Sep 17 00:00:00 2001
From: tigro <arkadiy.sheyn@softline.com>
Date: Sat, 29 Jul 2023 15:34:37 +0200
Subject: [PATCH 3/8] Translate live image bootloader to Russian
Subject: [PATCH 3/3] Translate live image bootloader to Russian
---
80-rhel/live/aarch64.tmpl | 12 ++++++++++-
.../live/config_files/aarch64/grub2-efi.cfg | 13 ++++++++----
80-rhel/live/config_files/x86/grub2-bios.cfg | 21 +++++++++----------
80-rhel/live/config_files/x86/grub2-efi.cfg | 13 ++++++++----
80-rhel/live/efi.tmpl | 6 ++++++
80-rhel/live/x86.tmpl | 12 ++++++++++-
6 files changed, 56 insertions(+), 21 deletions(-)
80-rhel/live/aarch64.tmpl | 12 +++++-
.../live/config_files/aarch64/grub2-efi.cfg | 13 ++++--
80-rhel/live/config_files/x86/grub2-bios.cfg | 21 +++++-----
80-rhel/live/config_files/x86/grub2-efi.cfg | 13 ++++--
80-rhel/live/efi.tmpl | 6 +++
80-rhel/live/x86.tmpl | 40 ++++++++++++++++++-
6 files changed, 83 insertions(+), 22 deletions(-)
diff --git a/80-rhel/live/aarch64.tmpl b/80-rhel/live/aarch64.tmpl
index d1a3f87..f8bb655 100644
@ -183,7 +183,7 @@ index 813f91e..50f95e6 100644
replace @KERNELNAME@ vmlinuz ${eficonf}
replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf}
diff --git a/80-rhel/live/x86.tmpl b/80-rhel/live/x86.tmpl
index cf4dad4..277391b 100644
index cf4dad4..30462ec 100644
--- a/80-rhel/live/x86.tmpl
+++ b/80-rhel/live/x86.tmpl
@@ -22,6 +22,16 @@ if os.stat(joinpaths(inroot, runtime_img)).st_size >= 4*1024**3:
@ -203,7 +203,44 @@ index cf4dad4..277391b 100644
%>
mkdir ${LIVEDIR}
@@ -66,7 +76,7 @@ replace @EXTRA@ '${extra_boot_args}' ${GRUB2DIR}/grub.cfg
@@ -47,9 +57,35 @@ mkdir ${KERNELDIR}
## configure grub2 config file
mkdir ${GRUB2DIR}
+mkdir ${GRUB2DIR}/fonts/
+mkdir ${GRUB2DIR}/locale/
+install usr/share/grub/unicode.pf2 ${GRUB2DIR}/fonts/
+install /usr/share/locale/ru/LC_MESSAGES/grub.mo ${GRUB2DIR}/locale/ru.mo
install ${configdir}/grub2-bios.cfg ${GRUB2DIR}/grub.cfg
replace @VERSION@ ${product.version} ${GRUB2DIR}/grub.cfg
-replace @PRODUCT@ '${product.name}' ${GRUB2DIR}/grub.cfg
+%if product.name == 'MSVSphere GNOME':
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/grub.cfg
+replace @FLAVOR@ ' GNOME' ${GRUB2DIR}/grub.conf
+%endif
+%if product.name == 'MSVSphere Cinnamon':
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/grub.conf
+replace @FLAVOR@ ' Cinnamon' ${GRUB2DIR}/grub.conf
+%endif
+%if product.name == 'MSVSphere KDE':
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/grub.conf
+replace @FLAVOR@ ' KDE' ${GRUB2DIR}/grub.conf
+%endif
+%if product.name == 'MSVSphere XFCE':grub.conf
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/grub.conf
+replace @FLAVOR@ ' XFCE' ${GRUB2DIR}/grub.conf
+%endif
+%if product.name == 'MSVSphere ARM':
+replace @PRODUCT@ 'МСВСфера' ${GRUB2DIR}/grub.conf
+replace @FLAVOR@ ' АРМ' ${GRUB2DIR}/grub.conf
+%else:
+replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub.conf
+replace @FLAVOR@ '' ${BOOTDIR}/grub.conf
+%endif
replace @KERNELPATH@ /${KERNELDIR}/vmlinuz ${GRUB2DIR}/grub.cfg
replace @INITRDPATH@ /${KERNELDIR}/initrd.img ${GRUB2DIR}/grub.cfg
replace @ISOLABEL@ '${isolabel}' ${GRUB2DIR}/grub.cfg
@@ -66,7 +102,7 @@ replace @EXTRA@ '${extra_boot_args}' ${GRUB2DIR}/grub.cfg
<% efiarch64 = 'X64' %>
%endif
%if (efiarch32 or efiarch64):

Loading…
Cancel
Save