Am 18.09.2011 um 14:38 schrieb Enrico Forestieri:

> On Sun, Sep 18, 2011 at 02:08:28PM +0200, Stephan Witt wrote:
> 
>> Am 17.09.2011 um 20:56 schrieb Enrico Forestieri:
>> 
>>> On Sun, Sep 11, 2011 at 06:42:37PM +0200, PhilipPirrip wrote:
>>>> 
>>>> When one chooses to change the global document language in the
>>>> Document Settings dialog, can someone tell me why is the test being
>>>> made (now in BufferView.cpp,  line 1905) on
>>>> !buffer_.isMultiLingual().
>>> 
>>> I think you are right and that test is wrong. I checked it with RTL
>>> and LTR languages and I also observe the wrong behavior you report.
>>> Without that test everything goes as one expects. So I am going to
>>> commit the attached patch, unless someone can clearly explain when
>>> an why that bogus test is needed.
>> 
>> I didn't had the time to follow the thread as carefully as I should, sorry.
>> I'm not the author of that code... but I think the idea here is to
>> give the user the ability to correct the document language including the
>> change of text language for mono-lingual documents only.
>> 
>> Because this seems to be a common workflow: 
>> * you start LyX with your local GUI environment
>> * your GUI language is German or Italian
>> * you start typing and for text language is... the default
>> * later you realize that this default is English
>> * now you want to correct this and change the document language to
>>  the native on, what should have been the default instead
>> * of course you expect the text language to change, so LyX does this
>>  but only when the document is mono-lingual
> 
> So, if (before I realize the default language is wrong) I had marked some
> parts in another language, I am doomed?
> Sorry, I think this is plain wrong.

Yes, I think this is wrong, too.

> However, if the mistake is between a LTR vs RTL language, I have a chance
> to get it immediately, before I explicitly change the language of some
> parts. And indeed, the patch maintains this check.
> 
>> We have at least two errors here:
>> 1. the wrong default language is choosen
> 
> I don't think so. If you start a latex file as
> 
> \documentclass{article}
> \begin{document}
> \end{document}
> 
> guess what the default language is.

I tried to guess and I don't know it. Please, tell me the right answer.

If it is English, we can at least display "Default (English)" or something 
similar.
It it is dynamically assigned I wouldn't present "Default" as default. The 
average
user expect the GUI language as default, IMHO.

> If you really want to start in some
> different language any new document, you could perform the language change
> and save it as Document Defaults.

That's right. But people did start complaining, that the spell checker cannot
tell what language the text is and of course there is some real language when
default is selected. If it's not defined, then the spell checker should skip
that text fragments and if it is english it should be displayed as such at 
least.

> 
>> 2. the change of the text language is made by pure guessing and without
>>   asking the user what she wants to happen with the text language
> 
> Not really. Any explicit change of language is honoured.

I meant the implicit change when changing the document language. And I meant
that the decision to change or not is made in a very non-transparent manner.

> 
>> 3. I'm not sure if a "default" language makes sense at all
> 
> I think so.
> 
>> To correct this the check for isMultiLingual() should be replaced by a
>> confirmation dialog were the user can decide, IMHO.
> 
> Yet another bothering dialog to answer...

How often do you change the document language? I think that every piece of 
software should work as silent as possible. But if there is something the
user should decide it should be asked for.

But I agree here that the buffer_.isMultiLingual() part should go.
If this is enough I'm not sure.

Stephan

Reply via email to