Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anton Palgunov
mkimage-profiles
Commits
415d96da
Commit
415d96da
authored
Feb 17, 2023
by
Anton Midyukov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grub, l10n: available only languages from $LOCALES in grub and installer
See also:
https://bugzilla.altlinux.org/45290
parent
0e780045
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
2 deletions
+45
-2
86lang.cfg
features.in/grub/cfg.in/86lang.cfg
+9
-1
generate.mk
features.in/grub/generate.mk
+4
-1
50-l10n-sysconfig
features.in/l10n/install2/image-scripts.d/50-l10n-sysconfig
+16
-0
50-l10n-sysconfig
features.in/l10n/rootfs/image-scripts.d/50-l10n-sysconfig
+16
-0
No files found.
features.in/grub/cfg.in/86lang.cfg
View file @
415d96da
submenu $"Change language (press F2)" --hotkey 'f2' --id 'lang' {
insmod regexp
for langstr in "ru_RU=Russian" "en_US=English" "pt_BR=Portuguese" "uk_UA=Ukrainian"; do
for langstr in \
"ru_RU=Russian" \
"en_US=English" \
"pt_BR=Portuguese" \
"uk_UA=Ukrainian" \
; do
regexp -s 2:langname -s 1:langcode '(.*)=(.*)' "$langstr"
for locale in @LOCALES@; do
if [ "$locale" != "$langcode" ]; then continue; fi
menuentry "${langname}" "$langcode" {
lang="$2"
export lang
configfile ${prefix}/grub.cfg
}
done
done
menuentry $"Return to the Main menu" {
configfile ${prefix}/grub.cfg
}
...
...
features.in/grub/generate.mk
View file @
415d96da
...
...
@@ -25,7 +25,7 @@ ifneq (,$(GRUB_UI))
GRUB_CFG := $(GRUB_CFG) gfxterm
endif
ifneq (,$(LOCALE))
ifneq (,$(LOCALE
S
))
GRUB_CFG := $(GRUB_CFG) lang
endif
...
...
@@ -103,6 +103,9 @@ bootargs: clean
sed -i "s, lang=.lang,,g" $(DSTCFGS); \
fi; \
sed -i "/lang=@LOCALE@/d" $(DSTCFGS)
@if [ -n "$(LOCALES)" ]; then \
sed -i "s,@LOCALES@,$(LOCALES),g" $(DSTCFGS); \
fi
@GRUBTHEME=$(GRUBTHEME); \
[ -n "$$GRUBTHEME" ] || GRUBTHEME=$$(cut -d "-" -f2 <<< $(BRANDING)); \
sed -i "s,@grubtheme@,$$GRUBTHEME,g" $(DSTCFGS)
...
...
features.in/l10n/install2/image-scripts.d/50-l10n-sysconfig
0 → 100755
View file @
415d96da
#!/bin/bash
langlist
=
"/etc/alterator/sysconfig/lang/langlist.all"
langlist_temp
=
"
$langlist
"
.temp
locales
=
"
$GLOBAL_LOCALES
"
[
-f
"
$langlist
"
]
||
exit
0
[
-n
"
$locales
"
]
||
exit
0
rm
-f
"
$langlist_temp
"
for
lang
in
$locales
;
do
grep
-q
"
$lang
"
"
$langlist
"
&&
grep
"
$lang
"
"
$langlist
"
>>
"
$langlist_temp
"
done
mv
"
$langlist_temp
"
"
$langlist
"
features.in/l10n/rootfs/image-scripts.d/50-l10n-sysconfig
0 → 100755
View file @
415d96da
#!/bin/bash
langlist
=
"/etc/alterator/sysconfig/lang/langlist.all"
langlist_temp
=
"
$langlist
"
.temp
locales
=
"
$GLOBAL_LOCALES
"
[
-f
"
$langlist
"
]
||
exit
0
[
-n
"
$locales
"
]
||
exit
0
rm
-f
"
$langlist_temp
"
for
lang
in
$locales
;
do
grep
-q
"
$lang
"
"
$langlist
"
&&
grep
"
$lang
"
"
$langlist
"
>>
"
$langlist_temp
"
done
mv
"
$langlist_temp
"
"
$langlist
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment