Titles of tabs don't translate.

Adding t(...) around the following solves the issue:

    if($account->uid) {
    $items[] = array(
	'path' => "messagebox/inbox/$account->uid",
	'title' => <b>t('Inbox')</b>,
	'callback' => 'messagebox_inbox',
	'callback arguments' => array($account),
	'weight'=> 1,
	'type' => MENU_LOCAL_TASK,
	);
    $items[] = array(
	'path' => "messagebox/sent/$account->uid",
	'title' => <b>t('Sent')</b>,
	'callback' => 'messagebox_sent_messages',
	'callback arguments' => array($account),
	'weight'=> 3,
	'type' => MENU_LOCAL_TASK,
	);
    $items[] = array(
	'path' => "messagebox/archive/$account->uid",
	'title' => <b>t('Archived')</b>,
	'callback' => 'messagebox_archive',
	'callback arguments' => array($account),
	'weight'=> 4,
	'type' => MENU_LOCAL_TASK,
	);

    $items[] = array(
	'path' => "messagebox/new/$account->uid",
	'title' => <b>t('New')</b>,
	'callback' => 'drupal_get_form',
	'callback arguments' => array('messagebox_new', $account, arg(2)),
	'weight'=> 2,
	'type' => MENU_LOCAL_TASK,
	);

Comments

asak’s picture

Fixing the code above:

if($account->uid) {
$items[] = array(
'path' => "messagebox/inbox/$account->uid",
'title' => t('Inbox'),
'callback' => 'messagebox_inbox',
'callback arguments' => array($account),
'weight'=> 1,
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => "messagebox/sent/$account->uid",
'title' => t('Sent'),
'callback' => 'messagebox_sent_messages',
'callback arguments' => array($account),
'weight'=> 3,
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => "messagebox/archive/$account->uid",
'title' => t('Archived'),
'callback' => 'messagebox_archive',
'callback arguments' => array($account),
'weight'=> 4,
'type' => MENU_LOCAL_TASK,
);

$items[] = array(
'path' => "messagebox/new/$account->uid",
'title' => t('New'),
'callback' => 'drupal_get_form',
'callback arguments' => array('messagebox_new', $account, arg(2)),
'weight'=> 2,
'type' => MENU_LOCAL_TASK,
);

And some more missing t()'s:

function messagebox_op($op, $mid=0) {
switch($op) {
case 'delete_all_sent':
db_query('DELETE FROM {messagebox} WHERE sid = %d AND rid = 0', $mid);
break;
case 'delete_all_archived':
db_query('DELETE FROM {messagebox} WHERE rid = %d AND is_read=1', $mid);
break;
case 'delete':
db_query('DELETE FROM {messagebox} WHERE mid = %d', $mid);
drupal_set_message(t('Deleted Message'));
break;
case 'mark_as_read':
db_query('UPDATE {messagebox} SET is_read = 1 WHERE mid = %d', $mid);
drupal_set_message(t('Marked Message are read'));
break;
case 'mark_all_as_read':
drupal_set_message(t('Marked all Messages are read'));
db_query('UPDATE {messagebox} SET is_read = 1 WHERE rid = %d', $mid);
break;
default:
//drupal page not found error
}
drupal_goto('messagebox/sent');
}

asak’s picture

Status: Active » Closed (fixed)

Sorry this didn't come as a patch - no idea how to make those...

Anyway - closing.