[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#563861: localechooser: Maybe ask preferred locale in more cases?



Package: localechooser
Version: 2.21
Severity: wishlist

There is one use case currently not covered by localechooser that arguably 
should be covered, though IMO only at medium priority.

This use case is as follows.
A user is from England, but working in Australia. So he selects English as 
language and Australia as country. Currently he will automatically get 
en_AU.UTF-8 as locale.

Question is: should he have the option to select en_GB.UTF-8 as preferred 
locale? After all, a Brit working in Germany gets that option, so why not 
a Brit working in Australia.

As I'm not sure whether this complication is really needed, I'm only 
attaching the simple (but untested) patch needed to implement it instead 
of committing it.

With this patch the preferred locale question will be asked
- at high priority for the English/Germany case (default: en_US.UTF-8)
- at medium priority for the English/Australia case (default: en_AU.UTF-8)

Showing the dialog at medium prio in the second case seems to me consistent 
with the rest of localechooser: we should not bother Australians living in 
Australia with this question during default installations. 

--- localechooser	(revision 61935)
+++ localechooser	(working copy)
@@ -759,12 +759,16 @@
 		db_settitle localechooser/title/locale
 
 		askedpreflocale=
-		if [ -z "$locale_preseeded" ] && [ "$use_lang" ] && \
-		   ! has_choice $tpl_shortlist $COUNTRYCODE; then
+		if [ -z "$locale_preseeded" ] && [ "$use_lang" ]; then
 			build_preferredlocale_choices $LANGUAGE $LOCALE
 
+			preflocale_prio=high
+			if has_choice $tpl_shortlist $COUNTRYCODE; then
+				preflocale_prio=medium
+			fi
+
 			db_capb backup align
-			db_input high $tpl_preferredlocale || [ $? -eq 30 ]
+			db_input $preflocale_prio $tpl_preferredlocale || [ $? -eq 30 ]
 			askedpreflocale=1
 		fi
 		;;



Reply to: