-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
270 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,16 @@ 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', | ||
[ | ||
'%property%' => $property->getLabel() ?: $property->getName(), | ||
'%mode%' => $translator->translate( | ||
'MSC.' . $inputProvider->getParameter('mode') . 'Selected', | ||
'default' | ||
) | ||
] | ||
) | ||
); | ||
|
||
|
@@ -392,7 +398,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 +442,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')), | ||
'tl_submit', | ||
StringUtil::specialchars($this->translate('MSC.close', $languageDomain)), | ||
'BackendGeneral.hideMessage(); return false;' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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')) | ||
|
Oops, something went wrong.