Skip to content

Commit fb6af1a

Browse files
author
Andreas Poulsen
committed
Language variability in adjust_settings_access
1 parent 7a5bda5 commit fb6af1a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

os2borgerpc/sikkerhed/adjust_settings_access.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,20 @@ else # Remove access to settings
4141
4242
USER=\$(id -un)
4343
44+
# Extract the line in /etc/default/locale where LANG is set
45+
LOCALE_VAR=\$(grep LANG= /etc/default/locale)
46+
47+
# Set the info text based on the chosen language
48+
if echo \$LOCALE_VAR | grep sv; then
49+
INFO="Systeminställningarna är inte tillgängliga för allmänheten.\n\nKontakta personalen om det uppstår problem."
50+
elif echo \$LOCALE_VAR | grep en; then
51+
INFO="The settings are not accessible to the public.\n\nContact the staff if there are issues."
52+
else
53+
INFO="Systemindstillingerne er ikke tilgængelige for publikum.\n\nKontakt personalet, hvis der er problemer."
54+
fi
55+
4456
if [ \$USER == "user" ]; then
45-
zenity --info --text="Systemindstillingerne er ikke tilgængelige for publikum.\n\n Kontakt personalet, hvis der er problemer."
57+
zenity --info --text="\$INFO"
4658
else
4759
/usr/bin/gnome-control-center.real
4860
fi

0 commit comments

Comments
 (0)