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

2010-01-05 Thread Frans Pop
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
;;



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2010-01-05 Thread Christian PERRIER
Quoting Frans Pop (elen...@planet.nl):

> 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.

+1 for me. Nice catch, again. That specific example would have raised
suggestions at some time so it's much better if we can anticipate
them.






signature.asc
Description: Digital signature


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

2010-01-06 Thread Frans Pop
On Wednesday 06 January 2010, Christian PERRIER wrote:
> +1 for me. Nice catch, again. That specific example would have raised
> suggestions at some time so it's much better if we can anticipate
> them.

OK. But I just see that this does require a string change :-/

Current text is:
   There is no locale defined for the combination of language and country
   you have selected. You can now select your preference from the locales
   available for the selected language. The locale that will be used is
   listed in the second column.

And the first sentence is obviously not correct for this change.

One solution could be to just drop the first sentence for this case.

Another option could be to make the first sentence variable and change it 
as follows for this case:
   There are multiple locales defined for the language you have selected.

But then it's maybe better to rewrite the whole para as:
   There are multiple locales defined for the language you have selected.
   You can now select your preference from those locales. The locale that
   will be used is listed in the second column.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2010-01-07 Thread Christian PERRIER
Quoting Frans Pop (elen...@planet.nl):

> OK. But I just see that this does require a string change :-/

C'est la vie..:-)

> Current text is:
>There is no locale defined for the combination of language and country
>you have selected. You can now select your preference from the locales
>available for the selected language. The locale that will be used is
>listed in the second column.
> 
> And the first sentence is obviously not correct for this change.
> 
> One solution could be to just drop the first sentence for this case.
> 
> Another option could be to make the first sentence variable and change it 
> as follows for this case:
>There are multiple locales defined for the language you have selected.
> 
> But then it's maybe better to rewrite the whole para as:
>There are multiple locales defined for the language you have selected.
>You can now select your preference from those locales. The locale that
>will be used is listed in the second column.

I'd go for that last option as any case leads to one string to update,
so let's be as precise as we can.



-- 




signature.asc
Description: Digital signature


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

2010-01-07 Thread Ferenc Wagner
Frans Pop  writes:

> On Wednesday 06 January 2010, Christian PERRIER wrote:
>
>> +1 for me. Nice catch, again. That specific example would have raised
>> suggestions at some time so it's much better if we can anticipate
>> them.
>
> Current text is:
>There is no locale defined for the combination of language and country
>you have selected. You can now select your preference from the locales
>available for the selected language. The locale that will be used is
>listed in the second column.
>
> And the first sentence is obviously not correct for this change.
>
> One solution could be to just drop the first sentence for this case.
>
> Another option could be to make the first sentence variable and change it 
> as follows for this case:
>There are multiple locales defined for the language you have selected.
>
> But then it's maybe better to rewrite the whole para as:
>There are multiple locales defined for the language you have selected.
>You can now select your preference from those locales. The locale that
>will be used is listed in the second column.

I agree.  If you allow a general observation: it seems that problems
arise if the texts depend on each other, since their individual presence
depends on the priority relations.  While it's useful if the installer
explains its steps (the dependent texts serve this very purpose), maybe
we have to accept a compromise and relegate that into the logs.  Or find
a workable solution.
-- 
Regards,
Feri.



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2010-01-07 Thread Frans Pop
tag 563861 pending
thanks

I've just committed the change.

At medium and low priority we do now have the situation which Colin warned 
against: effectively we display the shortlist dialog twice in a row. And I 
do agree that it's not the most beautiful design.

However, I think that this commit does improve consistency and that in 
combination with all other recent changes it's still logical:
- the "first" shortlist now clearly has the purpose of selecting the user's
  location, while the "second" one clearly selects the system locale;
  changing the dialog titles has helped a lot with that
- even though the dialogs essentially have the same choices, they look
  rather different because of the addition of the second column with
  locales for the second one;
- the choice from the "first" shortlist sets the correct default for the
  "second", so normally the second can simply be entered through.

On Thursday 07 January 2010, Ferenc Wagner wrote:
> > But then it's maybe better to rewrite the whole para as:
> >    There are multiple locales defined for the language you have
> >selected. You can now select your preference from those locales. The
> >locale that will be used is listed in the second column.
>
> I agree.

The rewrite was still only for the second case. I've kept two distinct 
texts as IMO the explanation of context is important.

> If you allow a general observation: it seems that problems 
> arise if the texts depend on each other, since their individual presence
> depends on the priority relations.  

If you look at the committed change you'll see that the implementation is 
fairly straightforward. And note that which text gets displayed does not 
depend on the priority, but on the question "is a locale defined for the 
combination of language and country". The same question also determines at 
which priority the dialog is displayed.

> While it's useful if the installer
> explains its steps (the dependent texts serve this very purpose), maybe
> we have to accept a compromise and relegate that into the logs.

That is a choice we have made in other places, but it's not needed here.

But I do admit that localechooser is now fairly extreme in "building 
dialogs at runtime". The main reason for that is not because it is the 
only way to implement it, but rather to limit the size of the udeb as much 
as possible.

Without building the dialogs at runtime, the template file would contain 
multiple repetitions (not just 2 or 3, but many more) of the same strings 
and their translations, and its size would explode.

I expect that despite all the recent changes and even when fully translated 
again, the size of the localechooser udeb will be about equal to the 
current Lenny version. And that's exactly because I've reduced duplication 
of a number of strings.

Cheers,
FJP



--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2010-01-07 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> tag 563861 pending
Bug #563861 [localechooser] localechooser: Maybe ask preferred locale in more 
cases?
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org