Index: modules/menu/menu.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.test,v
retrieving revision 1.27
diff -u -r1.27 menu.test
--- modules/menu/menu.test	2 Dec 2009 19:26:22 -0000	1.27
+++ modules/menu/menu.test	8 Dec 2009 09:57:28 -0000
@@ -140,8 +140,8 @@
     $this->drupalPost('admin/structure/menu/add', $edit, t('Save'));
 
     // Verify that using a menu_name that is too long results in a validation message.
-    $this->assertText(format_plural(MENU_MAX_MENU_NAME_LENGTH_UI, "The menu name can't be longer than 1 character.", "The menu name can't be longer than @count characters."), t('Validation failed when menu name is too long.'));
-
+    $this->assertRaw(t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => t('Menu name'), '%max' => MENU_MAX_MENU_NAME_LENGTH_UI, '%length' => drupal_strlen($menu_name))), t('Validation failed when menu name is too long.'));   
+    
     // Change the menu_name so it no longer exceeds the maximum length.
     $menu_name = substr(md5($this->randomName(16)), 0, MENU_MAX_MENU_NAME_LENGTH_UI);
     $edit['menu_name'] = $menu_name;
Index: modules/menu/menu.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/menu/menu.admin.inc,v
retrieving revision 1.68
diff -u -r1.68 menu.admin.inc
--- modules/menu/menu.admin.inc	4 Nov 2009 04:43:58 -0000	1.68
+++ modules/menu/menu.admin.inc	8 Dec 2009 09:57:27 -0000
@@ -442,7 +442,7 @@
     $form['menu_name'] = array(
       '#type' => 'textfield',
       '#title' => t('Menu name'),
-      '#maxsize' => MENU_MAX_MENU_NAME_LENGTH_UI,
+      '#maxlength' => MENU_MAX_MENU_NAME_LENGTH_UI,
       '#description' => t('This text will be used to construct the URL for the menu. The name must contain only lowercase letters, numbers and hyphens, and must be unique.'),
       '#required' => TRUE,
       '#attached' => array(
@@ -547,10 +547,6 @@
     form_set_error('menu_name', t('The menu name may only consist of lowercase letters, numbers, and hyphens.'));
   }
   if ($form['#insert']) {
-    if (strlen($item['menu_name']) > MENU_MAX_MENU_NAME_LENGTH_UI) {
-      form_set_error('menu_name', format_plural(MENU_MAX_MENU_NAME_LENGTH_UI, "The menu name can't be longer than 1 character.", "The menu name can't be longer than @count characters."));
-    }
-
     // We will add 'menu-' to the menu name to help avoid name-space conflicts.
     $item['menu_name'] = 'menu-' . $item['menu_name'];
     $custom_exists = db_query_range('SELECT 1 FROM {menu_custom} WHERE menu_name = :menu', 0, 1, array(':menu' => $item['menu_name']))->fetchField();
