P4A 3 continues growing

Following the previous post, here you have the new things I’ve coded:

– POT file for the new translation system was prepared and committed to p4a/i18n/templates/p4a.pot
– P4A_Generate_Default_Label() global function was added, it takes a string such as “this_is_field” and returns “This is a field”, useful to generate labels from field names and other things
– P4A_Button and P4A_Widget were ported to P4A_Generate_Default_Label() to generate default labels
– default labels are now generated with ucfirst function instead of ucwords
– P4A toolbars and P4A_Table were ported to the new translation system
– translations are now applied at rendering time, not at build time
– P4A_Highlight_AccessKey() global function was added
– P4A_Widget::setLabel() does not automatically create accesskey now, it would cause problems with translations
– P4A_Object::intercept() and P4A_Object::actionHandler() now turn action name to lower before processing
– P4A_Menu now uses P4A_Highlight_AccessKey()
– P4A_Widget::setValue() and getValue() methods were removed because they’ve not all widgets have a value
– P4A_Button::setValue() and getValue() methods were removed, use setLabel() and getLabel() which are logically correct
– README file was updated, dropping some old browsers support and removing PHP4
– P4A_Button are now rendered as HTML buttons
– P4A_Button::setVisible() method now has a second parameter “visible”, check the reference
– all constructors were converted to PHP5 naming (public function __construct)
– P4A_Button::setIcon() now supports a path to an image instead of the icon name
– “currency” format/normalize was removed, it was never used and should not be handled in an application contest (you won’t print € only because your application is running with an european locale)
– P4A_Href widget was removed
– P4A_DB::limitQuery(), selectLimit() getError(), getNativeError(), query() and close() methods were removed because they can’t work with Zend_DB
– P4A_DB::rollback() and select() methods were added
– P4A_DB::fetchOne(), fetchCol(), fetchRow() and fetchAll() methods were added for Zend_Db naming convention compatibility
– P4A_Fieldset now uses getLabel() instead of getTitle() to render its legend, setTitle() and getTile() are now deprecated
– P4A_DB::get*() and query*() methods are now deprecated

and my updated TODO:

– check p4a_button sizes when we have a toolbar with buttons with icons and without icons
– implement application level translations
– port sample_i18n to the new translation system
– spread about the new translation system so users start translate
– check db_source for aliases
– try to detect the decimal format and use it during formatting
– check p4a_table ordering
– custom formatter for date/time/etc
– make ui.datepicker.js work with our new date format definitions (maybe call p4a by ajax to reformat)
– change p4a_table_col image handling, we’ve to pass by index.php and not phpthumb.php
– integrate p4a_base_mask in core and port samples to it
– remove p4a_icon and port its funcionalities inside p4a_image
– auto addaction on intercept and implementmethod when the action is a browser action
– implement db_source::setquery, maybe separate db_sources
– implement p4a_table::addCheckboxCol

Leave a Reply

Your email address will not be published. Required fields are marked *