Re: [PATCH] put Gui language definition in lyxrc

2007-01-18 Thread Uwe Stöhr

Jean-Marc Lasgouttes schrieb:


Uwe> I'm not able to maintain Joost's code :-(

It is a pity that we have to keep two installers. One reason why I'd
rather not have your installer in the tree is that you keep adding
things that are not in LyX itself.


With the patch for the viewing toolbar I have now exactly the same code as in 
svn!

And Joost has also modified his version: The lyx.exe is renamed as lyxc.exe and he wrote a wrapper 
programm named lyx.exe that starts lyxc.exe to show hints when LyX crashes and to assure that LyX 
starts with always the same size and position of the main window. I have no problem with this, jut 
for your interest.


regards Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-18 Thread Uwe Stöhr

Uwe Stöhr schrieb:

 >>The
 >>SET OUTPUT_CHARSET=xxx
 >>
 >>setting is needed that LyX can be installed in folder/paths with 
accented characters, umlauts,
 >> etc. I've build in a lookup table for the different languages. 
Unfortunately utf-8 cannot be
 >>  used, only a cp charset - I found out that this is a windows 
restriction.


 > Couldn't this be done from within LyX instead?

I don't know how.



Forget what I said, the encoding is for the lyx.bat file itself to assure that path to the called 
lyx.exe can have accented characters.


regards Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-18 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> Joost's installer is based on mine but he build in many special
Uwe> things that I cannot maintain. I listed the differences here:
Uwe> http://wiki.lyx.org/Windows/LyXWinInstaller

I do not see what Joost built in. Only the advantages f your installer...

Uwe> I'm not able to maintain Joost's code :-(

It is a pity that we have to keep two installers. One reason why I'd
rather not have your installer in the tree is that you keep adding
things that are not in LyX itself. This is absolutely your right, but
have two slightly different versions of LyX in the same tree is not a
good idea.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-17 Thread Uwe Stöhr

>>The
>>SET OUTPUT_CHARSET=xxx
>>
>>setting is needed that LyX can be installed in folder/paths with accented 
characters, umlauts,
>> etc. I've build in a lookup table for the different languages. Unfortunately 
utf-8 cannot be
>>  used, only a cp charset - I found out that this is a windows restriction.

> Couldn't this be done from within LyX instead?

I don't know how.

>>I don't understand what you mean. I know users who use a German Windows but install LyX with 
>>Spanish menus. LyX menu language should be independent from Windows' language settings.


> Sure but the default proposed language should be German in this case.

That's the case. Maybe you should test my installer to see how it works.

>>What do you mean with "if the system language is OK"?
>
> I mean exactly this:
>
>>The current behaviour is: The installer checks the actual Windows 
language and proposes this
>>one in a droplist.

> By default?

Yes.

>>Btw. I want to upload my installer stuff to SVN, is that OK?
>
> Is it an enhancement of Joost code or a completely different code base?

Joost's installer is based on mine but he build in many special things that I 
cannot maintain.
I listed the differences here:
http://wiki.lyx.org/Windows/LyXWinInstaller

I'm not able to maintain Joost's code :-(

regards Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-17 Thread Uwe Stöhr

Jean-Marc Lasgouttes schrieb:


Uwe> Btw. I want to upload my installer stuff to SVN, is that OK?

Please not unless Joost agrees about the changes. I do not think it is
a good idea to have two different installers. You should be able to
agree on a common base.


I cannot reach him for weeks now and I'm not able to maintain his code. I simply don't understand 
huge parts of his code.

I would upload it into a different folder, e.g. to 
/lyx-devel/development/Win32/WinInstaller

regards Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-17 Thread Enrico Forestieri
On Wed, Jan 17, 2007 at 10:49:48AM +0100, Abdelrazak Younes wrote:

> Uwe Stöhr wrote:

> > @echo off
> > SET OUTPUT_CHARSET=cp-1252
> > SET LANG=de_DE
> > SET AIK_DATA_DIR=C:\Program Files (x86)\LyX 1.5svn-15-01-2007\aiksaurus
> > start "LyX" "C:\Program Files (x86)\LyX 1.5svn-15-01-2007\bin\lyx.exe" %*
> > 
> > The
> > SET OUTPUT_CHARSET=xxx
> > setting is needed that LyX can be installed in folder/paths with 
> > accented characters, umlauts, etc. I've build in a lookup table for the 
> > different languages. Unfortunately utf-8 cannot be used, only a cp 
> > charset - I found out that this is a windows restriction.
> 
> Couldn't this be done from within LyX instead?

I think this could be done in os::init

> >  >>   On Windows, the Aiksaurus data dir location can be set in the 
> > registry:
> >  >>   HKLM\Software\Aiksaurus\Data_Dir
> >  >>   The environment variable simply overrides the registry setting.
> >  >
> >  > Very good then. Uwe, could you modify the package to do that?
> > 
> > I'll check this and change this if it works for me too. I see the 
> > problem of multiple installations of LyX. For example when LyX 1.3.7 AND 
> > LyX 1.4.x is installed sise by side. Without this setting I have to 
> > install aiksaurus in a different folder, independent from LyX, like 
> > Aspell. This requires some changes but it's in my opinion worth to be 
> > implemented.
> 
> Agreed. It would be very nice if you did that.

To let LyX be installed by a normal user, I suggest that you modify the
Aiksaurus sources such that HKCU\Software\Aiksaurus\Data_Dir overrides
HKLM\Software\Aiksaurus\Data_Dir which, in turn, is overrided by the
env setting. I see that Aiksausurs is already patched, so this should
not be a problem. In this way, if HKLM is not writable by the user, the
setting can be stored in HKCU by the installer. Wait a moment... I had a
quick glance at the patch and it seems that this is already done.

However, I don't think that a wrapper can be avoided as there must be
a way to suppress the cmd window.

-- 
Enrico


Re: [PATCH] put Gui language definition in lyxrc

2007-01-17 Thread Enrico Forestieri
On Wed, Jan 17, 2007 at 01:10:51PM +0100, Jean-Marc Lasgouttes wrote:

> > "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes:
> 
> Enrico> The language setting could be asked to the system when LC_ALL
> Enrico> or LANG are not set in the environment. See for example:
> Enrico> http://blogs.msdn.com/michkap/archive/2005/02/01/364707.aspx
> Enrico> http://www.microsoft.com/globaldev/DrIntl/faqs/Locales.mspx
> 
> gettext already does this (localename.c).

Indeed. I was missing that.

-- 
Enrico


Re: [PATCH] put Gui language definition in lyxrc

2007-01-17 Thread Jean-Marc Lasgouttes
> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes:

Enrico> The language setting could be asked to the system when LC_ALL
Enrico> or LANG are not set in the environment. See for example:
Enrico> http://blogs.msdn.com/michkap/archive/2005/02/01/364707.aspx
Enrico> http://www.microsoft.com/globaldev/DrIntl/faqs/Locales.mspx

gettext already does this (localename.c).

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-17 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> Btw. I want to upload my installer stuff to SVN, is that OK?

Please not unless Joost agrees about the changes. I do not think it is
a good idea to have two different installers. You should be able to
agree on a common base.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-17 Thread Abdelrazak Younes

Uwe Stöhr wrote:

 >>This is the content of the batch file:
 >>
 >>@echo off
 >>SET LC_ALL=en_EN
 >>SET AIK_DATA_DIR=D:\program\LyX14\aiksaurus
 >>start "LyX" "D:\program\LyX14\bin\lyx.exe" %*

No, the current version is e.g.:

@echo off
SET OUTPUT_CHARSET=cp-1252
SET LANG=de_DE
SET AIK_DATA_DIR=C:\Program Files (x86)\LyX 1.5svn-15-01-2007\aiksaurus
start "LyX" "C:\Program Files (x86)\LyX 1.5svn-15-01-2007\bin\lyx.exe" %*

The
SET OUTPUT_CHARSET=xxx
setting is needed that LyX can be installed in folder/paths with 
accented characters, umlauts, etc. I've build in a lookup table for the 
different languages. Unfortunately utf-8 cannot be used, only a cp 
charset - I found out that this is a windows restriction.


Couldn't this be done from within LyX instead?


 >>   On Windows, the Aiksaurus data dir location can be set in the 
registry:

 >>   HKLM\Software\Aiksaurus\Data_Dir
 >>   The environment variable simply overrides the registry setting.
 >
 > Very good then. Uwe, could you modify the package to do that?

I'll check this and change this if it works for me too. I see the 
problem of multiple installations of LyX. For example when LyX 1.3.7 AND 
LyX 1.4.x is installed sise by side. Without this setting I have to 
install aiksaurus in a different folder, independent from LyX, like 
Aspell. This requires some changes but it's in my opinion worth to be 
implemented.


Agreed. It would be very nice if you did that.



 >>  The language setting could be asked to the system when LC_ALL or LANG
 >>  are not set in the environment. See for example:
 >>  http://blogs.msdn.com/michkap/archive/2005/02/01/364707.aspx
 >>  http://www.microsoft.com/globaldev/DrIntl/faqs/Locales.mspx

I don't understand what you mean. I know users who use a German Windows 
but install LyX with Spanish menus. LyX menu language should be 
independent from Windows' language settings.


Sure but the default proposed language should be German in this case.




 > Unless you want a different language than the one defined in LANG. So 
it is really needed in the
 > lyxrc.dist. As I see it, the package should ask by default if the 
system language is OK. If yes,
 > put nothing in lyxrc.dist, if not ask the user which language he 
chooses and put that in

 > lyxrc.dist.

What do you mean with "if the system language is OK"?


I mean exactly this:

The current 
behaviour is:
The installer checks the actual Windows language and proposes this one 
in a droplist.


By default?

So the user can easily choose the language while 
installing LyX.
There's currently set nothing language specific in the lyxrc.dist, only 
the \path_prefix is set to this file. This can easily be changed if you 
specify the format how this should be specified (please send me an 
example lixrc.dist with the language entry).


I have not committed my lyxrc patch yet. But it will be 'gui_language'.




Btw. I want to upload my installer stuff to SVN, is that OK?


Is it an enhancement of Joost code or a completely different code base?

Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Uwe Stöhr

>>This is the content of the batch file:
>>
>>@echo off
>>SET LC_ALL=en_EN
>>SET AIK_DATA_DIR=D:\program\LyX14\aiksaurus
>>start "LyX" "D:\program\LyX14\bin\lyx.exe" %*

No, the current version is e.g.:

@echo off
SET OUTPUT_CHARSET=cp-1252
SET LANG=de_DE
SET AIK_DATA_DIR=C:\Program Files (x86)\LyX 1.5svn-15-01-2007\aiksaurus
start "LyX" "C:\Program Files (x86)\LyX 1.5svn-15-01-2007\bin\lyx.exe" %*

The
SET OUTPUT_CHARSET=xxx
setting is needed that LyX can be installed in folder/paths with accented characters, umlauts, etc. 
I've build in a lookup table for the different languages. Unfortunately utf-8 cannot be used, only a 
cp charset - I found out that this is a windows restriction.


>>   On Windows, the Aiksaurus data dir location can be set in the registry:
>>   HKLM\Software\Aiksaurus\Data_Dir
>>   The environment variable simply overrides the registry setting.
>
> Very good then. Uwe, could you modify the package to do that?

I'll check this and change this if it works for me too. I see the problem of multiple installations 
of LyX. For example when LyX 1.3.7 AND LyX 1.4.x is installed sise by side. Without this setting I 
have to install aiksaurus in a different folder, independent from LyX, like Aspell. This requires 
some changes but it's in my opinion worth to be implemented.


>>  The language setting could be asked to the system when LC_ALL or LANG
>>  are not set in the environment. See for example:
>>  http://blogs.msdn.com/michkap/archive/2005/02/01/364707.aspx
>>  http://www.microsoft.com/globaldev/DrIntl/faqs/Locales.mspx

I don't understand what you mean. I know users who use a German Windows but install LyX with Spanish 
menus. LyX menu language should be independent from Windows' language settings.


> Unless you want a different language than the one defined in LANG. So it is 
really needed in the
> lyxrc.dist. As I see it, the package should ask by default if the system 
language is OK. If yes,
> put nothing in lyxrc.dist, if not ask the user which language he chooses and 
put that in
> lyxrc.dist.

What do you mean with "if the system language is OK"? The current behaviour is:
The installer checks the actual Windows language and proposes this one in a droplist. So the user 
can easily choose the language while installing LyX.
There's currently set nothing language specific in the lyxrc.dist, only the \path_prefix is set to 
this file. This can easily be changed if you specify the format how this should be specified (please 
send me an example lixrc.dist with the language entry).


Btw. I want to upload my installer stuff to SVN, is that OK?

regards Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Enrico Forestieri
On Tue, Jan 16, 2007 at 05:27:24PM +0100, Abdelrazak Younes wrote:

> Enrico Forestieri wrote:

> > On Windows, the Aiksaurus data dir location can be set in the registry:
> > HKLM\Software\Aiksaurus\Data_Dir
> > The environment variable simply overrides the registry setting.
> 
> Very good then. Uwe, could you modify the package to do that?

I think that Joost did it through the env var such that LyX can be
installed without having privileges. I don't think that a normal
user can write to HKLM.

-- 
Enrico


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Enrico Forestieri wrote:

On Tue, Jan 16, 2007 at 04:08:14PM +0100, Abdelrazak Younes wrote:


Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Edwin> why not set the language when installing lyx and be done with
Edwin> it...

 This is indeed what we do now.

Abdelrazak> What do you mean here? The current solution is to create a
Abdelrazak> batch file that sets LANG before launching LyX truly. I
Abdelrazak> rckon this is not a good solution.

It is not very nice indeed, but since we need the batch file anyway...

This is the content of the batch file:

@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=D:\program\LyX14\aiksaurus
start "LyX" "D:\program\LyX14\bin\lyx.exe" %*

Does the aiksaurus support really needs this variable or is there a way 
to put that in the lyxrc.dist and use that?


On Windows, the Aiksaurus data dir location can be set in the registry:
HKLM\Software\Aiksaurus\Data_Dir
The environment variable simply overrides the registry setting.


Very good then. Uwe, could you modify the package to do that?



The language setting could be asked to the system when LC_ALL or LANG
are not set in the environment. See for example:
http://blogs.msdn.com/michkap/archive/2005/02/01/364707.aspx
http://www.microsoft.com/globaldev/DrIntl/faqs/Locales.mspx

So, the batch file is not needed, and, after all, neither setting it
in lyxrc.dist.


Unless you want a different language than the one defined in LANG. So it 
is really needed in the lyxrc.dist.
As I see it, the package should ask by default if the system language is 
OK. If yes, put nothing in lyxrc.dist, if not ask the user which 
language he chooses and put that in lyxrc.dist.


Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Enrico Forestieri
On Tue, Jan 16, 2007 at 04:08:14PM +0100, Abdelrazak Younes wrote:

> Jean-Marc Lasgouttes wrote:
> >> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> > 
> > Edwin> why not set the language when installing lyx and be done with
> > Edwin> it...
> >>>  This is indeed what we do now.
> > 
> > Abdelrazak> What do you mean here? The current solution is to create a
> > Abdelrazak> batch file that sets LANG before launching LyX truly. I
> > Abdelrazak> rckon this is not a good solution.
> > 
> > It is not very nice indeed, but since we need the batch file anyway...
> 
> This is the content of the batch file:
> 
> @echo off
> SET LC_ALL=en_EN
> SET AIK_DATA_DIR=D:\program\LyX14\aiksaurus
> start "LyX" "D:\program\LyX14\bin\lyx.exe" %*
> 
> Does the aiksaurus support really needs this variable or is there a way 
> to put that in the lyxrc.dist and use that?

On Windows, the Aiksaurus data dir location can be set in the registry:
HKLM\Software\Aiksaurus\Data_Dir
The environment variable simply overrides the registry setting.

The language setting could be asked to the system when LC_ALL or LANG
are not set in the environment. See for example:
http://blogs.msdn.com/michkap/archive/2005/02/01/364707.aspx
http://www.microsoft.com/globaldev/DrIntl/faqs/Locales.mspx

So, the batch file is not needed, and, after all, neither setting it
in lyxrc.dist.

-- 
Enrico


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:


Edwin> why not set the language when installing lyx and be done with
Edwin> it...

 This is indeed what we do now.


Abdelrazak> What do you mean here? The current solution is to create a
Abdelrazak> batch file that sets LANG before launching LyX truly. I
Abdelrazak> rckon this is not a good solution.

It is not very nice indeed, but since we need the batch file anyway...


This is the content of the batch file:

@echo off
SET LC_ALL=en_EN
SET AIK_DATA_DIR=D:\program\LyX14\aiksaurus
start "LyX" "D:\program\LyX14\bin\lyx.exe" %*

Does the aiksaurus support really needs this variable or is there a way 
to put that in the lyxrc.dist and use that?


Bo, Enrico?



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Edwin> why not set the language when installing lyx and be done with
Edwin> it...
>>  This is indeed what we do now.

Abdelrazak> What do you mean here? The current solution is to create a
Abdelrazak> batch file that sets LANG before launching LyX truly. I
Abdelrazak> rckon this is not a good solution.

It is not very nice indeed, but since we need the batch file anyway...

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes:


Edwin> Jürgen Spitzmüller wrote:

Yes (however, OOo is a good example on how to clutter the
preferences with all sorts of stuff).


Edwin> why not set the language when installing lyx and be done with
Edwin> it...

This is indeed what we do now.


What do you mean here? The current solution is to create a batch file 
that sets LANG before launching LyX truly. I rckon this is not a good 
solution.



Also, considering that we ship 2.5M of
translations, we could consider to install only those that people
choose.


Yep, why not.

Abdel.



[O-T] Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread christian . ridderstrom

On Tue, 16 Jan 2007, Georg Baum wrote:


[EMAIL PROTECTED] wrote:


Thanks. If I decide to use it (professionally) I'll have to look into it
closer.


I recommend interested people monitoring the mailing list (or go through 
the archives of the last few months), this will be interesting.


Good tip.

http://groups.google.com/group/comp.soft-sys.math.scilab

seems they might end up with at least a dual GPL/LGPL license.

thanks
/Christian

--
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread christian . ridderstrom



 I think that the ui language should not be settable from inside lyx.


I haven't really followed this thread, so I might just repeate what 
someone else has said.


I can think of one reason why normal users might want to be able to 
temporarily change the language of the UI from within LyX.


Let's say we have a user that runs LyX in Swedish, but don't know how to 
do something. So the user reads the manual and is instructed to to go to a 
menu/dialog, however, the user doesn't know how that menu/dialog has been 
translated into Swedish so he can't find it...


I don't know if this makes it worth all the hassle, but I actually run 
most of my software with English UI for this reason. When I need to find 
out how to do something it's easier if the UI is in English.


/Christian

--
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

>>  Note that to do that properly, _all_ calls to Buffer::B_ should be
>> audited.

Abdelrazak> Of course I've done that and I was planning to remove the
Abdelrazak> method altogether:

Very good! I thought there were more of these.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Edwin Leuven

Jean-Marc Lasgouttes wrote:

This is indeed what we do now. Also, considering that we ship 2.5M of
translations, we could consider to install only those that people
choose.


indeed


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jean-Marc Lasgouttes
> "Edwin" == Edwin Leuven <[EMAIL PROTECTED]> writes:

Edwin> Jürgen Spitzmüller wrote:
>> Yes (however, OOo is a good example on how to clutter the
>> preferences with all sorts of stuff).

Edwin> why not set the language when installing lyx and be done with
Edwin> it...

This is indeed what we do now. Also, considering that we ship 2.5M of
translations, we could consider to install only those that people
choose.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:


Abdelrazak> Georg Baum wrote:

Am Sonntag, 14. Januar 2007 15:13 schrieb Abdelrazak Younes:


The Gui elements uses messages_["GUI"] and the translatable
element inside a document (mainly layout items) are using
messages_[language] where language is given by the Buffer
language. We can change that to use the Paragraph layout language
instead by the way if there is an interest to do that.

 That should be done IMHO (but not necessarily now), since the
output will look like that.


Abdelrazak> This was easy so I've done it yesterday.

Note that to do that properly, _all_ calls to Buffer::B_ should be
audited.


Of course I've done that and I was planning to remove the method altogether:

Find all "B_", Match case, Whole word, Subfolders, Find Results 1, 
"lyx-trunk", "*.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hpp;*.hxx;*.hh"

  buffer.C(1466):docstring const Buffer::B_(string const & l10n) const
  buffer.h(202):docstring const B_(std::string const & l10n) const;
  insets\insetfloatlist.C(57):  return buf.B_(it->second.listName());
  insets\insetfloatlist.C(120):			   << buf.B_(cit->second.listName()) 
<< "}\n";

  Matching lines: 4Matching files: 3Total files searched: 974

Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> Georg Baum wrote:
>> Am Sonntag, 14. Januar 2007 15:13 schrieb Abdelrazak Younes:
>> 
>>> The Gui elements uses messages_["GUI"] and the translatable
>>> element inside a document (mainly layout items) are using
>>> messages_[language] where language is given by the Buffer
>>> language. We can change that to use the Paragraph layout language
>>> instead by the way if there is an interest to do that.
>>  That should be done IMHO (but not necessarily now), since the
>> output will look like that.

Abdelrazak> This was easy so I've done it yesterday.

Note that to do that properly, _all_ calls to Buffer::B_ should be
audited.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Georg Baum
Abdelrazak Younes wrote:

> OK, forget about it. I am not going to fight for it but let me say that
> I think it is useful at least to get rid of the need for the batch file
> under windows. If you don't want a dialog, that's OK, it is not really
> important. But I think we can put put the setting in lyxrc.dist so that
> packager allows the user to choose a language.

I think that is a good compromise. It would eliminate the problem the users
play with the setting and see that it has no effect on linux. The installer
could offer a nice menu to choose the language from.

> The real problem is that, quite often, when you buy a French window
> licence, you cannot change the settings or are not allowed to. If I am
> forced to use a french window why should I be forced to use a french LyX?

You should not be forced to use a french LyX, it should simply be the
default.


Georg



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Edwin Leuven wrote:

Jürgen Spitzmüller wrote:
Yes (however, OOo is a good example on how to clutter the preferences 
with all sorts of stuff).


why not set the language when installing lyx and be done with it...


Yes, we can just put it lyxrc.dist and be done with it. Forget about the 
dialog.


I think this is a good compromise.

Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:



 Seriously, one can do that in firefox?


Tools-> options->Advanced->Languages.

Isn't this the language of the web pages? At least on linux this is
the only one I have.


You're right. Weird, I am sure I've done that in the past.


Yes, but we had a lot of discussions these last months about how LyX
should look like a real windows program.


OK, forget about it. I am not going to fight for it but let me say that 
I think it is useful at least to get rid of the need for the batch file 
under windows. If you don't want a dialog, that's OK, it is not really 
important. But I think we can put put the setting in lyxrc.dist so that 
packager allows the user to choose a language.



I am all for working like
real windows programs and hiding the 'free software' habits.



The real problem is that, quite often, when you buy a French window 
licence, you cannot change the settings or are not allowed to. If I am 
forced to use a french window why should I be forced to use a french LyX?


Abdel.


Abdel.




Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Edwin Leuven

Jürgen Spitzmüller wrote:
Yes (however, OOo is a good example on how to clutter the preferences with all 
sorts of stuff).


why not set the language when installing lyx and be done with it...


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote:
> > Seriously, one can do that in firefox?
>
> Tools->options->Advanced->Languages.

Nope. That is the language of websites (that are available in multiple 
languages). At least in the Linux version

> > How? And in ms word?
>
> The standard Word version I am not sure but I am sure that the Arabic
> version allows it. 

I couldn't find such a setting in Word 2000.

> And OO allows it also. 

Yes (however, OOo is a good example on how to clutter the preferences with all 
sorts of stuff).

Jürgen


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

>>  Seriously, one can do that in firefox?

Tools-> options->Advanced->Languages.

Isn't this the language of the web pages? At least on linux this is
the only one I have.

>> How? And in ms word?

Abdelrazak> The standard Word version I am not sure but I am sure that
Abdelrazak> the Arabic version allows it. And OO allows it also.

I know about OO. It shows its unixish roots :)

Abdelrazak> This one is really useful to a lot of people on Windows.
>>  So on windows one can change the language of, say, internet
>> explorer? Or is there a way to change the language of the whole
>> environment? How does it work?

Abdelrazak> I guess it depends on your IE and Windows versions.

Abdelrazak> I am mostly talking about free software programs.

Yes, but we had a lot of discussions these last months about how LyX
should look like a real windows program. I am all for working like
real windows programs and hiding the 'free software' habits.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:


Abdelrazak> The idea is to allow the user to choose the language via
Abdelrazak> the settings if he _choose_ to do so.

Abdelrazak> You and Lars and all users that do not need this feature
Abdelrazak> can simply ignore it.

If a button exist in preferences, people are bound to use it just to
see what it does...


Where is this setting in word? In firefox?


Abdelrazak> Yes and many others. Most free programs with
Abdelrazak> internationalisation allows to do this on Wondows.

Seriously, one can do that in firefox?


Tools->options->Advanced->Languages.


How? And in ms word?


The standard Word version I am not sure but I am sure that the Arabic 
version allows it. And OO allows it also.





The one example that Abdel gave is for translators. To be more
precise, it would be for translators that translate in more that
one language :)


Abdelrazak> And this is also good to people like me who share his
Abdelrazak> computer with other people sometimes. I don't want to edit
Abdelrazak> a batch file or launch a console to do this.


 I really do not think we need to add lyxrc entries for each and
every feature that might be useful to someone.


Abdelrazak> This one is really useful to a lot of people on Windows.

So on windows one can change the language of, say, internet explorer?
Or is there a way to change the language of the whole environment? How
does it work?


I guess it depends on your IE and Windows versions.

I am mostly talking about free software programs.

Abdel.




Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Georg Baum wrote:

Am Sonntag, 14. Januar 2007 15:13 schrieb Abdelrazak Younes:

The Gui elements uses messages_["GUI"] and the translatable element 
inside a document (mainly layout items) are using messages_[language] 
where language is given by the Buffer language. We can change that to 
use the Paragraph layout language instead by the way if there is an 
interest to do that.


That should be done IMHO (but not necessarily now), since the output will 
look like that.


This was easy so I've done it yesterday.

Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

>>  This will also break the linux "locale" theorem.
>> 
>> But, if you switch to ignore the LANG variable:
>> 
>> 1. I prefer to create a command line switch to override the lyxrc
>> settings.

Abdelrazak> Sure there will be an "Automatic" option by default that
Abdelrazak> will keep using the environment variable.

No, the 'automatic' version should not set any environment variable
and get the language from windows global settings (which is what
gettext does by default). I do not understand why each and every
application would need to care in what language it is shown. 

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> The idea is to allow the user to choose the language via
Abdelrazak> the settings if he _choose_ to do so.

Abdelrazak> You and Lars and all users that do not need this feature
Abdelrazak> can simply ignore it.

If a button exist in preferences, people are bound to use it just to
see what it does...

>> Where is this setting in word? In firefox?

Abdelrazak> Yes and many others. Most free programs with
Abdelrazak> internationalisation allows to do this on Wondows.

Seriously, one can do that in firefox? How? And in ms word?

>> The one example that Abdel gave is for translators. To be more
>> precise, it would be for translators that translate in more that
>> one language :)

Abdelrazak> And this is also good to people like me who share his
Abdelrazak> computer with other people sometimes. I don't want to edit
Abdelrazak> a batch file or launch a console to do this.

>>  I really do not think we need to add lyxrc entries for each and
>> every feature that might be useful to someone.

Abdelrazak> This one is really useful to a lot of people on Windows.

So on windows one can change the language of, say, internet explorer?
Or is there a way to change the language of the whole environment? How
does it work?

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Lars Gullik Bjønnes wrote:

Abdelrazak Younes <[EMAIL PROTECTED]> writes:



| Objection?

Yes.

I think this will result in surprising behaviour.

1. Set languag inside lyx to "swedish" (why not?)
   - save and exit


Why would you do that at the first place if you don't like the feature?


2. run lyx with LANG=no_NO ./lyx
   - get a nice swedish lyx


Easy enough: go back to the dialog and set the language to "Automatic".



I think that the ui language should not be settable from inside lyx.


This is your opinion.

Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Abdelrazak Younes

Alex wrote:

As a translator I often need to start two LyX session, one using my
local language and the other using english.

It would be impossible or hard to do this without the LANG variable!


The idea is just to allow the setting for those who wants to. It is even 
possible to have two different languages for two different views running 
the same instance if you want ;-)




This will also break the linux "locale" theorem.

But, if you switch to ignore the LANG variable:

 1. I prefer to create a command line switch to override the lyxrc settings.


Sure there will be an "Automatic" option by default that will keep using 
the environment variable.


Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-16 Thread Georg Baum
[EMAIL PROTECTED] wrote:

> Thanks. If I decide to use it (professionally) I'll have to look into it
> closer.

I recommend interested people monitoring the mailing list (or go through the
archives of the last few months), this will be interesting.


Georg



Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread christian . ridderstrom

On Mon, 15 Jan 2007, [EMAIL PROTECTED] wrote:


Quoting [EMAIL PROTECTED]:


 On Mon, 15 Jan 2007, [EMAIL PROTECTED] wrote:
> 
>   Just one small remark:

>   Scilab is neither free nor open source software.

 Um.. why do you say that? (I just downloaded the source and read the
 license agreement. It's not GPL, but seems ok).


A simple google search reveals the problem:
http://lwn.net/Articles/211734/

See the first post there. I can elaborate if you want but I think this 
has enough detail to reveal the issue(s).


Thanks. If I decide to use it (professionally) I'll have to look into it 
closer.


cheers
/Christian

--
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread jamatos

Quoting [EMAIL PROTECTED]:


On Mon, 15 Jan 2007, [EMAIL PROTECTED] wrote:


 Just one small remark:
 Scilab is neither free nor open source software.


Um.. why do you say that? (I just downloaded the source and read the
license agreement. It's not GPL, but seems ok).


 A simple google search reveals the problem:
http://lwn.net/Articles/211734/

 See the first post there. I can elaborate if you want but I think this has
enough detail to reveal the issue(s).


/Christian

--
Christian Ridderström, +46-8-768 39 44
http://www.md.kth.se/~chr




-
A FCUP utiliza o sistema de webmail Horde/IMP (www.horde.org)

Visite: http://www.fc.up.pt/




Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread christian . ridderstrom

On Mon, 15 Jan 2007, [EMAIL PROTECTED] wrote:


On Mon, 15 Jan 2007, [EMAIL PROTECTED] wrote:


 Quoting Uwe Stöhr <[EMAIL PROTECTED]>:
> 
>   But by the way, you can change the language in "Scilab" (the

>   OpenSource alternative to Mathlab). Scilab is also available for
>   Linux, so how is this implemented there? JMarc, aren't you an INRIA
>   people and can perhaps ask a collegue?

  Just one small remark:
  Scilab is neither free nor open source software.


Um.. why do you say that? (I just downloaded the source and read the license 
agreement. It's not GPL, but seems ok).


s/read the license/glanced at the license/

/C

--
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread christian . ridderstrom

On Mon, 15 Jan 2007, [EMAIL PROTECTED] wrote:


Quoting Uwe Stöhr <[EMAIL PROTECTED]>:


 But by the way, you can change the language in "Scilab" (the
 OpenSource alternative to Mathlab). Scilab is also available for
 Linux, so how is this implemented there? JMarc, aren't you an INRIA
 people and can perhaps ask a collegue?


 Just one small remark:
 Scilab is neither free nor open source software.


Um.. why do you say that? (I just downloaded the source and read the 
license agreement. It's not GPL, but seems ok).


/Christian

--
Christian Ridderström, +46-8-768 39 44   http://www.md.kth.se/~chr

Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Uwe Stöhr

Jean-Marc Lasgouttes schrieb:


Well, scilab, which is a fine program, is not what I would take as
model of a native interface :) I played with it for a few minutes, and
I am not able to tell how I could change the language...


Use the menu Preferences -> Language, then you can switch between French and 
English (in scilab 4.x).


So I indeed know the scilab people, but I am not sure they are GUI
experts.


Was just an idea.

Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread jamatos

Quoting Uwe Stöhr <[EMAIL PROTECTED]>:


But by the way, you can change the language in "Scilab" (the
OpenSource alternative to Mathlab). Scilab is also available for
Linux, so how is this implemented there? JMarc, aren't you an INRIA
people and can perhaps ask a collegue?


 Just one small remark:
 Scilab is neither free nor open source software.


JMarc


--
José Abílio


-
A FCUP utiliza o sistema de webmail Horde/IMP (www.horde.org)

Visite: http://www.fc.up.pt/




Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> But by the way, you can change the language in "Scilab" (the
Uwe> OpenSource alternative to Mathlab). Scilab is also available for
Uwe> Linux, so how is this implemented there? JMarc, aren't you an
Uwe> INRIA people and can perhaps ask a collegue?

Well, scilab, which is a fine program, is not what I would take as
model of a native interface :) I played with it for a few minutes, and
I am not able to tell how I could change the language...

So I indeed know the scilab people, but I am not sure they are GUI
experts.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Uwe Stöhr

> Uwe> You have to set the option "Choose at application startup" then
> Uwe> you can select different languages when you restart Acrobat.

> It seems that it does nothing when only one language is installed.

Yes of corse.

But by the way, you can change the language in "Scilab" (the OpenSource alternative to Mathlab). 
Scilab is also available for Linux, so how is this implemented there? JMarc, aren't you an INRIA 
people and can perhaps ask a collegue?


JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> Afterwards, because our default installation is always in German.

I see. The installation is done globally, right?

Uwe> Changing the language is for example possible in Acrobat.
>>  Yes, I've seen that. On my system the choice is between english
>> and... english :)

Uwe> You have to set the option "Choose at application startup" then
Uwe> you can select different languages when you restart Acrobat.

It seems that it does nothing when only one language is installed.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Uwe Stöhr

Jean-Marc Lasgouttes schrieb:


Uwe> This is correct, I see that some of my foreign collegues change
Uwe> the menu language of a program if possible, from German to
Uwe> English. 


At install time or afterwards?


Afterwards, because our default installation is always in German.


Uwe> Changing the language is for example possible in Acrobat.

>
> Yes, I've seen that. On my system the choice is between english and...
> english :)

You have to set the option "Choose at application startup" then you can select different languages 
when you restart Acrobat.


Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Helge Hafting

Mate Wierdl wrote:

On Mon, Jan 15, 2007 at 06:53:30AM -0600, Mate Wierdl wrote:
  

In my case, I write (science stuff) both in Hungarian and English all
the time.



... and I often share the account with other people.  A typical
scenario: a colleague comes to my office, and wants to show me how a
certain thing is done.  Now which one is the File menu?
  

Easy enough.  Open up a command-line window:
(in linux)
export LANG=whatever ; lyx 


(in windows)
set LANG=whatever
lyx

This way, your foreign colleague can get a lyx in his
preferred language.  And since this _isn't_ bound to a
lyx preference, it won't affect the next lyx you start
from your convenient toolbar / system menu.
You may even have several lyx processes running simultaneously
with different languages if you need.

Helge Hafting



Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Jean-Marc Lasgouttes
> "Mate" == Mate Wierdl <[EMAIL PROTECTED]> writes:

Mate> On Mon, Jan 15, 2007 at 06:53:30AM -0600, Mate Wierdl wrote:
>> In my case, I write (science stuff) both in Hungarian and English
>> all the time.

Mate> ... and I often share the account with other people. A typical
Mate> scenario: a colleague comes to my office, and wants to show me
Mate> how a certain thing is done. Now which one is the File menu?

This is more relevant, I guess :) Personally, I only use the English
interface. 

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Jean-Marc Lasgouttes
> "Mate" == Mate Wierdl <[EMAIL PROTECTED]> writes:

Mate> In my case, I write (science stuff) both in Hungarian and
Mate> English all the time.

But do you need to switch the language of the menus all the time? I
also switch between french and english for the documents.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Mate Wierdl
On Mon, Jan 15, 2007 at 06:53:30AM -0600, Mate Wierdl wrote:
> In my case, I write (science stuff) both in Hungarian and English all
> the time.

... and I often share the account with other people.  A typical
scenario: a colleague comes to my office, and wants to show me how a
certain thing is done.  Now which one is the File menu?

Máté

-- 
---
Máté Wierdl | Dept. of Math. Sciences | University of Memphis  


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Mate Wierdl
In my case, I write (science stuff) both in Hungarian and English all
the time.

Máté
On Mon, Jan 15, 2007 at 10:33:01AM +0100, Jean-Marc Lasgouttes wrote:
> > "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:
> 
> Uwe> In my opinion the setting in LyX's preferences should be taken
> Uwe> and the LANG setting ignored. 
> 
> I would strongly oppose to that in linux.
> 
> Uwe> This implies that I think it is a nice feature be be able to set
> Uwe> the language from inside LyX. This is also possible in many
> Uwe> programs I use and avoids that users have to fiddle around with
> Uwe> environment variables; for example about 90% of the Win users
> Uwe> don't know what an environment variable is and they usually also
> Uwe> don't know that they have to modify a batch file to set LyX's
> Uwe> menu language.
> 
> Where is this setting in word? In firefox?  99% of the users to _not_
> ever need to change this setting. You set the language at install time
> and you are done with it. The one example that Abdel gave is for
> translators. To be more precise, it would be for translators that
> translate in more that one language :)
> 
> I really do not think we need to add lyxrc entries for each and every
> feature that might be useful to someone. 
> 
> JMarc

-- 
---
Máté Wierdl | Dept. of Math. Sciences | University of Memphis  


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> Jean-Marc Lasgouttes schrieb:
>> Where is this setting in word? In firefox? 99% of the users to
>> _not_ ever need to change this setting.

Uwe> This is correct, I see that some of my foreign collegues change
Uwe> the menu language of a program if possible, from German to
Uwe> English. 

At install time or afterwards?

Uwe> Changing the language is for example possible in Acrobat. 

Yes, I've seen that. On my system the choice is between english and...
english :)

Uwe> But OK, this feature is not that important and we should of
Uwe> course not break OS rules. My opinion was only from the sight of
Uwe> an average Windows user.

In both linux and OS X, the user changes the language as a system-wide
setting. This is unfortunately different in windows. But I do not
think it is a problem for many people.

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Helge Hafting

Georg Baum wrote:

Am Sonntag, 14. Januar 2007 19:26 schrieb Enrico Forestieri:

  

This means that when none of the LC_* or LANG variables are set, we are
allowed to do how we please. So, the proposal by Abdel could be 


implemented
  

but only used in this case. As Windows does not set any of the above
variables, this will be the default behaviour. Everybody happy?



Almost: What happens if a user starts LyX with a set environment variable 
(probably from some global system profile), and then changes the 
preference setting and observes that this has no effect? THis should not 
happen, but I don't know what the best solution is.
  

Well, if the user (or the company's pc guy) know how to set
environment variables, then they know how to fix this case.
Of course a dialog for changing the LyX language could come
with a warning that any LANG or LC_* environment
will override the setting.

Ideally, a dialog for changing language could change the
lyx.bat directly.  That way, no need to change the LANG logic
in LyX.  I guess this won't happen though.

Helge Hafting


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Uwe Stöhr

Jean-Marc Lasgouttes schrieb:


Where is this setting in word? In firefox?  99% of the users to _not_
ever need to change this setting.


This is correct, I see that some of my foreign collegues change the menu language of a program if 
possible, from German to English. Changing the language is for example possible in Acrobat.

But OK, this feature is not that important and we should of course not break OS 
rules.
My opinion was only from the sight of an average Windows user.

regards Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Jean-Marc Lasgouttes
> "Uwe" == Uwe Stöhr <[EMAIL PROTECTED]> writes:

Uwe> In my opinion the setting in LyX's preferences should be taken
Uwe> and the LANG setting ignored. 

I would strongly oppose to that in linux.

Uwe> This implies that I think it is a nice feature be be able to set
Uwe> the language from inside LyX. This is also possible in many
Uwe> programs I use and avoids that users have to fiddle around with
Uwe> environment variables; for example about 90% of the Win users
Uwe> don't know what an environment variable is and they usually also
Uwe> don't know that they have to modify a batch file to set LyX's
Uwe> menu language.

Where is this setting in word? In firefox?  99% of the users to _not_
ever need to change this setting. You set the language at install time
and you are done with it. The one example that Abdel gave is for
translators. To be more precise, it would be for translators that
translate in more that one language :)

I really do not think we need to add lyxrc entries for each and every
feature that might be useful to someone. 

JMarc


Re: [PATCH] put Gui language definition in lyxrc

2007-01-15 Thread Alex
Dears,

>>> I think this will result in surprising behaviour.
>>>
>>> 1. Set languag inside lyx to "swedish" (why not?)
>>>- save and exit
>>> 2. run lyx with LANG=no_NO ./lyx
>>>- get a nice swedish lyx
>>>
>>> I think that the ui language should not be settable from inside lyx.
>>>   
>> Well, why is it so important to keep the almightiness of LANG?
>>
>> I think we need a few more opinions before we take a decision.
As a translator I often need to start two LyX session, one using my
local language and the other using english.

It would be impossible or hard to do this without the LANG variable!

This will also break the linux "locale" theorem.

But, if you switch to ignore the LANG variable:

 1. I prefer to create a command line switch to override the lyxrc settings.
 2. create a code that ignore the LANG variable only on Windows!

> This is also possible in many programs I use and avoids that users have
> to fiddle around with environment variables; for example about 90% of
> the Win users don't know what an environment variable is and they
> usually also don't know that they have to modify a batch file to set
> LyX's menu language.

I agree with Uwe, but I think this applies only to the MS platform,
isn't it?


Alex


Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Enrico Forestieri
On Sun, Jan 14, 2007 at 09:04:26PM +0100, Georg Baum wrote:

> Am Sonntag, 14. Januar 2007 19:26 schrieb Enrico Forestieri:
> 
> > This means that when none of the LC_* or LANG variables are set, we are
> > allowed to do how we please. So, the proposal by Abdel could be 
> implemented
> > but only used in this case. As Windows does not set any of the above
> > variables, this will be the default behaviour. Everybody happy?
> 
> Almost: What happens if a user starts LyX with a set environment variable 
> (probably from some global system profile), and then changes the 
> preference setting and observes that this has no effect? THis should not 
> happen, but I don't know what the best solution is.

The check for LC_* and LANG variables could be done at startup and a
boolean could be set. Depending on this boolean, the preference setting
could be disabled.

-- 
Enrico


Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Georg Baum
Am Sonntag, 14. Januar 2007 19:26 schrieb Enrico Forestieri:

> This means that when none of the LC_* or LANG variables are set, we are
> allowed to do how we please. So, the proposal by Abdel could be 
implemented
> but only used in this case. As Windows does not set any of the above
> variables, this will be the default behaviour. Everybody happy?

Almost: What happens if a user starts LyX with a set environment variable 
(probably from some global system profile), and then changes the 
preference setting and observes that this has no effect? THis should not 
happen, but I don't know what the best solution is.


Georg



Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Enrico Forestieri
On Sun, Jan 14, 2007 at 06:36:52PM +0100, Georg Baum wrote:

> What for some users is fiddling is a useful feature for others. I do agree 
> that the LANG variable is not convenient for most windows users, so an 
> alternative should be implemented, but the LANG variable should not be 
> dropped at all.

Quoting the standard:

   The values of locale categories shall be determined by a precedence
   order; the first condition met below determines the value:

   1. If the LC_ALL environment variable is defined and is not null, the
  value of LC_ALL shall be used.
   2. If the LC_* environment variable ( LC_COLLATE , LC_CTYPE ,
  LC_MESSAGES , LC_MONETARY , LC_NUMERIC , LC_TIME ) is defined and is
  not null, the value of the environment variable shall be used to
  initialize the category that corresponds to the environment variable.
   3. If the LANG environment variable is defined and is not null, the
  value of the LANG environment variable shall be used.
   4. If the LANG environment variable is not set or is set to the empty
  string, the implementation-defined default locale shall be used.

This means that when none of the LC_* or LANG variables are set, we are
allowed to do how we please. So, the proposal by Abdel could be implemented
but only used in this case. As Windows does not set any of the above
variables, this will be the default behaviour. Everybody happy?

-- 
Enrico


Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Enrico Forestieri
On Sun, Jan 14, 2007 at 05:22:26PM +0100, Michael Gerz wrote:

> Lars Gullik Bjønnes schrieb:
> > Yes.
> >
> > I think this will result in surprising behaviour.
> >
> > 1. Set languag inside lyx to "swedish" (why not?)
> >- save and exit
> > 2. run lyx with LANG=no_NO ./lyx
> >- get a nice swedish lyx
> >
> > I think that the ui language should not be settable from inside lyx.
> >   
> Well, why is it so important to keep the almightiness of LANG?

Because it is the standard way it works:
http://www.opengroup.org/onlinepubs/95399/basedefs/xbd_chap08.html

> Personally, I don't see all implications of Abdel's proposal. Are there 
> any other programs (Linux/Windows) out there that are configurable at 
> run-time?

I think you will not find any Linux application breaking this rule.
Maybe this is not true on Windows, but Windows hardly follows any rule.

> I think we need a few more opinions before we take a decision.

I am for following the rules.

-- 
Enrico


Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Georg Baum
Am Sonntag, 14. Januar 2007 17:57 schrieb Uwe Stöhr:

> In my opinion the setting in LyX's preferences should be taken and the 
LANG setting ignored.

Not ignored. This is standard on unix as Lars wrote, and I don't want to 
learn a new way of doing this for every program.

> This  
> implies that I think it is a nice feature be be able to set the language 
from inside LyX.
> This is also possible in many programs I use and avoids that users have 
to fiddle around with 
> environment variables; for example about 90% of the Win users don't know 
what an environment 
> variable is and they usually also don't know that they have to modify a 
batch file to set LyX's menu 
> language.

What for some users is fiddling is a useful feature for others. I do agree 
that the LANG variable is not convenient for most windows users, so an 
alternative should be implemented, but the LANG variable should not be 
dropped at all.

BTW, if you want to implement this you also have to switch the qt language 
if you want to do it correctly.


Georg



Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Georg Baum
Am Sonntag, 14. Januar 2007 15:13 schrieb Abdelrazak Younes:

> The Gui elements uses messages_["GUI"] and the translatable element 
> inside a document (mainly layout items) are using messages_[language] 
> where language is given by the Buffer language. We can change that to 
> use the Paragraph layout language instead by the way if there is an 
> interest to do that.

That should be done IMHO (but not necessarily now), since the output will 
look like that.


Georg



Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Uwe Stöhr

Michael Gerz schrieb:


Lars Gullik Bjønnes schrieb:


I think this will result in surprising behaviour.

1. Set languag inside lyx to "swedish" (why not?)
   - save and exit
2. run lyx with LANG=no_NO ./lyx
   - get a nice swedish lyx

I think that the ui language should not be settable from inside lyx.
  

Well, why is it so important to keep the almightiness of LANG?

I think we need a few more opinions before we take a decision.


In my opinion the setting in LyX's preferences should be taken and the LANG setting ignored. This 
implies that I think it is a nice feature be be able to set the language from inside LyX.
This is also possible in many programs I use and avoids that users have to fiddle around with 
environment variables; for example about 90% of the Win users don't know what an environment 
variable is and they usually also don't know that they have to modify a batch file to set LyX's menu 
language.


regards Uwe


Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Lars Gullik Bjønnes
Michael Gerz <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes schrieb:
| > Yes.
| >
| > I think this will result in surprising behaviour.
| >
| > 1. Set languag inside lyx to "swedish" (why not?)
| >- save and exit
| > 2. run lyx with LANG=no_NO ./lyx
| >- get a nice swedish lyx
| >
| > I think that the ui language should not be settable from inside lyx.
| >
| Well, why is it so important to keep the almightiness of LANG?
| 

Because that is the standard way of setting ui languags in any app on
unix.

-- 
Lgb


Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Michael Gerz

Lars Gullik Bjønnes schrieb:

Yes.

I think this will result in surprising behaviour.

1. Set languag inside lyx to "swedish" (why not?)
   - save and exit
2. run lyx with LANG=no_NO ./lyx
   - get a nice swedish lyx

I think that the ui language should not be settable from inside lyx.
  

Well, why is it so important to keep the almightiness of LANG?

Personally, I don't see all implications of Abdel's proposal. Are there 
any other programs (Linux/Windows) out there that are configurable at 
run-time?


I think we need a few more opinions before we take a decision.

Michael



Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Lars Gullik Bjønnes
Abdelrazak Younes <[EMAIL PROTECTED]> writes:

| Hello,
| 
| The attached patch allow to set the language used in the GUI via the
| the lyxrc mechanism. If the new 'gui_language' setting is empty or non
| present, the language will be taken from the environment variables as
| usual.
| 
| With this patch it is now possible the GUI language at run time and we
| don't need anymore the lyx.bat file to set the language before
| launching lyx.
| 
| I believe that the first feature will a time saver for translators.
| The logical place to put this language choice would be in
| Preference->Look&Feel.
| 
| Objection?

Yes.

I think this will result in surprising behaviour.

1. Set languag inside lyx to "swedish" (why not?)
   - save and exit
2. run lyx with LANG=no_NO ./lyx
   - get a nice swedish lyx

I think that the ui language should not be settable from inside lyx.

-- 
Lgb



Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Abdelrazak Younes

Michael Gerz wrote:

Abdelrazak Younes schrieb:

Hello,

The attached patch allow to set the language used in the GUI via the 
the lyxrc mechanism. If the new 'gui_language' setting is empty or non 
present, the language will be taken from the environment variables as 
usual.


With this patch it is now possible the GUI language at run time and we 
don't need anymore the lyx.bat file to set the language before 
launching lyx.
Are you sure that you can switch the language at _run-time_ (rather than 
on start-up)? (Including the menus, dialog fields, tooltips, etc.)?


Yes, sure.



That would be nice, indeed. (But please note that the labels in a 
documents depend on the document's language not on the general settings)


I know. If you look closely at the code those two path to get a 
translation are completely separated.


The Gui elements uses messages_["GUI"] and the translatable element 
inside a document (mainly layout items) are using messages_[language] 
where language is given by the Buffer language. We can change that to 
use the Paragraph layout language instead by the way if there is an 
interest to do that.


Abdel.



Re: [PATCH] put Gui language definition in lyxrc

2007-01-14 Thread Michael Gerz

Abdelrazak Younes schrieb:

Hello,

The attached patch allow to set the language used in the GUI via the 
the lyxrc mechanism. If the new 'gui_language' setting is empty or non 
present, the language will be taken from the environment variables as 
usual.


With this patch it is now possible the GUI language at run time and we 
don't need anymore the lyx.bat file to set the language before 
launching lyx.
Are you sure that you can switch the language at _run-time_ (rather than 
on start-up)? (Including the menus, dialog fields, tooltips, etc.)?


That would be nice, indeed. (But please note that the labels in a 
documents depend on the document's language not on the general settings)


Michael