diff --git a/src/Dca/FrontendIntegration.php b/src/Dca/FrontendIntegration.php index f07c46a..820f723 100644 --- a/src/Dca/FrontendIntegration.php +++ b/src/Dca/FrontendIntegration.php @@ -12,10 +12,10 @@ namespace Netzmacht\Contao\Leaflet\Dca; -use ContaoCommunityAlliance\Translator\TranslatorInterface as Translator; use Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory; use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder; use Netzmacht\Contao\Leaflet\Model\MapModel; +use Symfony\Component\Translation\TranslatorInterface as Translator; /** * Class Module is the helper for the tl_module dca. @@ -88,18 +88,18 @@ class FrontendIntegration \RequestToken::get(), sprintf( $pattern, - specialchars($this->translator->translate('editalias.1', 'tl_content', [$dataContainer->value])), + specialchars($this->translator->trans('editalias.1', [$dataContainer->value], 'contao_tl_content')), specialchars( str_replace( "'", "\\'", - sprintf($this->translator->translate('editalias.1', 'tl_content', [$dataContainer->value])) + sprintf($this->translator->trans('editalias.1', [$dataContainer->value], 'contao_tl_content')) ) ) ), \Image::getHtml( 'alias.gif', - $this->translator->translate('editalias.0', 'tl_content', [$dataContainer->value]), + $this->translator->trans('editalias.0', [$dataContainer->value], 'contao_tl_content'), 'style="vertical-align:top"' ) ); diff --git a/src/Dca/LayerCallbacks.php b/src/Dca/LayerCallbacks.php index 9f47e2d..e739a2b 100644 --- a/src/Dca/LayerCallbacks.php +++ b/src/Dca/LayerCallbacks.php @@ -12,11 +12,11 @@ namespace Netzmacht\Contao\Leaflet\Dca; -use ContaoCommunityAlliance\Translator\TranslatorInterface as Translator; use Netzmacht\Contao\Toolkit\Dca\Callback\Callbacks; use Netzmacht\Contao\Toolkit\Dca\Manager; use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder; use Netzmacht\Contao\Leaflet\Model\LayerModel; +use Symfony\Component\Translation\TranslatorInterface as Translator; /** * Class Layer is the helper class for the tl_leaflet_layer dca. @@ -203,10 +203,10 @@ class LayerCallbacks extends Callbacks $buffer = sprintf( '%s ', $pasteAfterUrl, - specialchars($this->translator->translate('pasteafter.1', $table, [$row['id']])), + specialchars($this->translator->trans('pasteafter.1', [$row['id']], 'contao_' . $table)), \Image::getHtml( 'pasteafter.gif', - $this->translator->translate('pasteafter.1', $table, [$row['id']]) + $this->translator->trans('pasteafter.1', [$row['id']], 'contao_' . $table) ) ); @@ -223,10 +223,10 @@ class LayerCallbacks extends Callbacks $buffer .= sprintf( '%s ', $pasteIntoUrl, - specialchars($this->translator->translate('pasteinto.1', $table, [$row['id']])), + specialchars($this->translator->trans('pasteinto.1', [$row['id']], 'contao_' . $table)), \Image::getHtml( 'pasteinto.gif', - $this->translator->translate('pasteinto.1', $table, [$row['id']]) + $this->translator->trans('pasteinto.1', [$row['id']], 'contao_' . $table) ) ); } elseif ($row['id'] > 0) { diff --git a/src/Dca/Validator.php b/src/Dca/Validator.php index 6607ce6..f96a920 100644 --- a/src/Dca/Validator.php +++ b/src/Dca/Validator.php @@ -12,9 +12,9 @@ namespace Netzmacht\Contao\Leaflet\Dca; -use ContaoCommunityAlliance\Translator\TranslatorInterface as Translator; use Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory; use Netzmacht\LeafletPHP\Value\LatLng; +use Symfony\Component\Translation\TranslatorInterface as Translator; /** * Class Validator. @@ -66,7 +66,7 @@ class Validator LatLng::fromString($value); } catch (\Exception $e) { throw new \InvalidArgumentException( - $this->translator->translate('invalidCoordinates', 'leaflet', [$value]), + $this->translator->trans('invalidCoordinates', [$value], 'contao_leaflet'), 0, $e ); @@ -126,7 +126,7 @@ class Validator { if (preg_match('/^[A-Za-z_]+[A-Za-z0-9_]+$/', $value) !== 1) { throw new \InvalidArgumentException( - $this->translator->translate('invalidAlias', 'leaflet') + $this->translator->trans('invalidAlias', [], 'contao_leaflet') ); }