# $Header: /home/cvsd/magellan-cvs/magellan-src/installer/gtk-gui/locales.sh,v 1.2 2008-09-24 10:44:21 niro Exp $ export SELECT_TIMEZONE_REGION=' data/header.png 300200 TIMEZONE_REGION timezone.sh --regions ' export SELECT_TIMEZONE_LOCATION=' data/header.png 300200 TIMEZONE_LOCATION timezone.sh --locations "${TIMEZONE_REGION}" ' export SELECT_LOCALES=' data/header.png 300200 LOCALE localedef --list-archive | grep $(timezone.sh --get-code ${TIMEZONE_LOCATION}) ' rundialog_select_timezone_region() { rundialog SELECT_TIMEZONE_REGION echo "DEBUG: EXIT='${EXIT}'" # save given variables in env # they will be shown as default on error export TIMEZONE_REGION case ${EXIT} in abort) echo "Aborted by user." exit 1 ;; back) # placeholder return 1 ;; next) if [[ -z ${TIMEZONE_REGION} ]] then FAILURE_MESSAGE="No Timezone Region selected!" \ rundialog FAILURE_DIALOG rundialog_select_timezone_region fi ;; esac } rundialog_select_timezone_location() { rundialog SELECT_TIMEZONE_LOCATION echo "DEBUG: EXIT='${EXIT}'" # save given variables in env # they will be shown as default on error export TIMEZONE_LOCATION case ${EXIT} in abort) echo "Aborted by user." exit 1 ;; back) rundialog_select_timezone_region rundialog_select_timezone_location ;; next) if [[ -z ${TIMEZONE_LOCATION} ]] then FAILURE_MESSAGE="No Timezone Location selected!" \ rundialog FAILURE_DIALOG rundialog_select_timezone_location fi ;; esac } rundialog_select_locales() { rundialog SELECT_LOCALES echo "DEBUG: EXIT='${EXIT}'" # save given variables in env # they will be shown as default on error export LOCALES case ${EXIT} in abort) echo "Aborted by user." exit 1 ;; back) rundialog_select_timezone_location rundialog_select_locales ;; next) if [[ -z ${TIMEZONE_LOCATION} ]] then FAILURE_MESSAGE="No locale selected!" \ rundialog FAILURE_DIALOG rundialog_select_locale fi ;; esac } main_locales() { rundialog_select_timezone_region rundialog_select_timezone_location rundialog_select_locales # export all variables export TIMEZONE_REGION export TIMEZONE_LOCATION export LOCALE_ALL export LOCALE }