Translate untranslated drupal_set_message() function calls.
This commit is contained in:
parent
27f657d399
commit
9b1a87dcbe
|
@ -110,7 +110,7 @@ function farm_api_oauth_settings_form_submit(array $form, array &$form_state) {
|
|||
entity_delete('oauth2_server_client', $client_id);
|
||||
|
||||
// Notify that client was disabled.
|
||||
drupal_set_message('Disabled OAuth Client: ' . $client_label);
|
||||
drupal_set_message(t('Disabled OAuth Client: @client_label', array('@client_label' => $client_label)));
|
||||
}
|
||||
|
||||
else {
|
||||
|
@ -142,7 +142,7 @@ function farm_api_oauth_settings_form_submit(array $form, array &$form_state) {
|
|||
farm_api_enable_oauth_client($client['label'], $client_key, $client_secret, $client['redirect_uri']);
|
||||
|
||||
// Notify that client was created.
|
||||
drupal_set_message('Created OAuth Client for ' . $client['label']);
|
||||
drupal_set_message(t('Created OAuth Client for @client_label', array('@client_label' => $client['label'])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ function farm_area_generate_form($form, &$form_state) {
|
|||
|
||||
// If GEOS is not installed, print a warning and hide the submit button.
|
||||
if (!farm_area_generate_geos_exists()) {
|
||||
drupal_set_message('This area generator tool requires the GEOS libary: ' . l('http://trac.osgeo.org/geos', 'http://trac.osgeo.org/geos'), 'warning');
|
||||
drupal_set_message(t('This area generator tool requires the GEOS libary') . ': ' . l('http://trac.osgeo.org/geos', 'http://trac.osgeo.org/geos'), 'warning');
|
||||
}
|
||||
else {
|
||||
$form['actions']['preview'] = array(
|
||||
|
@ -372,7 +372,7 @@ function farm_area_generate_form_submit(&$form, &$form_state) {
|
|||
}
|
||||
|
||||
// Announce how many areas were generated.
|
||||
drupal_set_message(count($geometries) . ' areas were generated.');
|
||||
drupal_set_message(t('@count areas were generated.', array('@count' => count($geometries))));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -356,7 +356,7 @@ function farm_crop_planting_quick_form_submit($form, &$form_state) {
|
|||
// Set a message.
|
||||
$label = entity_label('farm_asset', $planting_asset);
|
||||
$uri = entity_uri('farm_asset', $planting_asset);
|
||||
drupal_set_message('Planting created: ' . l($label, $uri['path']));
|
||||
drupal_set_message(t('Planting created') . ': ' . l($label, $uri['path']));
|
||||
|
||||
// Iterate through the logs.
|
||||
foreach ($form_state['values']['planting']['logs'] as $name => $log_values) {
|
||||
|
|
|
@ -230,7 +230,7 @@ function farm_flags_action($entity, $context = array()) {
|
|||
|
||||
// If the operation is invalid, bail.
|
||||
if (!in_array($context['operation'], array('append', 'replace'))) {
|
||||
drupal_set_message('Invalid operation.');
|
||||
drupal_set_message(t('Invalid operation.'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -453,7 +453,7 @@ function farm_group_asset_membership_action(array $assets, $context = array()) {
|
|||
|
||||
// If we're missing assets, areas, or a timestamp, bail.
|
||||
if (empty($assets) || empty($context['groups']) || empty($context['timestamp'])) {
|
||||
drupal_set_message('Could not perform membership change because required information was missing.', 'error');
|
||||
drupal_set_message(t('Could not perform membership change because required information was missing.'), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ function farm_livestock_birth_form_submit($form, &$form_state) {
|
|||
// Set a message.
|
||||
$label = entity_label('farm_asset', $child_asset);
|
||||
$uri = entity_uri('farm_asset', $child_asset);
|
||||
drupal_set_message('Child animal created: ' . l($label, $uri['path']));
|
||||
drupal_set_message(t('Child animal created') . ': ' . l($label, $uri['path']));
|
||||
}
|
||||
|
||||
// Create a birth log. Leave the name blank so that it is auto-generated.
|
||||
|
@ -362,7 +362,7 @@ function farm_livestock_birth_form_submit($form, &$form_state) {
|
|||
// Set a message linking to the mother animal.
|
||||
$label = entity_label('farm_asset', $parents['mother']);
|
||||
$uri = entity_uri('farm_asset', $parents['mother']);
|
||||
drupal_set_message("View the mother's animal record: " . l($label, $uri['path']));
|
||||
drupal_set_message(t("View the mother's animal record") . ': ' . l($label, $uri['path']));
|
||||
|
||||
// Add the children to $form_state['storage'] so that other submit functions
|
||||
// can work with them.
|
||||
|
|
|
@ -874,7 +874,7 @@ function farm_livestock_weight_action(array $assets, $context = array()) {
|
|||
|
||||
// If we're missing assets, weight, units, or a timestamp, bail.
|
||||
if (empty($assets) || empty($context['weight']) || empty($context['units']) || empty($context['timestamp'])) {
|
||||
drupal_set_message('Could not set weights because required information was missing.', 'error');
|
||||
drupal_set_message(t('Could not set weights because required information was missing.'), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ function farm_log_assign_action(Log $log, $context = array()) {
|
|||
|
||||
// If the operation is invalid, bail.
|
||||
if (!in_array($context['operation'], array('append', 'replace'))) {
|
||||
drupal_set_message('Invalid operation.');
|
||||
drupal_set_message(t('Invalid operation.'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -845,7 +845,7 @@ function farm_log_create($type, $name = '', $timestamp = REQUEST_TIME, $done = T
|
|||
// Set a message.
|
||||
$label = entity_label('log', $log);
|
||||
$uri = entity_uri('log', $log);
|
||||
drupal_set_message('Log created: ' . l($label, $uri['path']));
|
||||
drupal_set_message(t('Log created') . ': ' . l($label, $uri['path']));
|
||||
|
||||
// Return the log.
|
||||
return $log;
|
||||
|
|
|
@ -886,7 +886,7 @@ function farm_movement_asset_move_action(array $assets, $context = array()) {
|
|||
|
||||
// If we're missing assets, areas, or a timestamp, bail.
|
||||
if (empty($assets) || empty($context['areas']) || empty($context['timestamp'])) {
|
||||
drupal_set_message('Could not perform movement because required information was missing.', 'error');
|
||||
drupal_set_message(t('Could not perform movement because required information was missing.'), 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ function farm_soil_nrcs_soil_name_lookup_submit($form, &$form_state) {
|
|||
|
||||
// If no soil names were returned, print a message.
|
||||
if (empty($soil_names)) {
|
||||
drupal_set_message('Soil names could not be found. Add points to the "Sample points" map above and try again.', 'warning');
|
||||
drupal_set_message(t('Soil names could not be found. Add points to the "Sample points" map above and try again.'), 'warning');
|
||||
}
|
||||
|
||||
// If any of the soil names contain commas, wrap them in double-quotes.
|
||||
|
|
Loading…
Reference in New Issue