Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../proc/self/root/etc/profile....
File: lang.sh
# /etc/profile.d/lang.sh - exports environment variables, and provides fallback
[0] Fix | Delete
# for CJK languages that can't be displayed in console.
[1] Fix | Delete
[2] Fix | Delete
if [ -n "${LANG}" ]; then
[3] Fix | Delete
LANG_backup="${LANG}"
[4] Fix | Delete
fi
[5] Fix | Delete
[6] Fix | Delete
for config in /etc/locale.conf "${HOME}/.i18n"; do
[7] Fix | Delete
# NOTE: We are using eval & sed here to avoid invoking of any commands & functions from those files.
[8] Fix | Delete
if [ -f "${config}" ]; then
[9] Fix | Delete
eval $(/usr/bin/sed -r -e 's/^[[:blank:]]*([[:upper:]_]+)=([[:print:][:digit:]\._-]+|"[[:print:][:digit:]\._-]+")/export \1=\2/;t;d' ${config})
[10] Fix | Delete
fi
[11] Fix | Delete
done
[12] Fix | Delete
[13] Fix | Delete
if [ -n "${LANG_backup}" ]; then
[14] Fix | Delete
LANG="${LANG_backup}"
[15] Fix | Delete
fi
[16] Fix | Delete
[17] Fix | Delete
unset LANG_backup config
[18] Fix | Delete
[19] Fix | Delete
# ----------------------------------------------
[20] Fix | Delete
[21] Fix | Delete
# The LC_ALL is not supposed to be set in /etc/locale.conf according to 'man 5 locale.conf'.
[22] Fix | Delete
# If it is set, then we we expect it is user's explicit override (most likely from ~/.i18n file).
[23] Fix | Delete
# See 'man 7 locale' for more info about LC_ALL.
[24] Fix | Delete
if [ -n "${LC_ALL}" ]; then
[25] Fix | Delete
if [ "${LC_ALL}" != "${LANG}" ]; then
[26] Fix | Delete
export LC_ALL
[27] Fix | Delete
else
[28] Fix | Delete
unset LC_ALL
[29] Fix | Delete
fi
[30] Fix | Delete
fi
[31] Fix | Delete
[32] Fix | Delete
# The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*):
[33] Fix | Delete
if [ -n "${LANG}" ] && [ "${TERM}" = 'linux' ] && /usr/bin/tty | /usr/bin/grep --quiet -e '/dev/tty'; then
[34] Fix | Delete
if /usr/bin/grep --quiet -E -i -e '^.+\.utf-?8$' <<< "${LANG}"; then
[35] Fix | Delete
case ${LANG} in
[36] Fix | Delete
ja*) LANG=en_US.UTF-8 ;;
[37] Fix | Delete
ko*) LANG=en_US.UTF-8 ;;
[38] Fix | Delete
si*) LANG=en_US.UTF-8 ;;
[39] Fix | Delete
zh*) LANG=en_US.UTF-8 ;;
[40] Fix | Delete
ar*) LANG=en_US.UTF-8 ;;
[41] Fix | Delete
fa*) LANG=en_US.UTF-8 ;;
[42] Fix | Delete
he*) LANG=en_US.UTF-8 ;;
[43] Fix | Delete
en_IN*) true ;;
[44] Fix | Delete
*_IN*) LANG=en_US.UTF-8 ;;
[45] Fix | Delete
esac
[46] Fix | Delete
else
[47] Fix | Delete
case ${LANG} in
[48] Fix | Delete
ja*) LANG=en_US ;;
[49] Fix | Delete
ko*) LANG=en_US ;;
[50] Fix | Delete
si*) LANG=en_US ;;
[51] Fix | Delete
zh*) LANG=en_US ;;
[52] Fix | Delete
ar*) LANG=en_US ;;
[53] Fix | Delete
fa*) LANG=en_US ;;
[54] Fix | Delete
he*) LANG=en_US ;;
[55] Fix | Delete
en_IN*) true ;;
[56] Fix | Delete
*_IN*) LANG=en_US ;;
[57] Fix | Delete
esac
[58] Fix | Delete
fi
[59] Fix | Delete
[60] Fix | Delete
# NOTE: We are not exporting the ${LANG} here again on purpose.
[61] Fix | Delete
# If user starts GUI session from console manually, then
[62] Fix | Delete
# the previously set LANG should be okay to use.
[63] Fix | Delete
fi
[64] Fix | Delete
[65] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function