? .svn ? votingapi (another copy).module ? votingapi (copy).module ? votingapi-translation.diff ? translations/.svn Index: votingapi.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/votingapi/votingapi.module,v retrieving revision 1.46.2.10 diff -u -p -r1.46.2.10 votingapi.module --- votingapi.module 7 Sep 2008 03:03:29 -0000 1.46.2.10 +++ votingapi.module 11 Sep 2008 21:56:02 -0000 @@ -89,7 +89,24 @@ function votingapi_settings_form($form_s return system_settings_form($form); } - +/** + * Additional setting for content translation. + * + * This function should be called from a hook_votingapi_settings_form_alter() function + * by modules implementing multilingual voting handling. + */ +function votingapi_settings_form_translation(&$form) { + if (!isset($form['votingapi_translation']) && module_exists('translation')) { + $form['votingapi_translation'] = array( + '#type' => 'radios', + '#title' => t('Translation handling'), + '#description' => t('On multilingual sites, translated content forms a translation set, with the original version being the source translation. This option lets you select a default behavior for multilingual content. Choose "none" to have votes for each member of a translation set tallied separately. Choose "source" to have all votes registered to and read from the source translation, so that votes on any member of a translation set count for the whole set.'), + '#options' => array('default' => t('Default: votes on translated content are registered normally.'), 'source' => t('Source: votes on translated content are registered to the "source" translation.')), + '#default_value' => variable_get('votingapi_translation', 'default'), + '#weight' => -1, + ); + } +} /** * Cast a vote on a particular piece of content.