Revision 7cc085da
Added by Andreas Kohlbecker almost 8 years ago
modules/cdm_dataportal/cdm_api/cdm_api.module | ||
---|---|---|
222 | 222 |
$i = 0; |
223 | 223 |
foreach ($taggedtxt as $tt) { |
224 | 224 |
if (!in_array($tt->type, $skiptags) && strlen($tt->text) > 0) { |
225 |
$out .= (strlen($out) > 0 && ++$i < count($taggedtxt) ? $glue : '') . '<' . $tag . ' class="' . $tt->type . '">' . t($tt->text) . '</' . $tag . '>'; |
|
225 |
$out .= (strlen($out) > 0 && ++$i < count($taggedtxt) ? $glue : '') |
|
226 |
. '<' . $tag . ' class="' . $tt->type . '">' |
|
227 |
. t('@text', array('@text' => $tt->text)) |
|
228 |
. '</' . $tag . '>'; |
|
226 | 229 |
} |
227 | 230 |
} |
228 | 231 |
return $out; |
... | ... | |
814 | 817 |
$i = 0; |
815 | 818 |
while (strpos($uri_pattern, "$" . $i) !== FALSE) { |
816 | 819 |
if (count($pathParameters) <= $i) { |
817 |
drupal_set_message(t('cdm_compose_url(): missing pathParameter ' . $i . ' for ' . $uri_pattern), 'error'); |
|
820 |
drupal_set_message( |
|
821 |
t('cdm_compose_url(): missing pathParameter @index for !uri_pattern', |
|
822 |
array('@index' => $i, '!uri-pattern' => $uri_pattern )), |
|
823 |
'error'); |
|
818 | 824 |
break; |
819 | 825 |
} |
820 | 826 |
$uri_pattern = str_replace("$" . $i, rawurlencode($pathParameters[$i]), $uri_pattern); |
... | ... | |
1398 | 1404 |
$options[$term->uuid] = call_user_func($term_label_callback, $term); |
1399 | 1405 |
} else { |
1400 | 1406 |
//TODO use cdm_term_representation() here? |
1401 |
$options[$term->uuid] = t($term->representation_L10n);
|
|
1407 |
$options[$term->uuid] = t('@term', array('@term' => $term->representation_L10n));
|
|
1402 | 1408 |
} |
1403 | 1409 |
} |
1404 | 1410 |
} |
... | ... | |
1514 | 1520 |
*/ |
1515 | 1521 |
function _cdm_relationship_type_term_label_callback($term) { |
1516 | 1522 |
if (isset($term->representation_L10n_abbreviatedLabel)) { |
1517 |
return $term->representation_L10n_abbreviatedLabel . ' : ' . t($term->representation_L10n); |
|
1523 |
return $term->representation_L10n_abbreviatedLabel . ' : ' |
|
1524 |
. t('@term', array('@term' => $term->representation_L10n)); |
|
1518 | 1525 |
} |
1519 | 1526 |
else { |
1520 |
return t($term->representation_L10n);
|
|
1527 |
return t('@term', array('@term' => $term->representation_L10n));
|
|
1521 | 1528 |
} |
1522 | 1529 |
} |
1523 | 1530 |
|
modules/cdm_dataportal/cdm_api/cdm_node.php | ||
---|---|---|
149 | 149 |
'!title' => $title, |
150 | 150 |
)); |
151 | 151 |
drupal_set_message($message, 'error'); |
152 |
watchdog('content', $message, WATCHDOG_ERROR);
|
|
152 |
watchdog('content', '@message', array('@message' => $message), WATCHDOG_ERROR);
|
|
153 | 153 |
return NULL; |
154 | 154 |
} |
155 | 155 |
|
modules/cdm_dataportal/cdm_csv_export/cdm_csv_export.module | ||
---|---|---|
152 | 152 |
} |
153 | 153 |
|
154 | 154 |
$term = cdm_ws_get(CDM_WS_TERM, $country); |
155 |
$cdmRepresentationTitleCache = cdm_term_representation($term);
|
|
155 |
$representation_title_cache = cdm_term_representation($term);
|
|
156 | 156 |
if($country != null){ |
157 | 157 |
$form['regionFilter']['country'] = array ( |
158 | 158 |
'#type' => 'checkbox', |
159 |
'#title' => t($cdmRepresentationTitleCache),
|
|
159 |
'#title' => t('@representation-title-cache', array('@representation-title-cache' => $representation_title_cache)),
|
|
160 | 160 |
'#attributes' => array('name' => 'area', |
161 | 161 |
'id' => 'checkall', |
162 | 162 |
'value' => $country |
modules/cdm_dataportal/cdm_dataportal.module | ||
---|---|---|
533 | 533 |
// --- tabbed taxon page |
534 | 534 |
if (variable_get('cdm_dataportal_taxonpage_tabs', 1)) { |
535 | 535 |
$items['cdm_dataportal/taxon/%'] = array( |
536 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'General')), |
|
536 |
'title' => '@tabname', |
|
537 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'General'))), |
|
537 | 538 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
538 | 539 |
'access arguments' => array('access content'), |
539 | 540 |
'type' => MENU_CALLBACK, |
... | ... | |
543 | 544 |
); |
544 | 545 |
|
545 | 546 |
$items['cdm_dataportal/taxon/%/all'] = array( |
546 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'General')), |
|
547 |
'title' => '@tabname', |
|
548 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'General'))), |
|
547 | 549 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
548 | 550 |
'access arguments' => array('access content'), |
549 | 551 |
'type' => MENU_CALLBACK, |
... | ... | |
553 | 555 |
); |
554 | 556 |
|
555 | 557 |
$items['cdm_dataportal/taxon/%/description'] = array( |
556 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'General')), |
|
558 |
'title' => '@tabname', |
|
559 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'General'))), |
|
557 | 560 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
558 | 561 |
'access arguments' => array('access content'), |
559 | 562 |
'type' => MENU_DEFAULT_LOCAL_TASK, |
... | ... | |
563 | 566 |
); |
564 | 567 |
|
565 | 568 |
$items['cdm_dataportal/taxon/%/synonymy'] = array( |
566 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'Synonymy')), |
|
569 |
'title' => '@tabname', |
|
570 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Synonymy'))), |
|
567 | 571 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
568 | 572 |
'access arguments' => array('access content'), |
569 | 573 |
'type' => MENU_LOCAL_TASK, |
... | ... | |
571 | 575 |
'page arguments' => array(2, "synonymy", 4) |
572 | 576 |
, // Expected callback arguments: taxon_uuid and ... |
573 | 577 |
); |
574 |
$items['cdm_dataportal/taxon/%/images'] = array( |
|
575 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'Images')), |
|
578 |
$items['cdm_dataportal/taxon/%/images'] = array( // Images |
|
579 |
'title' => '@tabname', |
|
580 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Images'))), |
|
576 | 581 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
577 | 582 |
'access arguments' => array('access content'), |
578 | 583 |
'type' => MENU_LOCAL_TASK, |
... | ... | |
581 | 586 |
, // Expected callback arguments: taxon_uuid. |
582 | 587 |
); |
583 | 588 |
|
584 |
$items['cdm_dataportal/taxon/%/specimens'] = array( |
|
585 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'Specimens')), |
|
589 |
$items['cdm_dataportal/taxon/%/specimens'] = array( // Specimens |
|
590 |
'title' => '@tabname', |
|
591 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Specimens'))), |
|
586 | 592 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
587 | 593 |
'access arguments' => array('access content'), |
588 | 594 |
'type' => MENU_LOCAL_TASK, |
... | ... | |
591 | 597 |
, // Expected callback arguments: taxon_uuid. |
592 | 598 |
); |
593 | 599 |
|
594 |
$items['cdm_dataportal/taxon/%/keys'] = array( |
|
595 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'Keys')), |
|
600 |
$items['cdm_dataportal/taxon/%/keys'] = array( // Keys |
|
601 |
'title' => '@tabname', |
|
602 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Keys'))), |
|
596 | 603 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
597 | 604 |
'access arguments' => array('access content'), |
598 | 605 |
'type' => MENU_LOCAL_TASK, |
... | ... | |
601 | 608 |
, // Expected callback arguments: taxon_uuid. |
602 | 609 |
); |
603 | 610 |
|
604 |
$items['cdm_dataportal/taxon/%/experts'] = array( |
|
605 |
'title' => theme('cdm_taxonpage_tab', array('tabname' => 'Experts')), |
|
606 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
|
607 |
'access arguments' => array('access content'), |
|
608 |
'type' => MENU_LOCAL_TASK, |
|
609 |
'weight' => 6, |
|
610 |
'page arguments' => array(2, "experts") |
|
611 |
$items['cdm_dataportal/taxon/%/experts'] = array( // Experts |
|
612 |
'title' => '@tabname', |
|
613 |
'title arguments' => array('@tabname' => theme('cdm_taxonpage_tab', array('tabname' => 'Experts'))), |
|
614 |
'page callback' => 'cdm_dataportal_taxon_page_view', |
|
615 |
'access arguments' => array('access content'), |
|
616 |
'type' => MENU_LOCAL_TASK, |
|
617 |
'weight' => 6, |
|
618 |
'page arguments' => array(2, "experts") |
|
611 | 619 |
, // Expected callback arguments: taxon_uuid. |
612 | 620 |
); |
613 | 621 |
|
... | ... | |
621 | 629 |
// --- refresh link for all cdmnode types |
622 | 630 |
foreach (cdm_get_nodetypes() as $type=>$name) { |
623 | 631 |
$items['cdm_dataportal/' . $name . '/%/refresh'] = array( |
624 |
'title' => t('Refresh'),
|
|
632 |
'title' => 'Refresh',
|
|
625 | 633 |
'page callback' => 'cdm_dataportal_refresh_node', |
626 | 634 |
'access arguments' => array('administer cdm_dataportal'), |
627 | 635 |
'type' => MENU_LOCAL_TASK, |
... | ... | |
2329 | 2337 |
|
2330 | 2338 |
$cdm_proxy_url = url('cdm_api/proxy/' . urlencode($content_url) . "/$theme"); |
2331 | 2339 |
$out .= '<!-- dynabox for ' . $content_url . ' -->'; |
2332 |
$out .= '<' . $enclosingtags[0] . ' ' . $dynabox_attributes. '><a href="' . $cdm_proxy_url . '" class="label" alt="' . t($link_alt_text) . '">' . $label . '</a>';
|
|
2340 |
$out .= '<' . $enclosingtags[0] . ' ' . $dynabox_attributes. '><a href="' . $cdm_proxy_url . '" class="label" alt="' . t('@link-alt-text', array('@link-alt-text' => $link_alt_text)) . '">' . $label . '</a>';
|
|
2333 | 2341 |
$out .= ' <' . $enclosingtags[1] . ' id="dynabox-' . $dynabox_id . '-content">'; |
2334 | 2342 |
$out .= ' <' . $enclosingtags[0] . ' class="dynabox-content-inner">' . loading_image_html() . '</' . $enclosingtags[0] . '>'; |
2335 | 2343 |
$out .= ' </' . $enclosingtags[1] . '>'; |
modules/cdm_dataportal/cdm_taxontree/cdm_taxontree.module | ||
---|---|---|
896 | 896 |
$out = '<div class="settings">'; |
897 | 897 |
foreach ($modes as $mode) { |
898 | 898 |
if ($compact_mode == $mode) { |
899 |
$out .= t($mode);
|
|
899 |
$out .= t('@mode', array('@mode' => $mode));
|
|
900 | 900 |
} |
901 | 901 |
else { |
902 |
$out .= l(t($mode), 'cdm_taxontree/set/compact_mode/' . $mode, array('query' => drupal_get_destination()));
|
|
902 |
$out .= l(t('@mode', array('@mode' => $mode)), 'cdm_taxontree/set/compact_mode/' . $mode, array('query' => drupal_get_destination()));
|
|
903 | 903 |
} |
904 | 904 |
$out .= ' '; |
905 | 905 |
} |
modules/cdm_dataportal/ext_links/ext_links.module | ||
---|---|---|
260 | 260 |
for ($i = 0; $i < sizeof($ext_links); $i++) { |
261 | 261 |
$form[$ext_links[$i]['form']] = array( |
262 | 262 |
'#type' => 'fieldset', |
263 |
'#title' => t($ext_links[$i]['form_title']),
|
|
263 |
'#title' => t('@title', array('@title' => $ext_links[$i]['form_title'])),
|
|
264 | 264 |
'#collapsible' => TRUE, |
265 | 265 |
'#collapsed' => TRUE, |
266 | 266 |
); |
267 | 267 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_check'] = array( |
268 | 268 |
'#type' => 'checkbox', |
269 |
'#title' => t($ext_links[$i]['check_title']),
|
|
269 |
'#title' => t('@title', array('@title' => $ext_links[$i]['check_title'])),
|
|
270 | 270 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_check', 1), |
271 | 271 |
); |
272 | 272 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_link'] = array( |
273 | 273 |
'#type' => 'textfield', |
274 |
'#title' => t($ext_links[$i]['link_title']) . ':',
|
|
274 |
'#title' => t('@title :', array('@title' => $ext_links[$i]['link_title'])),
|
|
275 | 275 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_link', $ext_links_default[$ext_links[$i]['form']]['link_default_value']), |
276 | 276 |
'#size' => 70, |
277 | 277 |
'#maxlength' => 255, |
278 |
'#description' => t($ext_links[$i]['link_description']),
|
|
278 |
'#description' => t('@description', array('@description' => $ext_links[$i]['link_description'])),
|
|
279 | 279 |
); |
280 | 280 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_concat'] = array( |
281 | 281 |
'#type' => 'textfield', |
... | ... | |
287 | 287 |
); |
288 | 288 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_text'] = array( |
289 | 289 |
'#type' => 'textfield', |
290 |
'#title' => t($ext_links[$i]['text_title']) . ':',
|
|
290 |
'#title' => t('@title :', array('@title' => $ext_links[$i]['text_title'])),
|
|
291 | 291 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_text', $ext_links_default[$ext_links[$i]['form']]['text_default_value']), |
292 | 292 |
'#size' => 70, |
293 | 293 |
'#maxlength' => 255, |
294 |
'#description' => t($ext_links[$i]['text_description']),
|
|
294 |
'#description' => t('@description', array('@description' => $ext_links[$i]['text_description'])),
|
|
295 | 295 |
); |
296 | 296 |
$form[$ext_links[$i]['form']]['ext_links_' . $ext_links[$i]['form'] . '_category'] = array( |
297 | 297 |
'#type' => 'textfield', |
298 |
'#title' => t($ext_links[$i]['category']) . ':',
|
|
298 |
'#title' => t('@title :', array('@title' => $ext_links[$i]['category'])),
|
|
299 | 299 |
'#default_value' => variable_get('ext_links_' . $ext_links[$i]['form'] . '_category', $ext_links_default[$ext_links[$i]['form']]['category_default_value']), |
300 | 300 |
'#size' => 70, |
301 | 301 |
'#maxlength' => 255, |
302 |
'#description' => t($ext_links[$i]['category']),
|
|
302 |
'#description' => t('@description', array('@description' => $ext_links[$i]['category'])),
|
|
303 | 303 |
); |
304 | 304 |
} |
305 | 305 |
$form['ext_links_options'] = array( |
modules/cdm_dataportal/includes/common.inc | ||
---|---|---|
418 | 418 |
|
419 | 419 |
// additional data |
420 | 420 |
foreach($data as $key=>$value){ |
421 |
@_description_list_group_add($sub_dl_groups, t($key), $value /*, '' , $weight++ */);
|
|
421 |
@_description_list_group_add($sub_dl_groups, t('@key', array('@key' => $key)), $value /*, '' , $weight++ */);
|
|
422 | 422 |
} |
423 | 423 |
|
424 | 424 |
} |
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
601 | 601 |
if($tab_key != 'general'){ |
602 | 602 |
// add entry for page part |
603 | 603 |
$toc_elements[] = array( |
604 |
'data' => l(t(ucfirst($tab_key)), $_GET['q'], array('fragment' => $tab_key, 'query' => $http_request_params)),
|
|
604 |
'data' => l(t('@tab-name', array('@tab-name' => ucfirst($tab_key))), $_GET['q'], array('fragment' => $tab_key, 'query' => $http_request_params)),
|
|
605 | 605 |
'class' => array('page-part-toc-item-' . $tab_key) |
606 | 606 |
); |
607 | 607 |
} else { |
modules/cdm_dataportal/node_types.php | ||
---|---|---|
32 | 32 |
$nodeinfo = array(); |
33 | 33 |
foreach (cdm_get_nodetypes() as $nodeType => $type) { |
34 | 34 |
$nodeinfo[$nodeType] = array( |
35 |
'name' => t(ucfirst($type)),
|
|
35 |
'name' => t('@type-name', array('@type-name' => ucfirst($type))),
|
|
36 | 36 |
'has_title' => TRUE, |
37 | 37 |
'base' => 'cdm_dataportal', |
38 | 38 |
'description' => t( |
... | ... | |
52 | 52 |
$type = node_type_get_type($node); |
53 | 53 |
|
54 | 54 |
if (is_numeric($node->nid)) { |
55 |
$cdm_node_notice = t('In order to edit CDM content, please use the ') . l(t('Taxonomic Editor'), 'http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditor', array('fragment' => TRUE)); |
|
55 |
$cdm_node_notice = t( |
|
56 |
'In order to edit CDM content, please use the !taxEditor', |
|
57 |
array( |
|
58 |
'!taxEditor' => l(t('Taxonomic Editor'), 'http://dev.e-taxonomy.eu/trac/wiki/TaxonomicEditor', array('fragment' => TRUE)) |
|
59 |
) |
|
60 |
); |
|
56 | 61 |
} |
57 | 62 |
else { |
58 |
$cdm_node_notice = t('You cannot manually create a node of type ') . $type->name . '. ' . t('This node type is only created internally'); |
|
63 |
$cdm_node_notice = t('You cannot manually create a node of type @type-name. This node type is only created internally' |
|
64 |
, array('@type-name' => $type->name)); |
|
59 | 65 |
} |
60 | 66 |
$form['cdm'] = array( |
61 | 67 |
'#value' => '<div class="cdm_node_notice warning">' . $cdm_node_notice . '</div>', |
modules/cdm_dataportal/settings.php | ||
---|---|---|
151 | 151 |
function get_taxon_options_list() { |
152 | 152 |
$taxon_tab_options = array_flip(get_taxon_tabs_list()); |
153 | 153 |
foreach ($taxon_tab_options as $key => $value) { |
154 |
$taxon_tab_options[$key] = t($key);
|
|
154 |
$taxon_tab_options[$key] = t('@key', array('@key' => $key));
|
|
155 | 155 |
} |
156 | 156 |
return $taxon_tab_options; |
157 | 157 |
|
... | ... | |
1050 | 1050 |
if (isset($portNumberMatch[1]) && $portNumberMatch[1] != '80') { |
1051 | 1051 |
$form['cdm_webservice']['freetext_index']['message'] = array( |
1052 | 1052 |
'#markup' => "<div class=\"description\">" |
1053 |
. t("The CDM web service URL contains a portnumber other than standart HTTP port 80: '!port'." |
|
1054 |
. " Due to this the reindex and purge fuctions may not be working if there is a firewall in between you and the CDM Server." |
|
1055 |
. " You may want to contact the maintainer of the according CDM Server in order to solve this problem.", array('!port' => $portNumberMatch[1][0])) |
|
1053 |
. t("The CDM web service URL contains a portnumber other than standart HTTP port 80: '!port' |
|
1054 |
Due to this the reindex and purge fuctions may not be working if there is a firewall in between you and the CDM Server. |
|
1055 |
You may want to contact the maintainer of the according CDM Server in order to solve this problem.", |
|
1056 |
array('!port' => $portNumberMatch[1][0]) |
|
1057 |
) |
|
1056 | 1058 |
. "</div>", |
1057 | 1059 |
); |
1058 | 1060 |
}; |
... | ... | |
1477 | 1479 |
'#title' => t('Taxon name display'), |
1478 | 1480 |
'#collapsible' => TRUE, |
1479 | 1481 |
'#collapsed' => TRUE, |
1480 |
'#description' => t('The display of taxon names is configured by two parts.'
|
|
1481 |
. 'The <srong>name render templates</strong> define the parts of the name to be displayed in the different areas of the data portal pages.'
|
|
1482 |
. 'The name parts are defined in the <stong>part definitions</strong>'),
|
|
1482 |
'#description' => t('The display of taxon names is configured by two parts. |
|
1483 |
The <srong>name render templates</strong> define the parts of the name to be displayed in the different areas of the data portal pages.
|
|
1484 |
The name parts are defined in the <stong>part definitions</strong>'), |
|
1483 | 1485 |
); |
1484 | 1486 |
|
1485 | 1487 |
$default_part_definitions = unserialize(CDM_PART_DEFINITIONS_DEFAULT); |
... | ... | |
1681 | 1683 |
function cdm_dataportal_create_gallery_settings_form($form_name, $form_title, $collapsed, $form_description = '') { |
1682 | 1684 |
$form[$form_name] = array( |
1683 | 1685 |
'#type' => 'fieldset', |
1684 |
'#title' => t($form_title),
|
|
1686 |
'#title' => t('@form-title', array('@form-title' => $form_title)),
|
|
1685 | 1687 |
'#collapsible' => TRUE, |
1686 | 1688 |
'#collapsed' => $collapsed, |
1687 | 1689 |
'#tree' => TRUE, |
1688 |
'#description' => t($form_description),
|
|
1690 |
'#description' => t('@$form-description', array('@$form-description' => $form_description)),
|
|
1689 | 1691 |
); |
1690 | 1692 |
|
1691 | 1693 |
$default_values = unserialize(CDM_DATAPORTAL_GALLERY_SETTINGS); |
... | ... | |
1881 | 1883 |
'#field_suffix' => 'px', |
1882 | 1884 |
'#maxlength' => 4, |
1883 | 1885 |
'#size' => 4, |
1884 |
'#description' => t('The maximum extend in either dimension, width or height, of the profil picture in pixels.') |
|
1886 |
'#description' => t('The maximum extend in either dimension, width or height, of the profile picture in pixels.')
|
|
1885 | 1887 |
); |
1886 | 1888 |
|
1887 | 1889 |
$form['taxon_profile'][CDM_TAXON_PROFILE_IMAGE]['media_uri_query'] = array( |
... | ... | |
1891 | 1893 |
'#default_value' => $taxon_profile_image_settings['media_uri_query'], |
1892 | 1894 |
'#maxlength' => 1024, |
1893 | 1895 |
'#size' => 60, |
1894 |
'#description' => t('Additional query parameters to be used when requesting for the '
|
|
1895 |
. 'profile image. E.g.: <code>width=400&height=300&quality=95&format=jpeg</code>.'
|
|
1896 |
. 'The query parameters will be appended to the uri of the media representation part'
|
|
1897 |
. ' as stored in the cdm. The query parameter string must not start with a \'&\' or \'?\'')
|
|
1896 |
'#description' => t('Additional query parameters to be used when requesting for the
|
|
1897 |
profile image. E.g.: <code>width=400&height=300&quality=95&format=jpeg</code>.
|
|
1898 |
The query parameters will be appended to the uri of the media representation part
|
|
1899 |
as stored in the cdm. The query parameter string must not start with a \'&\' or \'?\'')
|
|
1898 | 1900 |
); |
1899 | 1901 |
|
1900 | 1902 |
$form['taxon_profile'][CDM_TAXON_PROFILE_IMAGE]['custom_placeholder_enabled'] = array( |
... | ... | |
2228 | 2230 |
$form['taxon_profile']['distribution_layout'][DISTRIBUTION_HIERARCHY_STYLE][$level] = array( |
2229 | 2231 |
'#type' => 'fieldset', |
2230 | 2232 |
'#tree' => true, |
2231 |
'#title' => t(drupal_ucfirst((str_replace('_', ' ', $level)))),
|
|
2233 |
'#title' => t('@area-level', array('@area-level' => drupal_ucfirst((str_replace('_', ' ', $level))))),
|
|
2232 | 2234 |
'#attributes' => array('class' => array('fieldset-float')) |
2233 | 2235 |
); |
2234 | 2236 |
foreach ($hierarchy_styles[$level] as $key => $value) { |
2235 | 2237 |
$form['taxon_profile']['distribution_layout'][DISTRIBUTION_HIERARCHY_STYLE][$level][$key] = array( |
2236 | 2238 |
'#type' => 'textfield', |
2237 |
'#title' => t(drupal_ucfirst((str_replace('_', ' ', $key)))),
|
|
2239 |
'#title' => t('@area-level-style', array('@area-level-style' => drupal_ucfirst((str_replace('_', ' ', $key))))),
|
|
2238 | 2240 |
'#default_value' => $hierarchy_styles[$level][$key], |
2239 | 2241 |
'#maxlength' => 4, |
2240 | 2242 |
'#size' => 4 |
... | ... | |
2753 | 2755 |
); |
2754 | 2756 |
$edit_mapserver_version = get_edit_map_service_version_number(); |
2755 | 2757 |
if ($edit_mapserver_version < 1.1) { |
2756 |
$form[CDM_MAP_DISTRIBUTION]['image_map']['#description'] = '<div class="messages warning">' . t("The chosen EDIT map service version ($edit_mapserver_version) is too low, it must be at least 1.1") . '</div>' |
|
2758 |
$form[CDM_MAP_DISTRIBUTION]['image_map']['#description'] = '<div class="messages warning">' |
|
2759 |
. t("The chosen EDIT map service version (@edit-mapserver-version) is too low, it must be at least 1.1", |
|
2760 |
array('@edit_mapserver_version' => '$edit_mapserver_version')) . '</div>' |
|
2757 | 2761 |
. $form[CDM_MAP_DISTRIBUTION]['image_map']['#description']; |
2758 | 2762 |
} |
2759 | 2763 |
|
... | ... | |
3336 | 3340 |
foreach ($children as $key) { |
3337 | 3341 |
$odd_even = $weight % 4 == 0 ? 'odd' : 'even'; |
3338 | 3342 |
$element[$key]['#weight'] = $weight; |
3339 |
$element[$key]['#prefix'] = '<tr class="' . $odd_even . '"><td>' . t($element['#options'][$key]) . '</td><td>';
|
|
3343 |
$element[$key]['#prefix'] = '<tr class="' . $odd_even . '"><td>' . t('@row-label', array('@row-label' => $element['#options'][$key])) . '</td><td>';
|
|
3340 | 3344 |
$element[$key]['#suffix'] = '</td>'; |
3341 | 3345 |
unset($element[$key]['#title']); |
3342 | 3346 |
$weight += 2; |
... | ... | |
3483 | 3487 |
if (!empty($element['#value'])) { |
3484 | 3488 |
json_decode($element['#value']); |
3485 | 3489 |
if(json_last_error() != JSON_ERROR_NONE){ |
3486 |
form_error($element, t('The form element %title contains invalid JSON. You can check the syntax with ', array('%title' => $element['#title'])) . l('JSONLint', 'http://jsonlint.com/')); |
|
3490 |
form_error($element, |
|
3491 |
t('The form element %title contains invalid JSON. You can check the syntax with ', array('%title' => $element['#title'])) |
|
3492 |
. l('JSONLint', 'http://jsonlint.com/') |
|
3493 |
); |
|
3487 | 3494 |
} |
3488 | 3495 |
} |
3489 | 3496 |
} |
modules/cdm_dataportal/theme/cdm_dataportal.descriptions.theme | ||
---|---|---|
32 | 32 |
*/ |
33 | 33 |
function theme_cdm_feature_name($variables) { |
34 | 34 |
$feature_name = $variables['feature_name']; |
35 |
return t($feature_name);
|
|
35 |
return t('@feature-name', array('@feature-name' => $feature_name));
|
|
36 | 36 |
} |
37 | 37 |
|
38 | 38 |
|
... | ... | |
348 | 348 |
continue; |
349 | 349 |
} |
350 | 350 |
$out .= '<div class="' . $type . '">'; |
351 |
$out .= '<h3>' . t($label) . "</h3>";
|
|
351 |
$out .= '<h3>' . t('@label', array('@label' => $label)) . "</h3>";
|
|
352 | 352 |
$out .= $keylist; |
353 | 353 |
$out .= '</div>'; |
354 | 354 |
} |
modules/cdm_dataportal/theme/cdm_dataportal.media.theme | ||
---|---|---|
132 | 132 |
)); |
133 | 133 |
} |
134 | 134 |
else { |
135 |
// Comment @WA: should this really be an empty link? |
|
136 |
$out .= l(t(''), $part->uri, array( |
|
135 |
$out .= l('', $part->uri, array( |
|
137 | 136 |
'attributes' => $attributes, |
138 | 137 |
'absolute' => TRUE, |
139 | 138 |
)); |
modules/cdm_dataportal/theme/cdm_dataportal.occurrence.theme | ||
---|---|---|
123 | 123 |
}, |
124 | 124 |
$field); |
125 | 125 |
|
126 |
return t(ucfirst($field)) . ':';
|
|
126 |
return t('@field-name :', array('@field-name' => ucfirst($field)));
|
|
127 | 127 |
} |
128 | 128 |
|
129 | 129 |
|
modules/cdm_dataportal/theme/cdm_dataportal.page.theme | ||
---|---|---|
456 | 456 |
} |
457 | 457 |
elseif ($fieldname == "doi" && is_object($reference->doi)) { |
458 | 458 |
$table_rows[] = array( |
459 |
t(ucfirst(strtolower($fieldname))),
|
|
459 |
t('@fieldname', array('@fieldname' => ucfirst(strtolower($fieldname)))),
|
|
460 | 460 |
cdm_doi($reference->doi, false) |
461 | 461 |
); |
462 | 462 |
} |
463 | 463 |
elseif ($fieldname == "uri" && isset($reference->uri) && $reference->uri) { |
464 | 464 |
$table_rows[] = array( |
465 |
t(ucfirst(strtolower($fieldname))),
|
|
465 |
t('@fieldname', array('@fieldname' => ucfirst(strtolower($fieldname)))),
|
|
466 | 466 |
cdm_external_uri($reference->uri, false) |
467 | 467 |
); |
468 | 468 |
} |
... | ... | |
513 | 513 |
|
514 | 514 |
if (isset($value) && $value != '') { |
515 | 515 |
$table_rows[] = array( |
516 |
t(ucfirst(strtolower($fieldname))),
|
|
516 |
t('@fieldname', array('@fieldname' => ucfirst(strtolower($fieldname)))),
|
|
517 | 517 |
$value, |
518 | 518 |
); |
519 | 519 |
} |
... | ... | |
522 | 522 |
else { |
523 | 523 |
if (isset($reference->$fieldname) && $reference->$fieldname != '') { |
524 | 524 |
$table_rows[] = array( |
525 |
t(ucfirst(strtolower($fieldname))),
|
|
525 |
t('@fieldname', array('@fieldname' => ucfirst(strtolower($fieldname)))),
|
|
526 | 526 |
$reference->$fieldname, |
527 | 527 |
); |
528 | 528 |
} |
... | ... | |
697 | 697 |
// TODO replace by using translations or theme the menue tabs itself instead? |
698 | 698 |
switch ($tabname) { |
699 | 699 |
default: |
700 |
return t($tabname);
|
|
700 |
return t('@tabname', array('@tabname' => $tabname));
|
|
701 | 701 |
} |
702 | 702 |
} |
Also available in: Unified diff
#5912 fixing wrong usages of dynamic strings, using placeholders and avoiding concatination