101 lines
2.9 KiB
Diff
101 lines
2.9 KiB
Diff
|
|
From b22cf3a3665fe6a3b05c1188a91db884b5a18c72 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Martin Osvald <mosvald@redhat.com>
|
||
|
|
Date: Thu, 29 Aug 2019 12:42:33 +0200
|
||
|
|
Subject: [PATCH 20/23] lang.csh: fix several variable substitution bugs and
|
||
|
|
typos (#1746749)
|
||
|
|
|
||
|
|
---
|
||
|
|
lang.csh | 73 ++++++++++++++++++++++++++++----------------------------
|
||
|
|
1 file changed, 37 insertions(+), 36 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/lang.csh b/lang.csh
|
||
|
|
index c9ed880..d9cdcce 100644
|
||
|
|
--- a/lang.csh
|
||
|
|
+++ b/lang.csh
|
||
|
|
@@ -58,45 +58,46 @@ endif
|
||
|
|
# The ${LANG} manipulation is necessary only in virtual terminal (a.k.a. console - /dev/tty*):
|
||
|
|
set in_console=`tty | grep -vc -e '/dev/tty'`
|
||
|
|
|
||
|
|
-if (${?LANG} && ${?TERM} == 'linux' && in_console == 0) then
|
||
|
|
- set utf8_used=`echo ${LANG} | grep --quiet -E -i -e '^.+\.utf-?8$'; echo $?`
|
||
|
|
+if (${?LANG} && ${?TERM}) then
|
||
|
|
+ if (${TERM} == 'linux' && $in_console == 0) then
|
||
|
|
+ set utf8_used=`echo ${LANG} | grep --quiet -E -i -e '^.+\.utf-?8$'; echo $?`
|
||
|
|
|
||
|
|
- if (${utf8_used} == 0) then
|
||
|
|
- switch (${LANG})
|
||
|
|
- case en_IN*:
|
||
|
|
- breaksw
|
||
|
|
+ if (${utf8_used} == 0) then
|
||
|
|
+ switch (${LANG})
|
||
|
|
+ case en_IN*:
|
||
|
|
+ breaksw
|
||
|
|
+ case ja*:
|
||
|
|
+ case ko*:
|
||
|
|
+ case si*:
|
||
|
|
+ case zh*:
|
||
|
|
+ case ar*:
|
||
|
|
+ case fa*:
|
||
|
|
+ case he*:
|
||
|
|
+ case *_IN*:
|
||
|
|
+ setenv LANG en_US.UTF-8
|
||
|
|
+ breaksw
|
||
|
|
+ endsw
|
||
|
|
+ else
|
||
|
|
+ switch (${LANG})
|
||
|
|
+ case en_IN*:
|
||
|
|
+ breaksw
|
||
|
|
+ case ja*:
|
||
|
|
+ case ko*:
|
||
|
|
+ case si*:
|
||
|
|
+ case zh*:
|
||
|
|
+ case ar*:
|
||
|
|
+ case fa*:
|
||
|
|
+ case he*:
|
||
|
|
+ case *_IN*:
|
||
|
|
+ setenv LANG en_US
|
||
|
|
+ breaksw
|
||
|
|
+ endsw
|
||
|
|
+ endif
|
||
|
|
|
||
|
|
- case ja*:
|
||
|
|
- case ko*:
|
||
|
|
- case si*:
|
||
|
|
- case zh*:
|
||
|
|
- case ar*:
|
||
|
|
- case fa*:
|
||
|
|
- case he*:
|
||
|
|
- case *_IN*:
|
||
|
|
- setenv LANG en_US.UTF-8
|
||
|
|
- breaksw
|
||
|
|
- endsw
|
||
|
|
- else
|
||
|
|
- switch (${LANG})
|
||
|
|
- case en_IN*:
|
||
|
|
- breaksw
|
||
|
|
- case ja*:
|
||
|
|
- case ko*:
|
||
|
|
- case si*:
|
||
|
|
- case zh*:
|
||
|
|
- m case ar*:
|
||
|
|
- case fa*:
|
||
|
|
- case he*:
|
||
|
|
- case *_IN*:
|
||
|
|
- setenv LANG en_US
|
||
|
|
- breaksw
|
||
|
|
- endsw
|
||
|
|
+ # NOTE: We are not exporting the ${LANG} here again on purpose.
|
||
|
|
+ # If user starts GUI session from console manually, then
|
||
|
|
+ # the previously set LANG should be okay to use.
|
||
|
|
endif
|
||
|
|
-
|
||
|
|
- # NOTE: We are not exporting the ${LANG} here again on purpose.
|
||
|
|
- # If user starts GUI session from console manually, then
|
||
|
|
- # the previously set LANG should be okay to use.
|
||
|
|
endif
|
||
|
|
|
||
|
|
unset in_console utf8_used
|
||
|
|
--
|
||
|
|
2.19.1
|
||
|
|
|