-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -16,7 +16,7 @@ | |
* @author David Molineus <[email protected]> | ||
* @author Richard Henkenjohann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -280,7 +280,7 @@ private function languageSwitcher(EnvironmentInterface $environment) | |
return $template | ||
->set('languages', $controller->getSupportedLanguages(null)) | ||
->set('language', $dataProvider->getCurrentLanguage()) | ||
->set('submit', $this->translator->trans('MSC.showSelected', [], 'contao_default')) | ||
->set('submit', $this->translator->trans('MSC.showSelected', 'default')) | ||
->set('REQUEST_TOKEN', $this->tokenManager->getToken($this->tokenName)) | ||
->parse(); | ||
} | ||
|
@@ -402,7 +402,7 @@ protected function renderTemplate(ContaoBackendViewTemplate $template, Environme | |
$showColumn = $this->getViewSection($definition)->getListingConfig()->getShowColumns(); | ||
|
||
$template | ||
->set('subHeadline', $this->translate('MSC.select_models', 'contao_default')) | ||
->set('subHeadline', $this->translate('MSC.select_models', 'default')) | ||
->set('tableName', ($definition->getName() ?: 'none')) | ||
->set('select', 'select' === $provider->getParameter('act')) | ||
->set('action', StringUtil::ampersand(Environment::get('request'))) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -14,7 +14,7 @@ | |
* @author Sven Baumann <[email protected]> | ||
* @author Richard Henkenjohann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0 | ||
* @filesource | ||
*/ | ||
|
@@ -332,7 +332,7 @@ private function renderFieldSets( | |
if (empty($fieldSet['palette'])) { | ||
$fieldSet['palette'] = \sprintf( | ||
'<p> </p><strong>%s</strong><p> </p>', | ||
$translator->translate('MSC.no_properties_available') | ||
$translator->translate('MSC.no_properties_available', 'default') | ||
); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -13,7 +13,7 @@ | |
* @package contao-community-alliance/dc-general | ||
* @author Sven Baumann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0 | ||
* @filesource | ||
*/ | ||
|
@@ -234,10 +234,15 @@ private function isPropertyAllowed(PropertyInterface $property, EnvironmentInter | |
assert($inputProvider instanceof InputProviderInterface); | ||
|
||
Message::addInfo( | ||
\sprintf( | ||
$translator->translate('MSC.not_allowed_property_info'), | ||
$property->getLabel() ?: $property->getName(), | ||
$translator->translate('MSC.' . $inputProvider->getParameter('mode') . 'Selected') | ||
$translator->translate( | ||
'MSC.not_allowed_property_info', 'default', | ||
Check failure on line 238 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.1 Contao: ~4.13.0
Check failure on line 238 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.2 Contao: ~4.13.0
Check failure on line 238 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.1 Contao: ~4.13.0
Check failure on line 238 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.2 Contao: ~4.13.0
|
||
[ | ||
'%property%' => $property->getLabel() ?: $property->getName(), | ||
'%mode%' => $translator->translate( | ||
'MSC.' . $inputProvider->getParameter('mode') . 'Selected', | ||
'default' | ||
) | ||
] | ||
) | ||
); | ||
|
||
|
@@ -392,7 +397,7 @@ protected function renderTemplate(ContaoBackendViewTemplate $template, Environme | |
\sprintf( | ||
'%s: %s', | ||
$this->translate('MSC.' . $inputProvider->getParameter('mode') . 'Selected', $languageDomain), | ||
$this->translate('MSC.edit_all_select_properties', $languageDomain) | ||
$this->translate('MSC.edit_all_select_properties', 'default') | ||
) | ||
) | ||
->set('mode', 'none') | ||
|
@@ -436,7 +441,7 @@ protected function getSelectButtons(EnvironmentInterface $environment) | |
'<div class="tl_submit_container">' . | ||
'<input class="%s" value="%s" onclick="%s">' . | ||
'</div>', | ||
StringUtil::specialchars($this->translate('MSC.nothingSelect', $languageDomain)), | ||
StringUtil::specialchars($this->translate('MSC.nothingSelect','default')), | ||
Check failure on line 444 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.1 Contao: ~4.13.0
Check failure on line 444 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.2 Contao: ~4.13.0
Check failure on line 444 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.1 Contao: ~4.13.0
Check failure on line 444 in src/Contao/View/Contao2BackendView/ActionHandler/MultipleHandler/SelectPropertyAllHandler.php GitHub Actions / PHP: 8.2 Contao: ~4.13.0
|
||
'tl_submit', | ||
StringUtil::specialchars($this->translate('MSC.close', $languageDomain)), | ||
'BackendGeneral.hideMessage(); return false;' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -16,7 +16,7 @@ | |
* @author Sven Baumann <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -354,7 +354,7 @@ protected function process(Action $action, EnvironmentInterface $environment) | |
$template | ||
->set('languages', $controller->getSupportedLanguages($model->getId())) | ||
->set('currentLanguage', $dataProvider->getCurrentLanguage()) | ||
->set('languageSubmit', $translator->translate('MSC.showSelected')) | ||
->set('languageSubmit', $translator->translate('MSC.showSelected', 'default')) | ||
->set('backBT', StringUtil::specialchars($translator->translate('MSC.backBT'))) | ||
->set('REQUEST_TOKEN', $this->tokenManager->getToken($this->tokenName)); | ||
} else { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -18,7 +18,7 @@ | |
* @author Stefan Heimes <[email protected]> | ||
* @author Sven Baumann <[email protected]> | ||
* @author Richard Henkenjohann <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -884,7 +884,7 @@ protected function allValuesUnique() | |
if (!$dataProvider->isUniqueValue($propertyName, $value, $this->model->getId())) { | ||
$editInformation->setModelError( | ||
$this->model, | ||
[$translator->translate('MSC.not_unique', null, [$propertyName])], | ||
[$translator->translate('MSC.not_unique', 'default', ['%property%' => $propertyName])], | ||
$definition | ||
); | ||
|
||
|
@@ -1039,7 +1039,7 @@ private function executeMultiLanguage(ContaoBackendViewTemplate $template) | |
$template | ||
->set('languages', $controller->getSupportedLanguages($this->model->getId())) | ||
->set('language', $dataProvider->getCurrentLanguage()) | ||
->set('languageSubmit', $translator->translate('MSC.showSelected')) | ||
->set('languageSubmit', $translator->translate('MSC.showSelected', 'default')) | ||
->set('languageHeadline', $languages[$dataProvider->getCurrentLanguage()] ?? ''); | ||
|
||
return; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -12,7 +12,8 @@ | |
* | ||
* @package contao-community-alliance/dc-general | ||
* @author Sven Baumann <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -57,7 +58,7 @@ public function handleEvent(GetSelectModeButtonsEvent $event) | |
'<div class="tl_submit_container">' . | ||
'<input type="submit" name="close" class="%s" value="%s" onclick="%s">' . | ||
'</div>', | ||
StringUtil::specialchars($translator->translate('MSC.nothingSelect', 'contao_default')), | ||
StringUtil::specialchars($translator->translate('MSC.nothingSelect', 'default')), | ||
'tl_submit', | ||
StringUtil::specialchars($translator->translate('MSC.close', 'contao_default')), | ||
'this.blur(); BackendGeneral.hideMessage(); return false;' | ||
|
@@ -74,8 +75,8 @@ public function handleEvent(GetSelectModeButtonsEvent $event) | |
'models[]', | ||
$confirmMessage, | ||
StringUtil::specialchars($translator->translate('MSC.delAllConfirm', 'contao_default')), | ||
StringUtil::specialchars($translator->translate('MSC.confirmOk', 'contao_default')), | ||
StringUtil::specialchars($translator->translate('MSC.confirmAbort', 'contao_default')) | ||
StringUtil::specialchars($translator->translate('MSC.confirmOk', 'default')), | ||
StringUtil::specialchars($translator->translate('MSC.confirmAbort', 'default')) | ||
); | ||
|
||
$buttons['delete'] = \sprintf( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -17,7 +17,7 @@ | |
* @author Sven Baumann <[email protected]> | ||
* @author Ingolf Steinhardt <[email protected]> | ||
* @author Cliff Parnitzky <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -272,7 +272,7 @@ private function formatByWeekGrouping(int $value): string | |
return '-'; | ||
} | ||
|
||
$event = new ParseDateEvent($value, $this->translator->translate('MSC.week_format')); | ||
$event = new ParseDateEvent($value, $this->translator->translate('MSC.week_format', 'default')); | ||
$this->dispatcher->dispatch($event, ContaoEvents::DATE_PARSE); | ||
|
||
return $event->getResult(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
/** | ||
* This file is part of contao-community-alliance/dc-general. | ||
* | ||
* (c) 2013-2023 Contao Community Alliance. | ||
* (c) 2013-2024 Contao Community Alliance. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
|
@@ -19,7 +19,7 @@ | |
* @author Ingolf Steinhardt <[email protected]> | ||
* @author David Molineus <[email protected]> | ||
* @author Kim Wormer <[email protected]> | ||
* @copyright 2013-2023 Contao Community Alliance. | ||
* @copyright 2013-2024 Contao Community Alliance. | ||
* @license https://github.com/contao-community-alliance/dc-general/blob/master/LICENSE LGPL-3.0-or-later | ||
* @filesource | ||
*/ | ||
|
@@ -645,7 +645,10 @@ public function generate() | |
/** @psalm-suppress PropertyNotSetInConstructor */ | ||
->set('class', ($this->strClass ? ' ' . $this->strClass : '')) | ||
->set('icon', $icon->getHtml()) | ||
->set('title', $translator->translate($this->title ?: 'MSC.treePicker', null, [$this->sourceName])) | ||
->set( | ||
'title', | ||
$translator->translate($this->title ?: 'MSC.treePicker', 'default', ['%table%' => $this->sourceName]) | ||
) | ||
->set('changeSelection', $translator->translate('MSC.changeSelection')) | ||
->set('dragItemsHint', $translator->translate('MSC.dragItemsHint')) | ||
->set('fieldType', $this->fieldType) | ||
|
@@ -909,7 +912,10 @@ public function generatePopup() | |
/** @psalm-suppress PropertyNotSetInConstructor */ | ||
->set('class', ($this->strClass ? ' ' . $this->strClass : '')) | ||
->set('icon', $icon->getHtml()) | ||
->set('title', $translator->translate($this->title ?: 'MSC.treePicker', null, [$this->sourceName])) | ||
->set( | ||
'title', | ||
$translator->translate($this->title ?: 'MSC.treePicker', 'default', ['%table%' => $this->sourceName]) | ||
) | ||
->set('fieldType', $this->fieldType) | ||
->set('resetSelected', $translator->translate('MSC.resetSelected')) | ||
->set('selectAll', $translator->translate('MSC.selectAll')) | ||
|