Browse Source

Issue #3215846 by beagaliana: Make some strings translatable

Closes #3215846. t() function was missing in some strings
7.x-1.x
beagaliana 12 months ago committed by Michael Stenta
parent
commit
e365c07304
  1. 4
      modules/farm/farm_asset/farm_asset.module
  2. 62
      modules/farm/farm_quantity/farm_quantity.module
  3. 6
      themes/farm_theme/template.php

4
modules/farm/farm_asset/farm_asset.module

@ -328,7 +328,7 @@ function farm_asset_entity_view($entity, $type, $view_mode, $langcode) {
$asset_types = farm_asset_type_get_names();
if (!empty($asset_types[$entity->type])) {
$entity->content['type'] = array(
'#markup' => '<div><strong>Asset type:</strong> ' . $asset_types[$entity->type] . '</div>',
'#markup' => '<div><strong>' . t('Asset type:') . '</strong> ' . $asset_types[$entity->type] . '</div>',
'#weight' => -102,
);
}
@ -336,7 +336,7 @@ function farm_asset_entity_view($entity, $type, $view_mode, $langcode) {
// Add the asset ID.
if (!empty($entity->id)) {
$entity->content['id'] = array(
'#markup' => '<div><strong>Asset ID:</strong> ' . $entity->id . '</div>',
'#markup' => '<div><strong>' . t('Asset ID:') . '</strong> ' . $entity->id . '</div>',
'#weight' => -101,
);
}

62
modules/farm/farm_quantity/farm_quantity.module

@ -253,22 +253,22 @@ function farm_quantity_units($measure = '') {
if ($system == 'metric') {
// Length units.
$units['length'][] = 'kilometers';
$units['length'][] = 'meters';
$units['length'][] = 'centimeters';
$units['length'][] = t('kilometers');
$units['length'][] = t('meters');
$units['length'][] = t('centimeters');
// Weight units.
$units['weight'][] = 'kilograms';
$units['weight'][] = 'grams';
$units['weight'][] = t('kilograms');
$units['weight'][] = t('grams');
// Area units.
$units['area'][] = 'hectares';
$units['area'][] = 'square meters';
$units['area'][] = t('hectares');
$units['area'][] = t('square meters');
// Volume units.
$units['volume'][] = 'kiloliters';
$units['volume'][] = 'liters';
$units['volume'][] = 'milliliters';
$units['volume'][] = t('kiloliters');
$units['volume'][] = t('liters');
$units['volume'][] = t('milliliters');
// Temperature units.
$units['temperature'][] = 'C';
@ -276,38 +276,38 @@ function farm_quantity_units($measure = '') {
elseif ($system == 'us') {
// Length units.
$units['length'][] = 'miles';
$units['length'][] = 'feet';
$units['length'][] = 'inches';
$units['length'][] = t('miles');
$units['length'][] = t('feet');
$units['length'][] = t('inches');
// Weight units.
$units['weight'][] = 'tons';
$units['weight'][] = 'lbs';
$units['weight'][] = 'ounces';
$units['weight'][] = t('tons');
$units['weight'][] = t('lbs');
$units['weight'][] = t('ounces');
// Area units.
$units['area'][] = 'acres';
$units['area'][] = 'square feet';
$units['area'][] = t('acres');
$units['area'][] = t('square feet');
// Volume units.
$units['volume'][] = 'cubic yards';
$units['volume'][] = 'cubic feet';
$units['volume'][] = 'gallons';
$units['volume'][] = 'quarts';
$units['volume'][] = 'cups';
$units['volume'][] = t('cubic yards');
$units['volume'][] = t('cubic feet');
$units['volume'][] = t('gallons');
$units['volume'][] = t('quarts');
$units['volume'][] = t('cups');
// Temperature units.
$units['temperature'][] = 'F';
$units['temperature'][] = t('F');
}
// Time units are independent of system.
$units['time'][] = 'years';
$units['time'][] = 'months';
$units['time'][] = 'weeks';
$units['time'][] = 'days';
$units['time'][] = 'hours';
$units['time'][] = 'minutes';
$units['time'][] = 'seconds';
$units['time'][] = t('years');
$units['time'][] = t('months');
$units['time'][] = t('weeks');
$units['time'][] = t('days');
$units['time'][] = t('hours');
$units['time'][] = t('minutes');
$units['time'][] = t('seconds');
// If a measure is specified, only return units for that measure.
if (!empty($measure)) {

6
themes/farm_theme/template.php

@ -151,9 +151,9 @@ function farm_theme_form_views_exposed_form_alter(&$form, &$form_state, $form_id
$form['#prefix'] = '
<fieldset class="panel panel-default collapsible">
<legend class="panel-heading" role="tab" id="' . $panel_head_id . '">
<a class="panel-title fieldset-legend collapsed" data-toggle="collapse" href="#' . $panel_body_id . '" aria-expanded="' . $aria_expanded . '" aria-controls="' . $panel_body_id . '">
Filters
</a>
<a class="panel-title fieldset-legend collapsed" data-toggle="collapse" href="#' . $panel_body_id . '" aria-expanded="' . $aria_expanded . '" aria-controls="' . $panel_body_id . '">'
. t('Filters') .
'</a>
</legend>
<div id="' . $panel_body_id . '" class="panel-collapse collapse' . $collapse_class . '" role="tabpanel" aria-labelledby="' . $panel_head_id . '">
<div class="panel-body">';

Loading…
Cancel
Save