Index: D:/InetPub/wwwroot/project/release/project_release.module =================================================================== --- D:/InetPub/wwwroot/project/release/project_release.module (revision 43) +++ D:/InetPub/wwwroot/project/release/project_release.module (working copy) @@ -18,8 +18,8 @@ // These constants are defined here since they use t() and the // global $locale variable needs to be initialized before calling // t() or you suffer a big performance hit. - define('PROJECT_RELEASE_VERSION_FORMAT_VALID_MSG', t("The version format string can only contain letters, numbers, and the characters . _ and - (in addition to the special characters used for identifying variables: % ! and #).")); - define('PROJECT_RELEASE_VERSION_FORMAT_HELP', t('Available variables are:') .' %api, %major, %minor, %patch, %extra. '. t("The percent sign ('%') at the front of the variable name indicates that a period ('.') should be inserted as a delimiter before the value of the variable. The '%' can be replaced with a hash mark ('#') to use a hyphen ('-') delimiter, or with an exclaimation point ('!') to have the value printed without a delimiter. Any variable in the format string that has no value will be removed entirely from the final string.") .' '. PROJECT_RELEASE_VERSION_FORMAT_VALID_MSG); + define('PROJECT_RELEASE_VERSION_FORMAT_VALID_MSG', t('The version format string can only contain letters, numbers, and the characters . _ and - (in addition to the special characters used for identifying variables: % ! and #).')); + define('PROJECT_RELEASE_VERSION_FORMAT_HELP', t('Available variables are: %api, %major, %minor, %patch, %extra.') . t("The percent sign ('%') at the front of the variable name indicates that a period ('.') should be inserted as a delimiter before the value of the variable. The '%' can be replaced with a hash mark ('#') to use a hyphen ('-') delimiter, or with an exclaimation point ('!') to have the value printed without a delimiter. Any variable in the format string that has no value will be removed entirely from the final string.") .' '. PROJECT_RELEASE_VERSION_FORMAT_VALID_MSG); } /** @@ -145,7 +145,7 @@ '#default_value' => variable_get('project_release_download_base', ''), '#size' => 50, '#maxlength' => 255, - '#description' => t('By default, all download links to releases will use the standard download path for the site. However, if you wish to host the downloads at a different location, you can specify the base of the URL that should be used for download links. For example, if you stored releases in %files_path and you want to have download links pointing to %ftp_url, you would set this to %ftp_setting. Note that if you define this, the value should end with a slash (\'/\').', array('%files_path' => 'files/projects/foo.tar.gz', '%ftp_url' => 'ftp://ftp.example.com/files/projects/foo.tar.gz', '%ftp_setting' => 'ftp://ftp.example.com/')), + '#description' => t("By default, all download links to releases will use the standard download path for the site. However, if you wish to host the downloads at a different location, you can specify the base of the URL that should be used for download links. For example, if you stored releases in %files_path and you want to have download links pointing to %ftp_url, you would set this to %ftp_setting. Note that if you define this, the value should end with a slash ('/').", array('%files_path' => 'files/projects/foo.tar.gz', '%ftp_url' => 'ftp://ftp.example.com/files/projects/foo.tar.gz', '%ftp_setting' => 'ftp://ftp.example.com/')), ); return system_settings_form($form); } @@ -158,7 +158,7 @@ $default_tid = $form_state['values']['project_release_overview']; if ($default_tid != -1 && !$tids[$default_tid]) { $vocab = taxonomy_vocabulary_load(_project_release_get_api_vid()); - form_set_error('project_release_overview', t('Project release overview must be one of the active @vocab terms', array('@vocab' => $vocab->name))); + form_set_error('project_release_overview', t('Project release overview must be one of the active @vocab terms.', array('@vocab' => $vocab->name))); } // Make sure the default version format has no bad characters. @@ -167,7 +167,7 @@ // If set, the project_release_download_base must end with a '/' if (!empty($form_state['values']['project_release_download_base'])) { if (substr($form_state['values']['project_release_download_base'], -1) != '/') { - form_set_error('project_release_download_base', t('The %download_base_setting should end with a slash.', array('%download_base_setting' => t('Download link base URL')))); + form_set_error('project_release_download_base', t('The Download link base URL should end with a slash.')); } } } @@ -451,10 +451,10 @@ form_set_error('version_major', t('You must fill in some version information.')); // TODO: find a better form value to mark as the error? } - foreach (array('version_major' => 'Major version number', 'version_minor' => 'Minor version number') as $field => $name) { + foreach (array('version_major' => t('Major version number'), 'version_minor' => t('Minor version number')) as $field => $name) { $val = $form_state['values'][$field]; if (isset($val) && $val !== '' && !is_numeric($val)) { - form_set_error($field, t('!name must be a number.', array('!name' => $name))); + form_set_error($field, t('%name must be a number.', array('%name' => $name))); } } $val = $form_state['values']['version_patch']; @@ -1050,11 +1050,14 @@ '#options' => array($default_version => $terms[$default_version]), '#disabled' => TRUE, ); - $register = ''; if (variable_get('user_register', 1)) { - $register = ' or '. l(t('register'), 'user/register', array('query' => $destination)) .' '; + // Users can register themselves. + $form['version_login'] = array('#value' => t('Login or register to modify the filter.', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))))); } - $form['version_login'] = array('#value' => l(t('Login'), 'user/login', array('query' => $destination)) . $register . t('to modify the filter.')); + else { + // Only admins can add new users, no public registration. + $form['version_login'] = array('#value' => t('Login to modify the filter.', array('@login' => url('user/login', array('query' => $destination))))); + } } $form['#redirect'] = FALSE; } @@ -1111,7 +1114,7 @@ * @see project_release_form_alter */ function project_release_alter_project_form(&$form) { - $form['project']['uri']['#description'] .= ' '. t("This string is also used to generate the name of releases associated with this project."); + $form['project']['uri']['#description'] .= ' '. t('This string is also used to generate the name of releases associated with this project.'); } /** Index: D:/InetPub/wwwroot/project/release/project_release.views.inc =================================================================== --- D:/InetPub/wwwroot/project/release/project_release.views.inc (revision 43) +++ D:/InetPub/wwwroot/project/release/project_release.views.inc (working copy) @@ -421,7 +421,7 @@ // Only add a description to the select box if we're building the filter // options page, and not the actual exposed filter that the user sees. if (empty($form_state['exposed'])) { - $form['value']['#description'] = t('Only terms marked as active on the !project_release_settings_link page are displayed above.', array('!project_release_settings_link' => l(t('Project release settings'), 'admin/project/project-release-settings'))); + $form['value']['#description'] = t('Only terms marked as active on the project release settings page are displayed above.', array('@project_release_settings_link' => url('admin/project/project-release-settings'))); } if (empty($form_state['exposed'])) { Index: D:/InetPub/wwwroot/project/project.module =================================================================== --- D:/InetPub/wwwroot/project/project.module (revision 43) +++ D:/InetPub/wwwroot/project/project.module (working copy) @@ -68,7 +68,7 @@ 'project_project' => array( 'name' => t('Project'), 'module' => 'project_project', - 'description' => t('A project is something a group is working on. It can optionally have issue tracking, integration with revision control systems, releases, and so on.' ), + 'description' => t('A project is something a group is working on. It can optionally have issue tracking, integration with revision control systems, releases, and so on.'), ), ); } @@ -647,7 +647,7 @@ function project_quick_navigate_form() { $uris = NULL; - $projects = array_merge(array(0 => t('