[symfony-users] Fwd: I18N Translation: Looking for best tools
Hello Everyone, Does anyone have ideas ? Thanks and Regards, JoJo -- Forwarded message -- From: JoJo jojoyangd...@gmail.com Date: 2010/12/22 Subject: I18N Translation: Looking for best tools To: symfony-users@googlegroups.com Hello guys, I would like to know if anyone use some good translation tools for symfony translation files (xliff). Of course, we could translate directly in these xliff files, but it isn't quite practical, because we can't know where the word appears on site web. For example, if we translate the word 'room', we don't know exactly if it means a room or space in the text it is used. So I want to find a tool which can show dynamically the context, for example, display the whole text which contains the keyword. I tried the tool ' Open Language Toolshttps://open-language-tools.dev.java.net/' quickly, but I think that it can't meet the need. Any suggestion is welcomed. Thanks in advance. JoJo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] custom validator with sfValidator
Hi, I'd like to create a custom validator for a sfWidgetFormInputText. This validator have to ensure than the value entered is greater than a value stored in the database. Is it possible ? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] How to avoid breaking MVC separation while loading partial from controller.
Hi Folks I use symfony 1.4. At some places in my action.class.php I have used getPartial method when ever there is a need to change the view via ajax. public function executeFastAction() { $returnText = $this-getPartial('myPartial', array('myVrialbles'= $val)) return $this-renderText($returnText); } But I happen to read in symfony docs that this breaks the symfony MVC separation. ( visit link for reference http://www.symfony-project.org/book/1_0/18-performance ) Is there a better way to do this? Or what is the standard way of doing this anyway? Thanks Deepak Kumar INDIA -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Symfony 1.4 + propel15 ondemand hydration
if someone should have the same problem in the future, the user ventzy on the symfony forum has found a workaround for the problem: $articles = ArticleQuery::create() -useArticleI18nQuery() -filterByCulture('bg') -endUse() -withColumn('ArticleI18n.Title', 'TitleBg') -filterByProductId(285) -setFormatter(ModelCriteria::FORMAT_ON_DEMAND) -find(); foreach ($articles as $article) { echo $article-getId(); echo $article-getTitleBg(); } the discussion is here: http://forum.symfony-project.org/viewtopic.php?f=22t=31281 On Dec 9, 3:13 pm, Thor thorste...@gmail.com wrote: Hi all, i have some code that looks as follows: $list = ObjQuery::create()-setFormatter(ModelCriteria::ON_DEMAND)- find(); That returns me a certain number of objs in a propelcollection. If to this code i add the following (for example) foreach ( $list as $o) { echo $o-getId() . - . $o-getName($culture); } i have something like 1 - first name 2 - first name 3 - first name (etc..) it just looks as if the hydration didn't get the correct i18n related object. Do you ever had some similar behavior in your code? do you have some idea on what could i look to find a solution to this problem? thank you very muc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: How to avoid breaking MVC separation while loading partial from controller.
Thats the way it should be done IMHO. You just should use the shortcut: return $this-renderPartial('myPartial', array('myVrialbles'= $val)); You could also use a full view rendering, by returning sfView::SUCCESS; (or wathever else) and then move your presentation in the fastActionSuccess.php template. If your view needs to be customized, you should move it in a separate template, instead of doing everything in your action. But if you just render a partial, it finally the same: - return the name of the template to render - return the rendered partial -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: custom validator with sfValidator
Yes use a validator callback and put it in the post validator On 23 déc, 09:47, jimpass cedricd...@gmail.com wrote: Hi, I'd like to create a custom validator for a sfWidgetFormInputText. This validator have to ensure than the value entered is greater than a value stored in the database. Is it possible ? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] displaying collection/s in templates
hello, i've just migrated to Symfony framework a few days ago and I'm wondering one thing. which approach would be best to use when you want to display a collection (particularly hierarchical data - categories) inside a template? should I make a helper that would retrieve collection (object/s) from a database or would it be better to make a static function inside an object helper ObjectTable ? i've been thinking of making a static function getRecords() in the model, and then build a proper html output with a helper, which is called directly from the template? thanks a lot for help -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Fwd: I18N Translation: Looking for best tools
Also Can't find any decent tool. On Dec 23, 2:44 pm, JoJo jojoyangd...@gmail.com wrote: Hello Everyone, Does anyone have ideas ? Thanks and Regards, JoJo -- Forwarded message -- From: JoJo jojoyangd...@gmail.com Date: 2010/12/22 Subject: I18N Translation: Looking for best tools To: symfony-users@googlegroups.com Hello guys, I would like to know if anyone use some good translation tools for symfony translation files (xliff). Of course, we could translate directly in these xliff files, but it isn't quite practical, because we can't know where the word appears on site web. For example, if we translate the word 'room', we don't know exactly if it means a room or space in the text it is used. So I want to find a tool which can show dynamically the context, for example, display the whole text which contains the keyword. I tried the tool ' Open Language Toolshttps://open-language-tools.dev.java.net/' quickly, but I think that it can't meet the need. Any suggestion is welcomed. Thanks in advance. JoJo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [Symfony2] .htaccess for SEO (force non www, remove index.php from url)
On Tue, Dec 21, 2010 at 9:56 PM, gordonslondon jules.boussek...@gmail.com wrote: For the first one i have (it's work great but when i go to www.example.com/mypage it redirects to example.com/): RewriteCond %{HTTP_HOST} ^www\.[a-z-]+\.[a-z]{2,6} [NC] RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301] I believe this could be summed up in two lines: RewriteCond %{HTTP_HOST} ^www\.([^.]+\.[^.]+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301] Not sure how well this (or your version) will support HTTPS though. In any case I don't really think this belongs in the default htaccess file of the framework, but it could be documented somewhere maybe. Cheers -- Jordi Boggiano @seldaek :: http://seld.be/ -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: [symfony-devs] Easy migration from Symfony 1.x to 2.0
Hi, Is there any updates about this topic? I have to start developing a new web application and I want to use symfony as Php Framework but I need to know if it's better to start with symfony 2.0 or with the current 1.4 release. I'm interested in the performance improvement of the 2.0 version, supposing your response will be to start from the 1.4 release how difficult will be the migration to 2.0 version when it will be stable? Sorry for my bad english. Look forward your response. Thank You Federico -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: [symfony-devs] Easy migration from Symfony 1.x to 2.0
I'm finishing my first serious project with Symfony 2 and I must say that I feel that I made the right choice when I made myself the same question that you're asking. Symfony 2 it's already pretty stable and if you don't mind updating your code from time to time, then you're good to go. I think there will be no big changes from this time to march when the stable version be finally released . A pretty important point is that Doctrine 2 has a stable version now so, in my opinion, it's a great moment to start a project with Symfony 2. And talking about migration from 1.x to 2.0, it's not an easy task as you would have to migrate by hand everything, except perhaps the Doctrine 1.x schema, because Doctrine 2 comes with a task to migrate from 1.x to 2.0 but I didn't try it. They're two different frameworks with different architectures. Take a look at the symfony 2 docs to get an overview of how the framework works now and you'll get a pretty good idea of possibilities regarding migration. I would say that the best choice now is to start a project with Symfony 2. And if you decide to start a project with 1.4, I would keep that project with that version. Don't think in migration. My two cents. Best regards.- On Thu, Dec 23, 2010 at 1:24 PM, Federico Torresan ftorresan.gru...@gmail.com wrote: Hi, Is there any updates about this topic? I have to start developing a new web application and I want to use symfony as Php Framework but I need to know if it's better to start with symfony 2.0 or with the current 1.4 release. I'm interested in the performance improvement of the 2.0 version, supposing your response will be to start from the 1.4 release how difficult will be the migration to 2.0 version when it will be stable? Sorry for my bad english. Look forward your response. Thank You Federico -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [Symfony2] .htaccess for SEO (force non www, remove index.php from url)
thanks for your response, all works perfectly with: IfModule mod_rewrite.c RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php [QSA,L] # force url with no www RewriteCond %{HTTP_HOST} ^www\.([^.]+\.[^.]+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301] # force url with no index.php RewriteCond %{THE_REQUEST} index.php RewriteRule ^index.php/(.*)$ http://%{HTTP_HOST}/$1 [R=301,NS] /IfModule BUT if i make a request to *www.example.com/mypage* i'm redirected to * example.com/* (instead of example.com/mypage), so the problem is here: # force url with no www RewriteCond %{HTTP_HOST} ^www\.([^.]+\.[^.]+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301] many thaks -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: custom validator with sfValidator
Hi, I'm not a symfony expert, but i think that you can do easy what you want, creatin a new file of your own validator in /lib/validator/ For example you can create a file ThisIsMyValidator.class.php That cointains a class that inherit the class of TextValidator (Not sure about that i had used my own validator class inheriting the sfValidatorBase. Example: class sfValidatorCUIT extends sfValidatorBase { protected function configure($options = array(), $messages = array()) // In this method you can configure the error messages by default and some options. { $this-addMessage('cuit_invalido', 'El Cuit/Cuil %value% es invalido'); $this-addMessage('cuit_incompleto', 'Error, los Cuit/Cuil tienen 11 numeros'); $this-addOption('max_length'); $this-addOption('min_length'); $this-setOption('empty_value', ''); } protected function doClean($value) // The metod that validates , value it's the value to validate { $cuit = (string) $value; // Here much lines omited that do other stuff with $i variable for ($i=0; $i strlen($cuit); $i= $i +1) { throw new sfValidatorError($this, 'cuit_invalido', array('value' = $value)); // Here i launch the error } return cuit; // if all it's rigth i return this value } } Hope this helps you Nicolas -- Nicolas G. Ardison nicolas@gmail.com Antes de imprimir este mensaje, asegúrese de que es necesario. El medio ambiente está en nuestras manos. Before printing, think about the environment. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: custom validator with sfValidator
you can simply pass the min number as a form option then pass as min option of http://www.symfony-project.org/api/1_4/sfValidatorNumber -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: custom validator with sfValidator
Great thanks for all your responses, In fact i follow the solution of bedomon, i create a sfValidatorCallback in my form like that $this-validatorSchema['MyField'] = new sfValidatorCallback(array('callback' = array($this, 'validateMhq'))); and i add this function : public function validateMhq(sfValidatorBase $validator, $value) { $site = sfContext::getInstance()-getUser()-getProfile()-getSite(); $param = Doctrine_Core::getTable('Param')-findOneBySiteId($site); if ( $value $param-getMhq()) { throw new sfValidatorError($validator, 'Value is greater than Mhq'); } else { return $value; } } It works !, so thanks again bedomon. In fact i think that the solution of Ken is a good idea. On 23 déc, 20:54, ken marfillas...@gmail.com wrote: you can simply pass the min number as a form option then pass as min option ofhttp://www.symfony-project.org/api/1_4/sfValidatorNumber -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] help with symfony chapter 3...data model
Of course, feel free to create that directory web/uploads/jobs/ ;) That should gonna make it. 2010/12/22 Wiynn wiynn...@gmail.com in the data model chapter this is explaind but i donot get it The job fixture file references two images. You can download them (http://www.symfony-project.org/get/jobeet/sensio-labs.gif, http://www.symfony-project.org/get/jobeet/extreme-sensio.gif) and put them under the web/uploads/jobs/ directory. i realise that i donot have this path but mine is web/uploads should i create the jobs as a new folder and then put those images ? when i run my stuff in a browser i only get the text but the images are donot appear in the layout..am vey new to this what should ido 2 download these pictures. pliz help -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Admin Generator removes sortable headers
Yes, you did something wrong for sure. That happened to me but for a foreign related object column. You should give more info to us, may be we can help you to debug it. 2010/12/22 Gandalf ganda...@gmail.com This is probably a bug in your code somewhere. Works for me. On 12/22/10, Scott O'Brien king.scot...@gmail.com wrote: Hi all. I've just been playing with the Admin Generator module. When I add in the 'display' field to choose a subset of my fields, my list no longer becomes user sortable (the hyperlinks for the headings disappear.) Is this supposed to happen? Any ideas on what I could be doing wrong? config: actions: ~ fields: ~ list: batch_actions: {} object_actions: {} display: [first_name, last_name, location] Symfony 1.4 ORM: Doctrine Cheers, Scott -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Time investment. Symfony 1.x VS Symfony 2.x
Hi everybody! I have a month (almost 2) studying Symfony 1.4. I would appreciate your comments about if I should improve my sf_1.4 skills or move to sf_2.x (I would start from zero) I have read the jobeet tutorial, Forms in action, Doctrine, a gentle introduction to Symfony 1.4. So I have put a lot of effort trying to get a better understanding of the SF 1.4 way of working. But I have realized that Symfony 2 comes with a lot of new and better things, so my question is if is there enough docs about SF 2 to start spending my time to it, or do you think I should keep up mastering my sf 1.4 skills? My zend code of life now these days is not to be a apprentice of everything, and master of nothing. I want to focus on 1 thing at a time. (sorry for my bad english). Have a nice and happy Christmas!! -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en