Coder Issue Queue
Callback documentation missing
Posted September 24th, 2008 by douggreenThe Coder Documentation is missing an example on how to define a callback function, and how it works.
Internationalization - incorrect usage of t() !placeholders
Posted September 21st, 2008 by douggreenHi,
Take the example code:
$string = t('Some text !my_link foo bar wibble', array('!my_link' => l('Coder module', 'http://drupal.org/project/coder'))),
Internationalization - additional leading / trailing spaces checks
Posted September 21st, 2008 by douggreenHi,
We have a check in the i18n reviews that ensures there are no leading or trailing spaces in the string provided to t(). We should add the same check to other functions which do translation, including format_plural(), watchdog() and also menu items' titles and descriptions.
Cheers,
Stella
Add new internationalisation check for \' within translatable strings
Posted September 21st, 2008 by douggreenHi,
Coding standards recommend use of single quotes instead of double quotes. This means you often end up with lines of code like:
$string = t('It doesn\'t match.');
False internationalization positive for extra leading/trailing spaces
Posted September 21st, 2008 by douggreenHi,
A false positive is generated for lines like:
'titleUser' => t('Your rating') .': ',
The error given is "The $string argument to t() should not begin or end with a space.".
"Ignore this" rule
Posted September 20th, 2008 by douggreenOccasionally when I'm working on a module, Coder gives me errors that are not accurate. This usually happens with either PHP's string functions (which, in many cases, are faster than the drupal_ versions) or when dynamically building SQL queries (and a safe string is inserted into a query using %sinstead of '%s').
Setting file suffixes as per review
Posted September 20th, 2008 by douggreenHi,
Does Coder have functionality to review translations in .po-files? The Swedish translation team discussed this (in Swedish) and we are looking for a module to use and Coder might be that project as it already has the UI already written.
Improve Usability of the Coder selection form
Posted September 20th, 2008 by douggreenI think that hiding the selection form in the fieldset can be confusing to users. Does this patch improve the usability of the coder selection form?
5.x-6.x test catches false positive for use of hook_info()
Posted September 11th, 2008 by douggreenThis was generated by running the 5.x-6.x upgrade review on imagefield.module
#
Line 183: hook no longer exists, use hook_form_alter() to swap your own validation handler (Drupal Docs)
$db_info = content_database_info($field);
#
severity: criticalLine 231: hook no longer exists, use hook_form_alter() to swap your own validation handler (Drupal Docs)
Do not call theme() in hook_menu()
Posted September 4th, 2008 by douggreenIn Drupal 5 and before, nobody should call a theme() function in a hook_menu(), because it would initialize the theme system too early and prevent dynamic modification of the theme (for example in the block administration interface).