From 9b6128243b4a388a46fce343747ed101180c3f00 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Wed, 26 Jul 2017 15:10:20 +0200 Subject: [PATCH] Pending translations and other minor changes --- .../storm_quicktt/storm_quicktt.module | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/sites/all/modules/storm_quicktt/storm_quicktt.module b/sites/all/modules/storm_quicktt/storm_quicktt.module index 778beb1..95d28e0 100644 --- a/sites/all/modules/storm_quicktt/storm_quicktt.module +++ b/sites/all/modules/storm_quicktt/storm_quicktt.module @@ -13,8 +13,8 @@ */ function storm_quicktt_help($path, $arg) { switch ($path) { - case 'admin/storm/quicktt': - return '

'. t('Here you can set up parameters for Storm-Quick-TimeTracker.') .'

'; + case 'admin/suitedesk/quicktt': + return '

'. t('Here you can set up parameters for SuiteDesk-Quick-TimeTracker.') .'

'; case 'admin/help#storm_quicktt': return filter_filter('process', 2, NULL, file_get_contents(dirname(__FILE__) ."/README.txt")); } @@ -26,9 +26,9 @@ function storm_quicktt_help($path, $arg) { function storm_quicktt_menu() { $items = array(); $access_config = array('administer site configuration'); - $items['admin/settings/storm/quicktt'] = array( - 'title' => 'Storm Quick TimeTracker', - 'description' => 'Configure Storm Quick TimeTracker', + $items['admin/settings/suitedesk/quicktt'] = array( + 'title' => 'SuiteDesk Quick TimeTracker', + 'description' => 'Configure SuiteDesk Quick TimeTracker', 'page callback' => 'drupal_get_form', 'page arguments' => array('storm_quicktt_settings'), 'access arguments' => $access_config, @@ -60,7 +60,7 @@ function storm_quicktt_add_resources() { function storm_quicktt_block($op = 'list', $delta = 0, $edit = array()) { switch ($op) { case 'list': - $blocks[0]['info'] = t('Storm Quick TimeTracker'); + $blocks[0]['info'] = t('SuiteDesk Quick TimeTracker'); $blocks[0]['cache'] = BLOCK_NO_CACHE; return $blocks; case 'configure': @@ -79,7 +79,7 @@ function storm_quicktt_block($op = 'list', $delta = 0, $edit = array()) { ORDER BY spr.organization_title, n.title"; $sql = stormproject_access_sql($sql); $result = db_query($sql); - $options = array('0' => '- No billable work -'); + $options = array('0' => t('- No billable work -')); while ($node = db_fetch_object($result)) { if (!isset($options[$node->organization_title])) { $options[$node->organization_title] = array(); @@ -135,7 +135,7 @@ function storm_quicktt_blockform($form_state, $options) { '#title' => t('Projects'), '#options' => $options, '#default_value' => $pid, - '#size' => 10, +# '#size' => 10, ); if (!module_exists('storm_dashboard')) { $form['selects']['info'] = array( @@ -435,7 +435,7 @@ function storm_quicktt_store_time($stop = 0, $show_msg = TRUE) { return ''; } $destination = ($_GET['q'] == 'stormdashboard/interact') ? 'stormdashboard' : $_GET['q']; - $link = l('edit', 'node/'. $node->nid .'/edit', array('query' => array('destination' => $destination))); + $link = l(t('edit'), 'node/'. $node->nid .'/edit', array('query' => array('destination' => $destination))); $msg = t('Time spent on %type %name: %min minutes (!edit).', array('%type' => $type, '%name' => $name, '%min' => $minutes, '!edit' => $link)); } elseif (!$stop) { @@ -577,14 +577,16 @@ function storm_quicktt_start_link() { $style_resume = ' style="display:none"'; } $text_paused = ''. t('Paused') .''; - $path = drupal_get_path('module', 'storm'); +/* $path = drupal_get_path('module', 'storm'); + $path = variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons'); +*/ $path = url(variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons'), array('absolute' => TRUE, 'language' => '')); $title_pause = t('Pause'); $title_resume = t('Resume'); $text = '
'. format_date($_SESSION['storm_quicktt_start']) .'
'; $text .= '
'. storm_quicktt_elapsed_time() .''. $text_paused .'
'; - $text .= ''. $title_pause .''; - $text .= ''. $title_resume .''; + $text .= ''. $title_pause .''; + $text .= ''. $title_resume .''; $text .= storm_quicktt_timetracking_trigger($nid, FALSE); return $text; } @@ -610,13 +612,13 @@ function storm_quicktt_timetracking_trigger($nid = 0, $info = TRUE) { if (!$active) { $title = t('Start time tracking.'); - $img_src = url(drupal_get_path('module', 'storm') .'/images/timetrackings.png', array('absolute' => TRUE)); + $img_src = url(drupal_get_path('module', 'storm') .'/images/timetrackings.png', array('absolute' => TRUE, 'language' => '')); $class = ""; $info_txt = ' '.t('Click to start timetracking'); } else { $title = t('Stop time tracking.'); - $img_src = url(variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons') .'/dialog_close.png', array('absolute' => TRUE)); + $img_src = url(variable_get('storm_icons_path', drupal_get_path('module', 'storm') .'/icons') .'/dialog_close.png', array('absolute' => TRUE, 'language' => '')); $class = "timetracking-active"; $info_txt = ' '.t('Click to stop timetracking'); } @@ -637,8 +639,8 @@ function storm_quicktt_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { if ($op == 'view') { $node->content['links']['storm_quicktt_timetracking_trigger'] = array( '#value' => storm_quicktt_timetracking_trigger($node->nid), - '#weight' => 10, + '#weight' => 12, ); } -} \ No newline at end of file +}