diff options
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -91,12 +91,15 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta done # Import translations. First import English to prefill all texts - if [ ! -f ${DBDIR}/languages/en-US ]; then - echo "Could not find languages directory (file: ${DBDIR}/languages/en-US)" + if [ ! -f ${DBDIR}/languages/en ]; then + echo "Could not find languages directory (file: ${DBDIR}/languages/en)" exit 1 else - . ${DBDIR}/languages/en-US + . ${DBDIR}/languages/en fi + + # Auto detection of language based on locale (first two characters) + LANGUAGE=$(locale | egrep "^LANGUAGE=" | cut -d= -f2 | cut -d_ -f1) # ################################################################################# # @@ -549,7 +552,8 @@ ${NORMAL} . ${INCLUDEDIR}/profiles # Import a different language when configured - if [ ! "${LANGUAGE}" = "en-US" ]; then + if [ ! "${LANGUAGE}" = "en" ]; then + LogText "Language is set to ${LANGUAGE}" if [ ! -f ${DBDIR}/languages/${LANGUAGE} ]; then Display "Warning: could not find languages directory (file: ${DBDIR}/languages/${LANGUAGE})" else @@ -557,6 +561,7 @@ ${NORMAL} . ${DBDIR}/languages/${LANGUAGE} fi fi + LogTextBreak # ################################################################################# # |