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();
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,
);
}

View File

@ -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)) {

View File

@ -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">';