Index: modules/path/path.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.module,v
retrieving revision 1.137
diff -u -r1.137 path.module
--- modules/path/path.module	23 Dec 2007 15:32:36 -0000	1.137
+++ modules/path/path.module	29 Jan 2008 02:53:43 -0000
@@ -21,8 +21,8 @@
 <li>node/3 =&gt; contact</li>
 </ul>
 ');
-      $output .= '<p>'. t('The path module enables appropriately permissioned users to specify an optional alias in all node input and editing forms, and provides an interface to view and edit all URL aliases. The two permissions related to URL aliasing are <em>administer url aliases</em> and <em>create url aliases</em>. ') .'</p>';
-      $output .= '<p>'. t('This module also provides user-defined mass URL aliasing capabilities, which is useful if you wish to uniformly use URLs different from the default. For example, you may want to have your URLs presented in a different language. Access to the Drupal source code on the web server is required to set up mass URL aliasing. ') .'</p>';
+      $output .= '<p>'. t('The path module enables appropriately permissioned users to specify an optional alias in all node input and editing forms, and provides an interface to view and edit all path aliases. The two permissions related to path aliasing are <em>administer path aliases</em> and <em>create path aliases</em>. ') .'</p>';
+      $output .= '<p>'. t('Advanced usage: This module also provides a backend to user-defined mass path aliasing capabilities, which is useful if you wish to uniformly use paths different from the default. For example, you may want to have your paths presented in a different language. Access to the Drupal source code on the web server is required to set up mass path aliasing. ') .'</p>';
       $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@path">Path module</a>.', array('@path' => 'http://drupal.org/handbook/modules/path/')) .'</p>';
       return $output;
     case 'admin/build/path':
@@ -37,10 +37,10 @@
  */
 function path_menu() {
   $items['admin/build/path'] = array(
-    'title' => 'URL aliases',
+    'title' => 'Path aliases',
     'description' => "Change your site's URL paths by aliasing them.",
     'page callback' => 'path_admin_overview',
-    'access arguments' => array('administer url aliases'),
+    'access arguments' => array('administer path aliases'),
     'file' => 'path.admin.inc',
   );
   $items['admin/build/path/edit'] = array(
@@ -64,7 +64,7 @@
   $items['admin/build/path/add'] = array(
     'title' => 'Add alias',
     'page callback' => 'path_admin_edit',
-    'access arguments' => array('administer url aliases'),
+    'access arguments' => array('administer path aliases'),
     'type' => MENU_LOCAL_TASK,
     'file' => 'path.admin.inc',
   );
@@ -85,6 +85,7 @@
  */
 function path_set_alias($path = NULL, $alias = NULL, $pid = NULL, $language = '') {
   $path = urldecode($path);
+  $alias = trim($alias, '/');
   $alias = urldecode($alias);
   // First we check if we deal with an existing alias and delete or modify it based on pid.
   if ($pid) {
@@ -122,7 +123,6 @@
   drupal_clear_path_cache();
 }
 
-
 /**
  * Implementation of hook_nodeapi().
  *
@@ -130,7 +130,7 @@
  * than through the administrative interface.
  */
 function path_nodeapi(&$node, $op, $arg) {
-  if (user_access('create url aliases') || user_access('administer url aliases')) {
+  if (user_access('create path aliases') || user_access('administer path aliases')) {
     $language = isset($node->language) ? $node->language : '';
     switch ($op) {
       case 'validate':
@@ -181,7 +181,7 @@
       '#title' => t('URL path settings'),
       '#collapsible' => TRUE,
       '#collapsed' => empty($path),
-      '#access' => user_access('create url aliases'),
+      '#access' => user_access('create path aliases'),
       '#weight' => 30,
     );
     $form['path']['path'] = array(
@@ -190,7 +190,7 @@
       '#maxlength' => 250,
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
-      '#description' => t('Optionally specify an alternative URL by which this node can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
+      '#description' => t('Optionally specify a path alias by which this node can be accessed. Use a relative path. For example, type <kbd>about</kbd> when writing an about page.'),
     );
     if ($path) {
       $form['path']['pid'] = array(
@@ -205,7 +205,7 @@
  * Implementation of hook_perm().
  */
 function path_perm() {
-  return array('create url aliases', 'administer url aliases');
+  return array('create path aliases', 'administer path aliases');
 }
 
 /**
Index: modules/path/path.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/path/path.admin.inc,v
retrieving revision 1.7
diff -u -r1.7 path.admin.inc
--- modules/path/path.admin.inc	8 Jan 2008 10:35:42 -0000	1.7
+++ modules/path/path.admin.inc	29 Jan 2008 02:53:42 -0000
@@ -7,9 +7,9 @@
  */
 
 /**
- * Return a listing of all defined URL aliases.
+ * Return a listing of all defined path aliases.
  * When filter key passed, perform a standard search on the given key,
- * and return the list of matching URL aliases.
+ * and return the list of matching path aliases.
  */
 function path_admin_overview($keys = NULL) {
   // Add the filter form above the overview table.
@@ -51,7 +51,7 @@
   }
 
   if (empty($rows)) {
-    $empty_message = $keys ? t('No URL aliases found.') : t('No URL aliases available.') ;
+    $empty_message = t('No path aliases available.');
     $rows[] = array(array('data' => $empty_message, 'colspan' => ($multilanguage ? 5 : 4)));
   }
 
@@ -62,7 +62,7 @@
 }
 
 /**
- * Menu callback; handles pages for creating and editing URL aliases.
+ * Menu callback; handles pages for creating and editing path aliases.
  */
 function path_admin_edit($pid = 0) {
   if ($pid) {
@@ -78,7 +78,7 @@
 }
 
 /**
- * Return a form for editing or creating an individual URL alias.
+ * Return a form for editing or creating an individual path alias.
  *
  * @ingroup forms
  * @see path_admin_form_validate()
@@ -104,7 +104,7 @@
     '#default_value' => $edit['dst'],
     '#maxlength' => 64,
     '#size' => 45,
-    '#description' => t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'),
+    '#description' => t('Specify a path alias by which this page can be accessed. Use a relative path. For example, type <kbd>about</kbd> to refer to an about page.'),
     '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q='),
     '#required' => TRUE,
   );
@@ -124,9 +124,8 @@
   return $form;
 }
 
-
 /**
- * Verify that a new URL alias is valid
+ * Verify that a new path alias is valid
  */
 function path_admin_form_validate($form, &$form_state) {
   $src = $form_state['values']['src'];
@@ -145,7 +144,7 @@
 }
 
 /**
- * Save a new URL alias to the database.
+ * Save a new path alias to the database.
  */
 function path_admin_form_submit($form, &$form_state) {
   // Language is only set if locale module is enabled
@@ -157,11 +156,11 @@
 }
 
 /**
- * Menu callback; confirms deleting an URL alias
+ * Menu callback; confirms deleting an path alias
  */
 function path_admin_delete_confirm($form_state, $pid) {
   $path = path_load($pid);
-  if (user_access('administer url aliases')) {
+  if (user_access('administer path aliases')) {
     $form['pid'] = array('#type' => 'value', '#value' => $pid);
     $output = confirm_form($form,
       t('Are you sure you want to delete path alias %title?', array('%title' => $path['dst'])),
@@ -171,7 +170,7 @@
 }
 
 /**
- * Execute URL alias deletion
+ * Execute path alias deletion
  */
 function path_admin_delete_confirm_submit($form, &$form_state) {
   if ($form_state['values']['confirm']) {
@@ -181,9 +180,8 @@
   }
 }
 
-
 /**
- * Return a form to filter URL aliases.
+ * Return a form to filter path aliases.
  *
  * @ingroup forms
  * @see path_admin_filter_form_submit()
@@ -230,7 +228,6 @@
   $form_state['redirect'] = 'admin/build/path/list';
 }
 
-
 /**
  * Helper function for grabbing filter keys.
  */
