Re: Feedback from TranslateBehavior creator needed

2009-06-09 Thread Grzegorz Pawlik
I can't deal without this script which copies contents to i18n table, though. It's because when I leave those original fields - they have "higest priority", and they're the same as last saved translation ;) So I just need to copy them, and drop those fields. Needed to experience lot's of pain befo

Re: Feedback from TranslateBehavior creator needed

2009-06-09 Thread Grzegorz Pawlik
And I'm fairly sure I don't need to do that trick in save method ;) On 9 Cze, 15:30, Grzegorz Pawlik wrote: > Ok, I'll suppress my 'general why questions compulsive behaviour' ;) > > About not existing callback - just a mistake. I meant beforeFind of > course. But it's not the point. > I Talk ab

Re: Feedback from TranslateBehavior creator needed

2009-06-09 Thread Grzegorz Pawlik
Ok, I'll suppress my 'general why questions compulsive behaviour' ;) About not existing callback - just a mistake. I meant beforeFind of course. But it's not the point. I Talk about ArticleVersion and ArticlePage, because those two models I want to have translatable, but that is not the problem e

Re: Feedback from TranslateBehavior creator needed

2009-06-05 Thread jitka (poLK)
> If so - why it's like that? Is it some backward compatibility? Because > it's seems a little bit weird. I am not The One who rules whole world, my friend. And I don't like general 'why' questions too :) because I am not mindreader to be sure why it seems weird to you. Names of subfolders in ap

Re: Feedback from TranslateBehavior creator needed

2009-06-05 Thread Grzegorz Pawlik
> Once again: language and locale are different things and you should > not mix language and locale codes together like that. Language is 2 > characters string from Configure/Session 'Config.language', > initialized by autodetection or forced by application code. Locale > identifier used by Trans

Re: Feedback from TranslateBehavior creator needed

2009-06-04 Thread jitka (poLK)
> Question: Why App.locales is better place for locales? I get it why > Config.language is a bad place. But is App.locales because there's > some convention I don't know about? Or maybe just Your ideaof place to > store this stuff? App.locales is not used by CakePHP core and just sounds reasonabl

Re: Feedback from TranslateBehavior creator needed

2009-06-01 Thread Grzegorz Pawlik
I don't think that beforeFind is a good place to set the locale field, because when I moved on with i18n'ing my App and tried to do that stuff: $pages = $this->ArticleVersion->ArticlePage->find('all', array( 'conditions' => array ( 'ArticlePage.arti

Re: Feedback from TranslateBehavior creator needed

2009-06-01 Thread Grzegorz Pawlik
Ok, now I'm even more confused than before ;) So I'll keep nagging You. Question: Why App.locales is better place for locales? I get it why Config.language is a bad place. But is App.locales because there's some convention I don't know about? Or maybe just Your ideaof place to store this stuff?

Re: Feedback from TranslateBehavior creator needed

2009-05-31 Thread jitka (poLK)
In AppModel::beforeFind() would be useful to check $this->Behaviors->attached('Translate') && $this->Behaviors->enabled('Translate') --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this gr

Re: Feedback from TranslateBehavior creator needed

2009-05-31 Thread jitka (poLK)
Instead of AppModel contructor, I would vote for AppModel::beforeFind () - and one thing to keep in mind: locale for translation you're looking for should be first in locale array. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Feedback from TranslateBehavior creator needed

2009-05-31 Thread jitka (poLK)
> > > There's ArticleVersion model, which have this fields: id, name: > > > varchar, introduction:text, created:datetime. > > > > I've defined to name and introduction fields to be translatable: > > > var $actsAs = array('Translate' => array('name', 'introduction')); > > > Table for ArticleVersion

Re: Feedback from TranslateBehavior creator needed

2009-05-31 Thread Grzegorz Pawlik
Hello Jitka :) I remember You from our discussion about my performance trick in cake.1.1 ;) On 30 Maj, 03:41, "jitka (poLK)" wrote: > > There's ArticleVersion model, which have this fields: id, name: > > varchar, introduction:text, created:datetime. > > > I've defined to name and introduction fi

Re: Feedback from TranslateBehavior creator needed

2009-05-29 Thread jitka (poLK)
> There's ArticleVersion model, which have this fields: id, name: > varchar, introduction:text, created:datetime. > > I've defined to name and introduction fields to be translatable: > var $actsAs = array('Translate' => array('name', 'introduction')); Table for ArticleVersion model should not con

Feedback from TranslateBehavior creator needed

2009-05-28 Thread Grzegorz Pawlik
Hello, I have some issues while working with TranslateBehavior. I'll try get to the point: There's ArticleVersion model, which have this fields: id, name: varchar, introduction:text, created:datetime. I've defined to name and introduction fields to be translatable: var $actsAs = array('Translate