Added Russian translation to live bootloader

i9 changed/i9/lorax-templates-msvsphere-9.0-37.el9.3
Arkady L. Shane 1 year ago
parent fce1d15b74
commit d6b5971250
Signed by: tigro
GPG Key ID: 9C7900103E1C4F8B

@ -0,0 +1,158 @@
diff -urN lorax-templates-rhel-9.0.orig/80-rhel/live/config_files/x86/grub2-efi.cfg lorax-templates-rhel-9.0/80-rhel/live/config_files/x86/grub2-efi.cfg
--- lorax-templates-rhel-9.0.orig/80-rhel/live/config_files/x86/grub2-efi.cfg 2023-07-28 20:35:07.103636648 +0200
+++ lorax-templates-rhel-9.0/80-rhel/live/config_files/x86/grub2-efi.cfg 2023-07-28 20:35:23.085949165 +0200
@@ -9,7 +9,12 @@
}
load_video
+insmod gfxterm
+set gfxmode=auto
set gfxpayload=keep
+set lang=ru_RU
+terminal_output gfxterm
+loadfont unicode
insmod gzio
insmod part_gpt
insmod ext2
@@ -20,11 +25,11 @@
search --no-floppy --set=root -l '@ISOLABEL@'
### BEGIN /etc/grub.d/10_linux ###
-menuentry 'Start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+menuentry 'Запустить @PRODUCT@ @VERSION@@FLAVOR@' --class fedora --class gnu-linux --class gnu --class os {
linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image quiet
initrdefi @INITRDPATH@
}
-menuentry 'Test this media & start @PRODUCT@ @VERSION@' --class fedora --class gnu-linux --class gnu --class os {
+menuentry 'Проверить носитель и запустить @PRODUCT@ @VERSION@@FLAVOR@' --class fedora --class gnu-linux --class gnu --class os {
linuxefi @KERNELPATH@ @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet
initrdefi @INITRDPATH@
}
diff -urN lorax-templates-rhel-9.0.orig/80-rhel/live/config_files/x86/isolinux.cfg lorax-templates-rhel-9.0/80-rhel/live/config_files/x86/isolinux.cfg
--- lorax-templates-rhel-9.0.orig/80-rhel/live/config_files/x86/isolinux.cfg 2023-07-28 20:35:07.103636648 +0200
+++ lorax-templates-rhel-9.0/80-rhel/live/config_files/x86/isolinux.cfg 2023-07-28 20:35:23.085949165 +0200
@@ -1,6 +1,8 @@
default vesamenu.c32
timeout 600
+font cp866-8x16.psf
+
display boot.msg
# Clear the screen when exiting the menu, instead of leaving the menu displayed.
@@ -8,7 +10,7 @@
# the menu itself for as long as the screen remains in graphics mode.
menu clear
menu background splash.png
-menu title @PRODUCT@ @VERSION@
+menu title @PRODUCT@ @VERSION@@FLAVOR@
menu vshift 8
menu rows 18
menu margin 8
@@ -53,18 +55,18 @@
# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message.
-menu tabmsg Press Tab for full configuration options on menu items.
+menu tabmsg Нажмите [Tab] для просмотра конфигурации выбранного пункта меню.
menu separator # insert an empty line
menu separator # insert an empty line
label linux
- menu label ^Start @PRODUCT@ @VERSION@
+ menu label ^1. Запустить @PRODUCT@ @VERSION@@FLAVOR@
kernel vmlinuz
append initrd=initrd.img @ROOT@ @EXTRA@ rd.live.image quiet
label check
- menu label Test this ^media & start @PRODUCT@ @VERSION@
+ menu label ^2. Проверить носитель и запустить @PRODUCT@ @VERSION@@FLAVOR@
menu default
kernel vmlinuz
append initrd=initrd.img @ROOT@ @EXTRA@ rd.live.image rd.live.check quiet
@@ -72,29 +74,30 @@
menu separator # insert an empty line
# utilities submenu
-menu begin ^Troubleshooting
- menu title Troubleshooting
+menu begin Устранение неполадок
+ menu title Устранение неполадок
+ menu label ^3. Устранение неполадок
label memtest
- menu label Run a ^memory test
+ menu label ^3. Запустить тест оперативной памяти
text help
- If your system is having issues, a problem with your
- system's memory may be the cause. Use this utility to
- see if the memory is working correctly.
+ Проблемы со стабильностью операционной системы могут
+ быть вызваны неисправностью оперативной памяти. Эта
+ утилита позволяет проверить корректность работы ОЗУ.
endtext
kernel memtest
menu separator # insert an empty line
label local
- menu label Boot from ^local drive
+ menu label ^4. Загрузка с локального диска
localboot 0xffff
menu separator # insert an empty line
menu separator # insert an empty line
label returntomain
- menu label Return to ^main menu
+ menu label ^0. Вернуться в главное меню
menu exit
menu end
diff -urN lorax-templates-rhel-9.0.orig/80-rhel/live/efi.tmpl lorax-templates-rhel-9.0/80-rhel/live/efi.tmpl
--- lorax-templates-rhel-9.0.orig/80-rhel/live/efi.tmpl 2023-07-28 20:35:07.103636648 +0200
+++ lorax-templates-rhel-9.0/80-rhel/live/efi.tmpl 2023-07-28 20:35:23.085949165 +0200
@@ -39,7 +39,13 @@
copy ${KERNELDIR}/initrd.img ${EFIBOOTDIR}
%endif
install ${configdir}/grub2-efi.cfg ${eficonf}
+ %if product.name == 'MSVSphere':
+ replace @PRODUCT@ 'МСВСфера' ${eficonf}
+ replace @FLAVOR@ ' АРМ' ${eficonf}
+ %else:
replace @PRODUCT@ '${product.name}' ${eficonf}
+ replace @FLAVOR@ '' ${eficonf}
+ %endif
replace @VERSION@ ${product.version} ${eficonf}
replace @KERNELNAME@ vmlinuz ${eficonf}
replace @KERNELPATH@ /${kdir}/vmlinuz ${eficonf}
diff -urN lorax-templates-rhel-9.0.orig/80-rhel/live/x86.tmpl lorax-templates-rhel-9.0/80-rhel/live/x86.tmpl
--- lorax-templates-rhel-9.0.orig/80-rhel/live/x86.tmpl 2023-07-28 20:35:07.104636668 +0200
+++ lorax-templates-rhel-9.0/80-rhel/live/x86.tmpl 2023-07-28 20:35:23.085949165 +0200
@@ -42,12 +42,24 @@
install usr/share/anaconda/boot/syslinux-splash.png ${BOOTDIR}/splash.png
install boot/memtest* ${BOOTDIR}/memtest
+## add a console font with Russian (cp866) encoding support
+install ${configdir}/cp866-8x16.psf ${BOOTDIR}
+
## configure bootloader
replace @VERSION@ ${product.version} ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
-replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub.conf ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
+%if product.name == 'MSVSphere':
+replace @PRODUCT@ 'МСВСфера' ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
+replace @FLAVOR@ ' АРМ' ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
+%else:
+replace @PRODUCT@ '${product.name}' ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
+%endif
+replace @PRODUCT@ '${product.name}' ${BOOTDIR}/grub.conf
replace @ROOT@ 'root=live:CDLABEL=${isolabel|udev}' ${BOOTDIR}/isolinux.cfg
replace @EXTRA@ '${extra_boot_args}' ${BOOTDIR}/isolinux.cfg
+## convert BIOS bootloader configs to cp866 encoding
+iconv 'cp866' ${BOOTDIR}/isolinux.cfg ${BOOTDIR}/*.msg
+
## install kernels
mkdir ${KERNELDIR}
%for kernel in kernels:

@ -1,6 +1,6 @@
Name: lorax-templates-msvsphere
Version: 9.0
Release: 37%{?dist}.2
Release: 37%{?dist}.3
Summary: MSVSphere 9 build templates for lorax and livemedia-creator
License: GPLv2+
@ -13,6 +13,7 @@ Source1: cp866-8x16.psf
Patch1001: 0001-Remove-RHEL-specific-packages.patch
Patch1002: 0002-Disable-oscap-anaconda-addon-install.patch
Patch1003: 0003-Translate-installation-image-bootloader-to-Russian.patch
Patch1004: 0004-Translate-live-image-bootloader-to-Russian.patch
# Required for the template branding support
# Required for Russian localization
@ -30,6 +31,7 @@ placed in %{templatedir}
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%build
# nothing to build
@ -45,7 +47,10 @@ install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{templatedir}/config_files/x86/
%{templatedir}/*
%changelog
* Fri Jul 28 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 9.0.37.2
* Fri Jul 28 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 9.0-37.3
- Added Russian translation to live bootloader
* Fri Jul 28 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 9.0-37.2
- Added proper image type identification for BaseOS and Minimal variants
* Wed Jul 26 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 9.0-37.1

Loading…
Cancel
Save