Index: modules/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.52
diff -u -r1.52 menu.admin.inc
--- modules/menu/menu.admin.inc	29 Jun 2009 14:24:56 -0000	1.52
+++ modules/menu/menu.admin.inc	2 Jul 2009 11:31:32 -0000
@@ -414,13 +414,16 @@
     );
   }
   else {
+    drupal_add_js( 'misc/auto_machine_readable.js');
+    drupal_add_js(array( 'autoMachineReadable' => array('title' => 'menu-name')), 'setting');
     $menu = array('menu_name' => '', 'title' => '', 'description' => '');
     $form['menu_name'] = array(
       '#type' => 'textfield',
       '#title' => t('Menu name'),
       '#maxsize' => MENU_MAX_MENU_NAME_LENGTH_UI,
-      '#description' => t('The machine-readable name of this menu. This text will be used for constructing the URL of the <em>menu overview</em> page for this menu. This name must contain only lowercase letters, numbers, and hyphens, and must be unique.'),
+      '#description' => t('This text will be used to construct the URL for this menu. This name must contain only lowercase letters, numbers and hyphens, and must be unique.'),
       '#required' => TRUE,
+      '#weight' => 1,
     );
     $form['#insert'] = TRUE;
   }
@@ -437,16 +440,20 @@
       '#title' => t('Title'),
       '#default_value' => $menu['title'],
       '#required' => TRUE,
+      '#field_suffix' => ' <small id="edit-title-suffix">&nbsp;</small>',
+      '#weight' => 0,    
     );
   }
   $form['description'] = array(
     '#type' => 'textarea',
     '#title' => t('Description'),
     '#default_value' => $menu['description'],
+    '#weight' => 2,    
   );
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
+    '#weight' => 3,    
   );
 
   return $form;
Index: misc/auto-machine-readable.js
===================================================================
RCS file: misc/auto-machine-readable.js
diff -N misc/auto-machine-readable.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ misc/auto-machine-readable.js	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,36 @@
+// $Id$
+(function ($) {
+
+Drupal.behaviors.autoMachineReadable = {
+  attach: function () {
+	var autoMRS = Drupal.settings.autoMachineReadable;
+	for(var autoMR in autoMRS) {
+      var source = '#edit-' + autoMR;
+      var suffix = '#edit-' + autoMR + '-suffix';
+      var target = '#edit-' + autoMRS[autoMR];
+      var wrapper = '#edit-' + autoMRS[autoMR] + '-wrapper';
+      if ($(target).val() == $(source).val().toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/-+/g, '-') || $(target).val() == '') {
+        $(wrapper).hide();
+        $(source).keyup(function () {
+          var machine = $(this).val().toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/-+/g, '-');
+          if (machine != '_' && machine != '') {
+            $(target).val(machine);
+            $(suffix).empty().append(' URL path: ' + machine + ' [').append($('<a href="#">' + Drupal.t('Edit') + '</a>').click(function () {
+              $(wrapper).show();
+              $(suffix).hide();
+              $(source).unbind('keyup');
+              return false;
+            })).append(']');
+          }
+          else {
+            $(target).val(machine);
+            $(suffix).text('');
+          }
+        });
+        $(source).keyup();
+      }
+	}
+  }
+};
+
+})(jQuery);
