Issue #3215846 by beagaliana: Make some strings translatable

Closes #3215846. t() function was missing in some strings
This commit is contained in:
beagaliana 2021-05-27 13:33:54 +02:00 committed by Michael Stenta
parent 2b64bc8e7c
commit e365c07304
3 changed files with 36 additions and 36 deletions

View File

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

View File

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

View File

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