Re: [PD] choose language

2013-01-11 Thread IOhannes zmölnig

On 01/10/2013 10:11 PM, András Murányi wrote:

Does it mean that there are no GUI strings in the C code?


There are GUI strings in the C code, but in order for you to see them, they
are sent to pd-gui, the Tcl process.  If you're running in -nogui mode,
there
will be no translations since all the translations are handled in Tcl.



Ah! BTW, would it take much to have gettext working on the C side too?




i think, the pd-core should be blissfully unaware of all translations.
all the interface is done via the GUI, so everything that is 
presentational should be handled exclusively via the GUI (based on 
information it get's from the core).


if you want to run Pd without GUI and still have translations available 
(e.g. of the File-Menu :-)), they could run the output of Pd through a 
filter that uses the po files to translate.


but the DSP-core should not be bothered by those things.

fgamsdr
IOhannes

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-10 Thread András Murányi
On Wed, Jan 9, 2013 at 5:35 PM, Hans-Christoph Steiner h...@at.or.atwrote:


 Since Tcl handles all of the changing of English strings to the chosen
 language,


Does it mean that there are no GUI strings in the C code?


 it is theoritically possible to do in a plugin.  The key problem is
 that the translations are loaded (load_locale in pd-gui.tcl) before the
 plugins and Tcl's msgcat, the library for the translations, provides
 mcload,
 but no mkunload.


To be exact, not even mcunload would be necessary, just a way to reload
strings according to the new locale. Unfortunately, this functionality is
missing from TCL (there are some feature requests in the tracker that
target it, though).
So, to effectively change the GUI language, Pd needs to be restarted. Do we
wish to have a language selection option in the preferences, which  writes
its setting somewhere on the disk, and then load_locale would be changed in
a way that it takes a look at the saved setting before defaulting to the
OS/env language? (my vote is: no)

András



 .hc

 On 01/09/2013 10:35 AM, András Murányi wrote:
  I have visited this problem some time ago, and these were my (more or
 less
  accurate) findings:
  - There are language strings in the C code as well as in Tcl
  - In Tcl there is a straightforward way to redefine the language, but I
  haven't found a way to change the actual strings on the display without
  having to restart Pd
  - I have no idea how it goes on the C side :)
  - My impression is that this may go beyond the scope of a plugin
 
  András
 
  On Wed, Jan 9, 2013 at 2:50 PM, batinste dwanaf...@yahoo.fr wrote:
 
  language-plugin, anyone ? :)
 
 
  On 09/01/2013 14:23, Hans-Christoph Steiner wrote:
 
  The easiest way is to start it in the Terminal like this:
 
  GNU/Linux: LANG=en pd-extended
  Mac OS X:  LANG=en /Applications/Pd-extended.app/**
  Contents/Resources/bin/pd
  Windows (in cmd.exe):
set LANG=en
%ProgramFiles%\pd\bin\pd
 
  If you want to force English, you can also delete the .msg files in the
  pd/po
  folder.
 
  .hc
 
 
  On 01/09/2013 07:05 AM, João Pais wrote:
 
  Hi,
 
  with the latest Pd version, Pd uses the system language as standard.
 The
  thing
  is, I want to keep my Pd in english. How is it possible to set the
  language
  when starting Pd?
 
  Where can suggestions to the language be sent?
 
  Best,
 
  João
 
 
 
 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-10 Thread Hans-Christoph Steiner
On 01/10/2013 12:36 PM, András Murányi wrote:
 On Wed, Jan 9, 2013 at 5:35 PM, Hans-Christoph Steiner h...@at.or.atwrote:
 

 Since Tcl handles all of the changing of English strings to the chosen
 language,
 
 
 Does it mean that there are no GUI strings in the C code?

There are GUI strings in the C code, but in order for you to see them, they
are sent to pd-gui, the Tcl process.  If you're running in -nogui mode, there
will be no translations since all the translations are handled in Tcl.

 
 
 it is theoritically possible to do in a plugin.  The key problem is
 that the translations are loaded (load_locale in pd-gui.tcl) before the
 plugins and Tcl's msgcat, the library for the translations, provides
 mcload,
 but no mkunload.

 
 To be exact, not even mcunload would be necessary, just a way to reload
 strings according to the new locale. Unfortunately, this functionality is
 missing from TCL (there are some feature requests in the tracker that
 target it, though).
 So, to effectively change the GUI language, Pd needs to be restarted. Do we
 wish to have a language selection option in the preferences, which  writes
 its setting somewhere on the disk, and then load_locale would be changed in
 a way that it takes a look at the saved setting before defaulting to the
 OS/env language? (my vote is: no)

That would be possible.  I would be willing to accept such a patch if it was
well tested but I'm not going to write it :)

.hc


 
 András
 
 

 .hc

 On 01/09/2013 10:35 AM, András Murányi wrote:
 I have visited this problem some time ago, and these were my (more or
 less
 accurate) findings:
 - There are language strings in the C code as well as in Tcl
 - In Tcl there is a straightforward way to redefine the language, but I
 haven't found a way to change the actual strings on the display without
 having to restart Pd
 - I have no idea how it goes on the C side :)
 - My impression is that this may go beyond the scope of a plugin

 András

 On Wed, Jan 9, 2013 at 2:50 PM, batinste dwanaf...@yahoo.fr wrote:

 language-plugin, anyone ? :)


 On 09/01/2013 14:23, Hans-Christoph Steiner wrote:

 The easiest way is to start it in the Terminal like this:

 GNU/Linux: LANG=en pd-extended
 Mac OS X:  LANG=en /Applications/Pd-extended.app/**
 Contents/Resources/bin/pd
 Windows (in cmd.exe):
   set LANG=en
   %ProgramFiles%\pd\bin\pd

 If you want to force English, you can also delete the .msg files in the
 pd/po
 folder.

 .hc


 On 01/09/2013 07:05 AM, João Pais wrote:

 Hi,

 with the latest Pd version, Pd uses the system language as standard.
 The
 thing
 is, I want to keep my Pd in english. How is it possible to set the
 language
 when starting Pd?

 Where can suggestions to the language be sent?

 Best,

 João





 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-10 Thread András Murányi
On Thu, Jan 10, 2013 at 7:25 PM, Hans-Christoph Steiner h...@at.or.atwrote:

 On 01/10/2013 12:36 PM, András Murányi wrote:
  On Wed, Jan 9, 2013 at 5:35 PM, Hans-Christoph Steiner h...@at.or.at
 wrote:
 
 
  Since Tcl handles all of the changing of English strings to the chosen
  language,
 
 
  Does it mean that there are no GUI strings in the C code?

 There are GUI strings in the C code, but in order for you to see them, they
 are sent to pd-gui, the Tcl process.  If you're running in -nogui mode,
 there
 will be no translations since all the translations are handled in Tcl.


Ah! BTW, would it take much to have gettext working on the C side too?




  it is theoritically possible to do in a plugin.  The key problem is
  that the translations are loaded (load_locale in pd-gui.tcl) before the
  plugins and Tcl's msgcat, the library for the translations, provides
  mcload,
  but no mkunload.
 
 
  To be exact, not even mcunload would be necessary, just a way to reload
  strings according to the new locale. Unfortunately, this functionality is
  missing from TCL (there are some feature requests in the tracker that
  target it, though).
  So, to effectively change the GUI language, Pd needs to be restarted. Do
 we
  wish to have a language selection option in the preferences, which
  writes
  its setting somewhere on the disk, and then load_locale would be changed
 in
  a way that it takes a look at the saved setting before defaulting to the
  OS/env language? (my vote is: no)

 That would be possible.  I would be willing to accept such a patch if it
 was
 well tested but I'm not going to write it :)

 .hc


Well I shall not take on more things (but to carry on with things that I've
already started), but... :)
This stuff would actually be another driver for me to dive into the prefs
system... and eventually evolve that a bit, too*.

* right now the guiprefs system is geared towards the recentfiles list, and
it might need some mods to serve other purposes as well.

András
___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-09 Thread Hans-Christoph Steiner

The easiest way is to start it in the Terminal like this:

GNU/Linux: LANG=en pd-extended
Mac OS X:  LANG=en /Applications/Pd-extended.app/Contents/Resources/bin/pd
Windows (in cmd.exe):
 set LANG=en
 %ProgramFiles%\pd\bin\pd

If you want to force English, you can also delete the .msg files in the pd/po
folder.

.hc


On 01/09/2013 07:05 AM, João Pais wrote:
 Hi,
 
 with the latest Pd version, Pd uses the system language as standard. The thing
 is, I want to keep my Pd in english. How is it possible to set the language
 when starting Pd?
 
 Where can suggestions to the language be sent?
 
 Best,
 
 João
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-09 Thread batinste

language-plugin, anyone ? :)

On 09/01/2013 14:23, Hans-Christoph Steiner wrote:

The easiest way is to start it in the Terminal like this:

GNU/Linux: LANG=en pd-extended
Mac OS X:  LANG=en /Applications/Pd-extended.app/Contents/Resources/bin/pd
Windows (in cmd.exe):
  set LANG=en
  %ProgramFiles%\pd\bin\pd

If you want to force English, you can also delete the .msg files in the pd/po
folder.

.hc


On 01/09/2013 07:05 AM, João Pais wrote:

Hi,

with the latest Pd version, Pd uses the system language as standard. The thing
is, I want to keep my Pd in english. How is it possible to set the language
when starting Pd?

Where can suggestions to the language be sent?

Best,

João

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-09 Thread Max
i think this should be handled by the OS.
also there are apps for that:
http://www.tj-hd.co.uk/languageswitcher


Am 09.01.2013 um 14:50 schrieb batinste dwanaf...@yahoo.fr:

 language-plugin, anyone ? :)
 
 On 09/01/2013 14:23, Hans-Christoph Steiner wrote:
 The easiest way is to start it in the Terminal like this:
 
 GNU/Linux: LANG=en pd-extended
 Mac OS X:  LANG=en /Applications/Pd-extended.app/Contents/Resources/bin/pd
 Windows (in cmd.exe):
  set LANG=en
  %ProgramFiles%\pd\bin\pd
 
 If you want to force English, you can also delete the .msg files in the pd/po
 folder.
 
 .hc
 
 
 On 01/09/2013 07:05 AM, João Pais wrote:
 Hi,
 
 with the latest Pd version, Pd uses the system language as standard. The 
 thing
 is, I want to keep my Pd in english. How is it possible to set the language
 when starting Pd?
 
 Where can suggestions to the language be sent?
 
 Best,
 
 João

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-09 Thread András Murányi
I have visited this problem some time ago, and these were my (more or less
accurate) findings:
- There are language strings in the C code as well as in Tcl
- In Tcl there is a straightforward way to redefine the language, but I
haven't found a way to change the actual strings on the display without
having to restart Pd
- I have no idea how it goes on the C side :)
- My impression is that this may go beyond the scope of a plugin

András

On Wed, Jan 9, 2013 at 2:50 PM, batinste dwanaf...@yahoo.fr wrote:

 language-plugin, anyone ? :)


 On 09/01/2013 14:23, Hans-Christoph Steiner wrote:

 The easiest way is to start it in the Terminal like this:

 GNU/Linux: LANG=en pd-extended
 Mac OS X:  LANG=en /Applications/Pd-extended.app/**
 Contents/Resources/bin/pd
 Windows (in cmd.exe):
   set LANG=en
   %ProgramFiles%\pd\bin\pd

 If you want to force English, you can also delete the .msg files in the
 pd/po
 folder.

 .hc


 On 01/09/2013 07:05 AM, João Pais wrote:

 Hi,

 with the latest Pd version, Pd uses the system language as standard. The
 thing
 is, I want to keep my Pd in english. How is it possible to set the
 language
 when starting Pd?

 Where can suggestions to the language be sent?

 Best,

 João


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] choose language

2013-01-09 Thread Hans-Christoph Steiner

Since Tcl handles all of the changing of English strings to the chosen
language, it is theoritically possible to do in a plugin.  The key problem is
that the translations are loaded (load_locale in pd-gui.tcl) before the
plugins and Tcl's msgcat, the library for the translations, provides mcload,
but no mkunload.

.hc

On 01/09/2013 10:35 AM, András Murányi wrote:
 I have visited this problem some time ago, and these were my (more or less
 accurate) findings:
 - There are language strings in the C code as well as in Tcl
 - In Tcl there is a straightforward way to redefine the language, but I
 haven't found a way to change the actual strings on the display without
 having to restart Pd
 - I have no idea how it goes on the C side :)
 - My impression is that this may go beyond the scope of a plugin
 
 András
 
 On Wed, Jan 9, 2013 at 2:50 PM, batinste dwanaf...@yahoo.fr wrote:
 
 language-plugin, anyone ? :)


 On 09/01/2013 14:23, Hans-Christoph Steiner wrote:

 The easiest way is to start it in the Terminal like this:

 GNU/Linux: LANG=en pd-extended
 Mac OS X:  LANG=en /Applications/Pd-extended.app/**
 Contents/Resources/bin/pd
 Windows (in cmd.exe):
   set LANG=en
   %ProgramFiles%\pd\bin\pd

 If you want to force English, you can also delete the .msg files in the
 pd/po
 folder.

 .hc


 On 01/09/2013 07:05 AM, João Pais wrote:

 Hi,

 with the latest Pd version, Pd uses the system language as standard. The
 thing
 is, I want to keep my Pd in english. How is it possible to set the
 language
 when starting Pd?

 Where can suggestions to the language be sent?

 Best,

 João


 
 
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list
 

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list