Re: [fw-general] Zend_Translate plural forms and poedit

2010-05-31 Thread Aleksey Zapparov
Hello, Sorry, seems like I mis-used the word :)) I was sure that reading and processing file the way Adapter does: 112 fseek($this-_file, $origtemp[$count * 2 + 2]); 113 $original = @fread($this-_file, $origtemp[$count * 2 + 1]); 114 $original =

[fw-general] Validating numeric input

2010-05-31 Thread Sudheer Satyanarayana
Hello, I want to make sure the user has input numeric value in a text form field. The value can be an integer or float, but it has to be numeric. I tried using Zend_Validate_Float and Zend_Validate_Digits, but they don't seem to suit my needs. For example, Zend_Validate_Float returns false

[fw-general] Zend_Translate missing locale code

2010-05-31 Thread Саша Стаменковић
As I mentioned in some of earlier topics, Serbian language have 2 alphabets, cyrilic and latin. There is sr_RS for cyrilic, but sr...@latin is missing (see http://www.gnu.org/software/hello/manual/gettext/Locale-Names.html). Regards, Saša Stamenković

Re: [fw-general] Validating numeric input

2010-05-31 Thread Aleksey Zapparov
Hello, To test if string is integer or float, you should use Zend_Validate_Int (1). Alternatively you can use Zend_Validate_Callback (2) with is_numeric (3) function, so it will be something like this: $validator = new Zend_Validate_Callback('is_numeric'); [1]

Re: [fw-general] Validating numeric input

2010-05-31 Thread Thomas Weidner
Sorry, but Zend_Validate_Int will return false on any float values. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Aleksey Zapparov i...@member.fsf.org To: Sudheer Satyanarayana sudhee...@sudheer.net Cc: Zend

Re: [fw-general] Validating numeric input

2010-05-31 Thread Sudheer Satyanarayana
On 05/31/2010 04:58 PM, Aleksey Zapparov wrote: Hello, To test if string is integer or float, you should use Zend_Validate_Int (1). Alternatively you can use Zend_Validate_Callback (2) with is_numeric (3) function, so it will be something like this: $validator = new

Re: [fw-general] Zend_Translate plural forms and poedit

2010-05-31 Thread Aleksey Zapparov
Ahh!.. Indeed, sorry. 2010/5/31 Thomas Weidner thomas.weid...@gmx.at: I think you missed the problem itself. He can not run poEdit to create plural form po files. This has nothing to do with Zend_Translate_Adapter_Gettext or with how Zend_Translate parses the translation files. Greetings

Re: [fw-general] Zend_Translate plural forms and poedit

2010-05-31 Thread Саша Стаменковић
Yes, but if Zend_Translate have alias method named ngettext() which redelagates to plural(), poedit would be able to parse sources and generate plural forms. I know it's a bit strnage to add it, maybe I can go with overriding Zend_Translate in order to achieve this. Because even if I do this by

Re: [fw-general] Zend_Translate missing locale code

2010-05-31 Thread Thomas Weidner
Charset informations are actually not supported for translation. (also mentioned some topics earlier) Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Саша Стаменковић umpir...@gmail.com To: Nabble Zend Framework

Re: [fw-general] Zend_Translate missing locale code

2010-05-31 Thread Саша Стаменковић
Thanks for the quick response. Any idea on how to handle this, to have both, cirillic and latin version? Regards, Saša Stamenković On Mon, May 31, 2010 at 2:08 PM, Thomas Weidner thomas.weid...@gmx.atwrote: Charset informations are actually not supported for translation. (also mentioned

Re: [fw-general] Validating numeric input

2010-05-31 Thread Aleksey Zapparov
Hello, Well, you can try achieve this with setOptions(array()) of callback validator. $validate = new Zend_Validate_Callback('is_numeric'); $validate -setOptions(array()); var_dump($validate-isValid(1.0)); Alternatively you can create dummy validation callback: $validate = new

Re: [fw-general] Validating numeric input

2010-05-31 Thread Aleksey Zapparov
I have pasted samples code of how this can be achieved from previous message on gist to make it easier to read them: http://gist.github.com/419789 2010/5/31 Aleksey Zapparov i...@member.fsf.org: Hello, Well, you can try achieve this with setOptions(array()) of callback validator. $validate =

[fw-general] modularity in zend -Problem--

2010-05-31 Thread shahrzad khorrami
hi all, I want to add two or more module in my project, I' m following Zend Framework in action ebook... But this error occurs: [31-May-2010 13:44:26] PHP Fatal error: Call to a member function hasPluginResource() on a non-object in

Re: [fw-general] Zend_Translate missing locale code

2010-05-31 Thread Thomas Weidner
Use sr for latin and sr_SR for cyrillic. You need to create a related routing for this to work. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Саша Стаменковић umpir...@gmail.com To: Thomas Weidner

Re: [fw-general] Zend_Translate missing locale code

2010-05-31 Thread Саша Стаменковић
Lets leave routing as separate problem, maybe I'll not have language route at all, but save this in session. So, I can have sr locale, like new Zend_Locale('sr') and create Zend_Translate for that locale, separated from sr_RS. But aren't my language translateion files get confused, I keep all

Re: [fw-general] Odd issue with retrieving, formatting and displaying dates

2010-05-31 Thread Kris Willis
Thank you Aleksey, this is a much better approach! It has also forced me into reading up on Zend_Date, and it would appear using it to handle my dates throughout my application will be beneficial too. Thanks again. On 30/05/10 23:20, Aleksey Zapparov wrote: Hello, To solve such problem I

[fw-general] Zend_Form isValidPartial always returns false

2010-05-31 Thread Sergio Rinaudo
Hi All, I have a form sent automatically every X seconds using ajax to store temporarily in a session all valid element values, and I want to use $myForm-isValidPartial server side to do this. Unfortunatelly it always returns false, and I have elements that actually should pass validation

Re: [fw-general] Re: PHPUnit taking forever?

2010-05-31 Thread Julien Pauli
From my experience, Windows is really slow for PHPUnit. I think that's NTFS' fault. I cant run any tests for the framework on Windows, too slow (anyway I dont use that system anymore), lasts hours for the whole framework testing. Try to run the exact same tests on *nix systems with ext or other

[fw-general] Translating model options

2010-05-31 Thread Саша Стаменковић
I need to access zend translate in my models. The simplest way to do it is to get it from registry Zend_Registry::get('Zend_Translate'). But I have one class in my models which have static options for select element, like protected $options = array( self::NOTES =