From 83a30ba91e85b656b44631b50cce01a7919682e2 Mon Sep 17 00:00:00 2001 From: Ryan Leavengood Date: Sat, 9 Jul 2011 04:29:20 +0000 Subject: [PATCH] Implement #7495 as per Matt and Ingo's suggestions. The various LC_ environment variables (as well as LANG) are set in /etc/profile, based on the output of this new simple bin command locale. LANG and LC_CTYPE are set based on the first preferred language, whereas the formatting variables are all set based on the formatting conventions language. The list of LC_ variables are from the locale command on Linux. Based on my testing, at least the date command obeys these variables. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42394 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/HaikuImage | 3 ++- data/etc/profile | 15 +++++++++++++++ src/bin/locale/Jamfile | 2 ++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index 603b845a35..c5a8b0366b 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -41,7 +41,8 @@ SYSTEM_BIN = "[" addattr alert arp base64 basename bash bc beep bzip2 $(IDE_ONLY)ideinfo $(IDE_ONLY)idestatus join kernel_debugger keymap kill less lessecho lesskey link linkcatkeys listarea listattr listimage listdev - listport listres listsem listusb ln locate logger login logname ls lsindex + listport listres listsem listusb ln locale locate logger login logname ls + lsindex mail2mbox makebootable mbox2mail md5sum merge message mimeset mkdos mkdir mkfifo mkfs mkindex mktemp modifiers mount mount_nfs mountvolume mv netcat netstat nl nohup notify nproc diff --git a/data/etc/profile b/data/etc/profile index f98efc42d3..164035aa94 100644 --- a/data/etc/profile +++ b/data/etc/profile @@ -16,6 +16,21 @@ export PS1="\w> " export HISTFILESIZE=50 export HISTCONTROL=ignoredups +# Locale +export LANG=`locale -l` +export LC_CTYPE=`locale -c` +export LC_TIME=`locale -f` +export LC_NUMERIC=$LC_TIME +export LC_COLLATE=$LC_TIME +export LC_MONETARY=$LC_TIME +export LC_MESSAGES=$LC_TIME +export LC_PAPER=$LC_TIME +export LC_NAME=$LC_TIME +export LC_ADDRESS=$LC_TIME +export LC_TELEPHONE=$LC_TIME +export LC_MEASUREMENT=$LC_TIME +export LC_IDENTIFICATION=$LC_TIME + alias ls="ls --color" alias ll="ls -lA" alias la="ls -A" diff --git a/src/bin/locale/Jamfile b/src/bin/locale/Jamfile index c0d05a9fa4..82594c7f1c 100644 --- a/src/bin/locale/Jamfile +++ b/src/bin/locale/Jamfile @@ -11,3 +11,5 @@ BinCommand collectcatkeys : collectcatkeys.cpp RegExp.cpp BinCommand linkcatkeys : linkcatkeys.cpp : be liblocale.so $(TARGET_LIBSTDC++) ; BinCommand dumpcatalog : dumpcatalog.cpp : be liblocale.so $(TARGET_LIBSUPC++) ; + +BinCommand locale : locale.cpp : be liblocale.so $(TARGET_LIBSUPC++) ;