Re: localization when part of the code is in different place than pylons project.

2008-01-31 Thread Mikael Lepistö
Gotta try relative path too, I'm quite sure I tried to do that as well :)

On 1/29/08, Philip Jenvey [EMAIL PROTECTED] wrote:


 On Jan 28, 2008, at 4:07 AM, Mikael Lepistö wrote:

  I tried this one already, it seemed to work only if the tookit dir is
  under the pylons project tree like this:
 
  myprojects/pylonsproject/
  myprojects/pylonsproject/pylonsproject
  myprojects/pylonsproject/toolkit
 
  situation that I would like is:
 
  myprojects/pylonsproject/
  myprojects/pylonsproject/pylonsproject
  myprojects/toolkit
 

 Are you saying specifying ../toolkit does not work? If not, that's
 probably a babel bug.

It seems that I never tried this one or I made it wrong before. This
seems to work now :) Thank you for your advice.

- mikael

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: localization when part of the code is in different place than pylons project.

2008-01-28 Thread Mikael Lepistö
I tried this one already, it seemed to work only if the tookit dir is
under the pylons project tree like this:

myprojects/pylonsproject/
myprojects/pylonsproject/pylonsproject
myprojects/pylonsproject/toolkit

situation that I would like is:

myprojects/pylonsproject/
myprojects/pylonsproject/pylonsproject
myprojects/toolkit

I also tried to do symbolic link from myprojects/toolkit to
myprojects/pylonsproject/toolkit, but it did not work either...

- Mikael

On Jan 27, 2008 5:18 PM, Alberto Valverde [EMAIL PROTECTED] wrote:


 Mikael Lepist� wrote:
  Hi,
 
  We have a toolkit library that we use in many pylons projects and it
  is outside of normal pylons project tree. Now we have problem, that we
  cannot get setup tools to extract messages outside of our pylons
  source tree to get localization also for toolkit.
 
  our directory structure is basically like this:
 
  pylonsproject/
  toolkit/
 
  I tried to make symbolic link to toolkit dir to
  pylonsproject/pylonsproject/toolkit
 
  but it didn't work.
 
  Is it possible to read texts for pylons project from different
  directory to the same catalog where is pylon project translations? Or
  would it be possible to extract messages separately for toolkit and
  set pylons to use them in addition to
  pylonsproject/pylonsproject/i18n/pylonsproject.po stuff?
 
  We wold not like to do localizations same way that they are done with
  validators, by passing strings for message-keys to the functions.

 This is how the relevant section of setup.py in a project of mine looks
 to extract messages using Babel from FormEncode:

 message_extractors = {
 'thirdparty/FormEncode/formencode': [
 ('**.py', 'python', None),
 ],
 'myapp/templates' : ...,
 etc...
 }

 thirdparty/Formencode is a svn-external where I make a checkout of a FE tag.

 Although this solution works for me it is suboptimal IMO. Ideally there
 would be a way for catalogs from different eggs to be merged together
 somehow so that just installing an egg and probably listing it somewhere
 would do the job without needing a source checkout. Probably Babel's
 competence though.. Any ideas?

 Alberto

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: localization when part of the code is in different place than pylons project.

2008-01-28 Thread Philip Jenvey


On Jan 28, 2008, at 4:07 AM, Mikael Lepistö wrote:

 I tried this one already, it seemed to work only if the tookit dir is
 under the pylons project tree like this:

 myprojects/pylonsproject/
 myprojects/pylonsproject/pylonsproject
 myprojects/pylonsproject/toolkit

 situation that I would like is:

 myprojects/pylonsproject/
 myprojects/pylonsproject/pylonsproject
 myprojects/toolkit


Are you saying specifying ../toolkit does not work? If not, that's  
probably a babel bug.

Babel just works on path names. I'd try using it via the command line  
and seeing if it works that way.

To do what you suggested -- extract both projects separately, then  
merge them later when necessary, I think Babel would need a gnu  
gettext msgcat-like feature. You might want to log an enhancement  
ticket on the Babel trac for this.

--
Philip Jenvey



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: localization when part of the code is in different place than pylons project.

2008-01-27 Thread Alberto Valverde

Mikael Lepistö wrote:
 Hi,
 
 We have a toolkit library that we use in many pylons projects and it
 is outside of normal pylons project tree. Now we have problem, that we
 cannot get setup tools to extract messages outside of our pylons
 source tree to get localization also for toolkit.
 
 our directory structure is basically like this:
 
 pylonsproject/
 toolkit/
 
 I tried to make symbolic link to toolkit dir to
 pylonsproject/pylonsproject/toolkit
 
 but it didn't work.
 
 Is it possible to read texts for pylons project from different
 directory to the same catalog where is pylon project translations? Or
 would it be possible to extract messages separately for toolkit and
 set pylons to use them in addition to
 pylonsproject/pylonsproject/i18n/pylonsproject.po stuff?
 
 We wold not like to do localizations same way that they are done with
 validators, by passing strings for message-keys to the functions.

This is how the relevant section of setup.py in a project of mine looks
to extract messages using Babel from FormEncode:

message_extractors = {
'thirdparty/FormEncode/formencode': [
('**.py', 'python', None),
],
'myapp/templates' : ...,
etc...
}

thirdparty/Formencode is a svn-external where I make a checkout of a FE tag.

Although this solution works for me it is suboptimal IMO. Ideally there
would be a way for catalogs from different eggs to be merged together
somehow so that just installing an egg and probably listing it somewhere
would do the job without needing a source checkout. Probably Babel's
competence though.. Any ideas?

Alberto

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



localization when part of the code is in different place than pylons project.

2008-01-27 Thread Mikael Lepistö

Hi,

We have a toolkit library that we use in many pylons projects and it
is outside of normal pylons project tree. Now we have problem, that we
cannot get setup tools to extract messages outside of our pylons
source tree to get localization also for toolkit.

our directory structure is basically like this:

pylonsproject/
toolkit/

I tried to make symbolic link to toolkit dir to
pylonsproject/pylonsproject/toolkit

but it didn't work.

Is it possible to read texts for pylons project from different
directory to the same catalog where is pylon project translations? Or
would it be possible to extract messages separately for toolkit and
set pylons to use them in addition to
pylonsproject/pylonsproject/i18n/pylonsproject.po stuff?

We wold not like to do localizations same way that they are done with
validators, by passing strings for message-keys to the functions.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---