Bug#234663: Patch for this bug : countrychooser: should not remove @euro modifier
Denis, do you think the proposed patch is OK for preserving modifier ?
I fear a bit writing bad shell code...and lack time for testing..
--
--- postinst.old 2004-03-12 11:31:54.000000000 +0100
+++ postinst 2004-03-12 11:32:20.000000000 +0100
@@ -101,6 +101,13 @@
fi
fi
+# Keep track of the modifier we got from languagechooser
+if [ -n "$DEFAULTLOCALE" ]; then
+ if (echo $DEFAULTLOCALE | grep -q "@") ; then
+ MODIFIER_LANGUAGECHOOSER=`echo $DEFAULTLOCALE | cut -f2 -d@`
+ fi
+fi
+
# At this step we should have either xx, or xx_YY in LANGNAME
if [ "$LANGUAGE" != "C" ]; then
STATE=1
@@ -188,6 +195,10 @@
if [ -n "$CHARSET_LANGUAGECHOOSER" ] ; then
LOCALE=${LOCALE}.${CHARSET_LANGUAGECHOOSER}
fi
+ # If we inherited a modifier form languagechooser, keep it
+ if [ -n "$MODIFIER_LANGUAGECHOOSER" ] ; then
+ LOCALE=${LOCALE}@${MODIFIER_LANGUAGECHOOSER}
+ fi
db_set "$localecode" "${LOCALE}"
log "$localecode = '${LOCALE}'"
fi
Reply to: