changeset 29:ea061c743982

localise title and label exactly once each :-)
author Charlie Root
date Sun, 28 Jan 2018 13:44:10 -0500
parents 538b3d58eb89
children 7498e7cacd71
files plugins/thunderbird_labels/thunderbird_labels.php
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/thunderbird_labels/thunderbird_labels.php	Sun Jan 28 13:42:53 2018 -0500
+++ b/plugins/thunderbird_labels/thunderbird_labels.php	Sun Jan 28 13:44:10 2018 -0500
@@ -64,17 +64,17 @@
 			# Afeter ul.appendnd -- inside menu.show on 307
 			# 567? Yes -- that's calling 'hide', but overriding
 			# doesn't fix :-(
-			rcube::write_log('lab','add_button');
+			#rcube::write_log('lab','add_button');
 			$this->add_button(
 				array(
 					#'command' => 'plugin.thunderbird_labels.rcm_tb_label_submenu',
 				      'name' => 'tblabellink',
 					'id' => 'tblabelpopuplink',
-					#'domain' => $this->ID,
+					'domain' => $this->ID,
 					'type' => 'link',
 					'class' => 'button tblabel',
-					'label' => $this->gettext('tb_label_button_label'), 
-					'title' => 'tb_label_button_title',
+					'label' => 'tb_label_button_label', 
+				      'title' => 'tb_label_button_title',
 					'onclick' => "UI.toggle_popup('tblabelpopup',event);return false",
 					'aria-haspopup' => true,
 					'aria-expanded' => false,
@@ -286,7 +286,7 @@
 		  array('class' => 'submenu'),
 		  '<span>'.rcube::Q($this->gettext('tb_label_contextmenu_title')).'</span>' . $this->_gen_label_submenu($args, 'tb_label_ctxm_submenu'));
 		$out .= html::tag('ul', array('id' => 'tb_label_ctxm_mainmenu'), $li);
-		rcube::write_log('lab',"stblc $out");
+		#rcube::write_log('lab',"stblc $out");
 		$this->api->output->add_footer(html::div(array('style' => 'display: none;'), $out));
 	}
 	
@@ -325,7 +325,7 @@
 				if (preg_match('/^\$?label/', $flag))
 				{
 					$flag_no = preg_replace('/^\$?label/', '', $flag);
-					rcube::write_log($this->name, "Single message Flag: ".$flag." Flag_no:".$flag_no);
+					#rcube::write_log($this->name, "Single message Flag: ".$flag." Flag_no:".$flag_no);
 					$this->message_tb_labels[] = (int)$flag_no;
 				}
 			}
@@ -356,13 +356,13 @@
 		}
 		// loop over all messages and add $LabelX info to the extra_flags
 		$mbox = $this->rc->output->get_env('mailbox') ?: $this->rc->storage->get_folder();
-		rcube::write_log($this->name, "mbox: $mbox");
+		#rcube::write_log($this->name, "mbox: $mbox");
 		foreach($args['messages'] as $message)
 		{
 			$message->list_flags['extra_flags']['tb_labels'] = array(); # always set extra_flags, needed for javascript later!
 			$message->list_flags['extra_flags']['tb_lparms'] = array();
 			$keyPos = array_search($_SESSION['sort_col'],$this->rc->config->get('tb_label_parm_labels'));
-			rcube::write_log($this->name,"sort? $keyPos ".$_SESSION['sort_order']." ".print_r($this->rc->config->get('tb_label_parm_labels'),true));
+			#rcube::write_log($this->name,"sort? $keyPos ".$_SESSION['sort_order']." ".print_r($this->rc->config->get('tb_label_parm_labels'),true));
 			if (is_array($message->flags))
 			foreach ($message->flags as $flagname => $flagvalue)
 			{
@@ -371,7 +371,7 @@
 				if (preg_match('/^\$?label/', $flag))
 				{
 					$flag_no = preg_replace('/^\$?label/', '', $flag);
-					rcube::write_log($this->name, "Flag:".$flag." Flag_no:".$flag_no);
+					#rcube::write_log($this->name, "Flag:".$flag." Flag_no:".$flag_no);
 					if ($ppos = strpos($flag_no,'_') > -1) {
 					  // We have a flag parameter value...
 					  $pn=(int)substr($flag_no,0,$ppos);
@@ -481,7 +481,7 @@
 	// set flags in IMAP server
 	function set_flags()
 	{
-		rcube::write_log($this->name, "set: ".print_r($_GET, true));
+		#rcube::write_log($this->name, "set: ".print_r($_GET, true));
 
 		$imap = $this->rc->imap;
 		$cbox = rcube_utils::get_input_value('_cur', rcube_utils::INPUT_GET);