diff --git a/modules/geocoder_field/src/Plugin/Field/GeocodeFormatterBase.php b/modules/geocoder_field/src/Plugin/Field/GeocodeFormatterBase.php index 7099e6f8891de5a5fa4241411233bdd02fdf45dd..f379347961ebd9f39b9c43ce31d59674a0761712 100644 --- a/modules/geocoder_field/src/Plugin/Field/GeocodeFormatterBase.php +++ b/modules/geocoder_field/src/Plugin/Field/GeocodeFormatterBase.php @@ -211,7 +211,7 @@ abstract class GeocodeFormatterBase extends FormatterBase implements ContainerFa '#title' => 'Output format', '#default_value' => $this->getSetting('dumper'), '#options' => $this->dumperPluginManager->getPluginsAsOptions(), - '#description' => t('Set the output format of the value. Ex, for a geofield, the format must be set to WKT.'), + '#description' => $this->t('Set the output format of the value. Ex, for a geofield, the format must be set to WKT.'), ]; return $element; diff --git a/modules/geocoder_field/src/Plugin/Geocoder/Field/DefaultField.php b/modules/geocoder_field/src/Plugin/Geocoder/Field/DefaultField.php index be4dd526c1bd222fcaec6478438fec7abefab323..217b23419eae578cb93b539631abc03a7c50e1ad 100644 --- a/modules/geocoder_field/src/Plugin/Geocoder/Field/DefaultField.php +++ b/modules/geocoder_field/src/Plugin/Geocoder/Field/DefaultField.php @@ -165,7 +165,7 @@ class DefaultField extends PluginBase implements GeocoderFieldPluginInterface, C */ public function getSettingsForm(FieldConfigInterface $field, array $form, FormStateInterface &$form_state) { - $geocoder_settings_link = $this->link->generate(t('Edit options in the Geocoder configuration page</span>'), Url::fromRoute('geocoder.settings', [], [ + $geocoder_settings_link = $this->link->generate($this->t('Edit options in the Geocoder configuration page</span>'), Url::fromRoute('geocoder.settings', [], [ 'query' => [ 'destination' => Url::fromRoute('<current>') ->toString(), @@ -174,7 +174,7 @@ class DefaultField extends PluginBase implements GeocoderFieldPluginInterface, C $element = [ '#type' => 'details', - '#title' => t('Geocode'), + '#title' => $this->t('Geocode'), '#open' => TRUE, ]; @@ -334,10 +334,10 @@ class DefaultField extends PluginBase implements GeocoderFieldPluginInterface, C $element['geocode']['delta_handling'] = [ '#type' => 'select', '#title' => $this->t('Multi-value input handling'), - '#description' => 'If the source field is a multi-value field, this is mapped 1-on-1 by default. + '#description' => $this->t('If the source field is a multi-value field, this is mapped 1-on-1 by default. That means that if you can add an unlimited amount of text fields, this also results in an unlimited amount of geocodes. However, if you have one field that contains multiple geocodes - (like a file) you can select single-to-multiple to extract all geocodes from the first field.', + (like a file) you can select single-to-multiple to extract all geocodes from the first field.'), '#default_value' => $field->getThirdPartySetting('geocoder_field', 'delta_handling', 'default'), '#options' => [ 'default' => $this->t('Match Multiples (default)'), @@ -392,7 +392,7 @@ class DefaultField extends PluginBase implements GeocoderFieldPluginInterface, C $form_values = $form_state->getValues(); if ($form_values['method'] !== 'none' && empty($form_values['providers'])) { - $form_state->setError($form['third_party_settings']['geocoder_field']['providers'], t('The selected Geocode operation needs at least one provider.')); + $form_state->setError($form['third_party_settings']['geocoder_field']['providers'], $this->t('The selected Geocode operation needs at least one provider.')); } // On Reverse Geocode the delta_handling should always be 'default' diff --git a/modules/geocoder_geofield/src/Plugin/Field/FieldFormatter/GeoPhpGeocodeFormatter.php b/modules/geocoder_geofield/src/Plugin/Field/FieldFormatter/GeoPhpGeocodeFormatter.php index ea7b3cf90f8e45c1eb94714987917449eee2f157..27fe7fa8f5fc20960eadbb460438878ca9ac973e 100644 --- a/modules/geocoder_geofield/src/Plugin/Field/FieldFormatter/GeoPhpGeocodeFormatter.php +++ b/modules/geocoder_geofield/src/Plugin/Field/FieldFormatter/GeoPhpGeocodeFormatter.php @@ -170,7 +170,7 @@ abstract class GeoPhpGeocodeFormatter extends FileGeocodeFormatter { $summary['intro'] = $this->pluginDefinition['description']; $summary += parent::settingsSummary(); unset($summary['dumper']); - $summary['adapter'] = t('Output format: @format', [ + $summary['adapter'] = $this->t('Output format: @format', [ '@format' => !empty($adapter) ? $adapters[$adapter] : $this->t('Not set'), ]); return $summary; diff --git a/src/DumperPluginManager.php b/src/DumperPluginManager.php index d6896428842b785a4a534c411686cec92307f8fe..4b1aed3dcaa74c3e6000aad2cbcbc1bd7a5d93e5 100644 --- a/src/DumperPluginManager.php +++ b/src/DumperPluginManager.php @@ -153,7 +153,7 @@ class DumperPluginManager extends GeocoderPluginManagerBase { if (\in_array($field_config->getType(), $this->maxLengthFieldTypes, TRUE) && \strlen($dumper_result) > $field_config->getFieldStorageDefinition()->getSetting('max_length')) { - $incompatibility_warning_message = t("The '@field_name' field 'max length' property is not compatible with the chosen '@dumper' dumper.<br>Thus <b>be aware</b> <u>the dumper output result has been truncated to @max_length chars (max length)</u>.<br> You are advised to change the '@field_name' field definition or chose another compatible dumper.", [ + $incompatibility_warning_message = $this->t("The '@field_name' field 'max length' property is not compatible with the chosen '@dumper' dumper.<br>Thus <b>be aware</b> <u>the dumper output result has been truncated to @max_length chars (max length)</u>.<br> You are advised to change the '@field_name' field definition or chose another compatible dumper.", [ '@field_name' => $field_config->getLabel(), '@dumper' => $dumper->getPluginId(), '@max_length' => $field_config->getFieldStorageDefinition()->getSetting('max_length'), diff --git a/src/ProviderPluginManager.php b/src/ProviderPluginManager.php index 69632a4aaff2c3e67f0fa8923d62428dcc42c174..35e4d6200aec624fb3933e696b3b0b7fa50e0954 100644 --- a/src/ProviderPluginManager.php +++ b/src/ProviderPluginManager.php @@ -135,7 +135,7 @@ class ProviderPluginManager extends GeocoderPluginManagerBase { * The plugins table list. */ public function providersPluginsTableList(array $enabled_provider_ids): array { - $providers_link = $this->link->generate(t('Geocoder providers configuration page'), Url::fromRoute('entity.geocoder_provider.collection', [], [ + $providers_link = $this->link->generate($this->t('Geocoder providers configuration page'), Url::fromRoute('entity.geocoder_provider.collection', [], [ 'attributes' => ['target' => '_blank'], ]));