From 374afb0ea6103caa9f0bc02eb5edec97278d99ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Thu, 4 Oct 2018 19:06:15 +0200 Subject: [PATCH] Prepare i10n of events page --- .../Classes/Service/ConfigurationService.php | 42 +- .../TypoScript/Page/Main.typoscript | 6 + .../Configuration/TypoScript/setup.txt | 30 ++ .../Assets/js/components/Configurator.vue | 19 +- .../Assets/js/components/DateRangeInput.vue | 8 +- .../Assets/js/components/StepInput.vue | 5 +- .../Private/Language/en.locallang.xlf | 361 ++++++++++++++++++ .../Resources/Private/Language/locallang.xlf | 179 ++++++++- .../Layouts/FluidStyledContent/Default.html | 8 +- .../Layouts/Page/CategoryEpEvents.html | 6 +- .../Private/Layouts/Page/OfferEpEvents.html | 2 +- .../Private/Layouts/Page/SubpageEpEvents.html | 4 +- .../Private/Partials/ContactBox.html | 2 +- .../Private/Partials/CookieConsent.html | 6 +- .../Resources/Private/Partials/Header.html | 18 +- .../Private/Partials/Header/Header.html | 129 +++---- .../Private/Partials/HerounitActivity.html | 6 +- .../Private/Partials/HerounitCategory.html | 2 +- .../Private/Partials/HerounitFrontpage.html | 8 +- .../Private/Partials/HerounitOffer.html | 6 +- .../Resources/Private/Partials/IconBar.html | 2 +- .../Resources/Private/Partials/MobileNav.html | 2 +- .../Partials/OfferTeaserLandscape.html | 6 +- .../Private/Partials/PageFooter.html | 8 +- .../Private/Partials/PageHeader.html | 13 +- .../Resources/Private/Partials/SubnavBox.html | 2 +- .../Private/Templates/Activity/Detail.html | 16 +- .../FluidStyledContent/Herounit.html | 2 +- .../Private/Templates/Form/Configurator.html | 64 ++-- .../Private/Templates/Form/ContactForm.html | 43 ++- .../Private/Templates/Form/InquiryForm.html | 25 +- .../Private/Templates/Search/Form.html | 2 +- .../Private/Templates/Search/Result.html | 10 +- .../ext/ep_events/ext_conf_template.txt | 17 - web/typo3conf/realurl_conf.php | 11 +- 35 files changed, 828 insertions(+), 242 deletions(-) create mode 100644 web/typo3conf/ext/ep_events/Resources/Private/Language/en.locallang.xlf delete mode 100644 web/typo3conf/ext/ep_events/ext_conf_template.txt diff --git a/web/typo3conf/ext/ep_events/Classes/Service/ConfigurationService.php b/web/typo3conf/ext/ep_events/Classes/Service/ConfigurationService.php index 685c4e5f..f890e65e 100644 --- a/web/typo3conf/ext/ep_events/Classes/Service/ConfigurationService.php +++ b/web/typo3conf/ext/ep_events/Classes/Service/ConfigurationService.php @@ -2,23 +2,33 @@ namespace EP\EpEvents\Service; +use TYPO3\CMS\Core\Utility\GeneralUtility; +use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; use TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility; class ConfigurationService { /** - * @var ConfigurationUtility + * @var ConfigurationManagerInterface */ - protected $configurationUtility; + protected $configurationManager; /** - * @param ConfigurationUtility $configurationUtility + * @var array */ - public function __construct(ConfigurationUtility $configurationUtility) - { + protected $settings; - $this->configurationUtility = $configurationUtility; + /** + * @param ConfigurationManagerInterface $configurationManager + */ + public function __construct(ConfigurationManagerInterface $configurationManager) + { + $this->configurationManager = $configurationManager; + $settings = GeneralUtility::removeDotsFromTS( + $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT) + ); + $this->settings = $settings['plugin']['tx_epevents']; } /** @@ -26,17 +36,17 @@ class ConfigurationService */ public function getConfiguratorConfig() { - $extensionConfig = $this->configurationUtility->getCurrentConfiguration('ep_events'); + $extensionConfig = $this->settings['settings']['configurator']['options']; return [ - 'budgetOptions' => $this->parseConfigItem($extensionConfig, 'configuratorBudgetOptions'), - 'paxOptions' => $this->parseConfigItem($extensionConfig, 'configuratorPaxOptions'), - 'periodOptions' => $this->parseConfigItem($extensionConfig, 'configuratorPeriodOptions'), - 'travelTypeOptions' => $this->parseConfigItem($extensionConfig, 'configuratorTravelTypeOptions'), - 'locationTypeOptions' => $this->parseConfigItem($extensionConfig, 'configuratorLocationTypeOptions'), - 'accommodationTypeOptions' => $this->parseConfigItem($extensionConfig, 'configuratorAccommodationTypeOptions'), - 'programmeTypeOptions' => $this->parseConfigItem($extensionConfig, 'configuratorProgrammeTypeOptions'), - 'distanceOptions' => $this->parseConfigItem($extensionConfig, 'configuratorDistanceOptions'), + 'budgetOptions' => $this->parseConfigItem($extensionConfig, 'budget'), + 'paxOptions' => $this->parseConfigItem($extensionConfig, 'pax'), + 'periodOptions' => $this->parseConfigItem($extensionConfig, 'period'), + 'travelTypeOptions' => $this->parseConfigItem($extensionConfig, 'travelType'), + 'locationTypeOptions' => $this->parseConfigItem($extensionConfig, 'locationType'), + 'accommodationTypeOptions' => $this->parseConfigItem($extensionConfig, 'accommodationType'), + 'programmeTypeOptions' => $this->parseConfigItem($extensionConfig, 'programmeType'), + 'distanceOptions' => $this->parseConfigItem($extensionConfig, 'distance'), ]; } @@ -48,7 +58,7 @@ class ConfigurationService protected function parseConfigItem($configArray, $itemName) { $config = []; - foreach (explode(';', $configArray[$itemName]['value']) as $item) + foreach (explode(';', $configArray[$itemName]) as $item) { [ $value, $label ] = explode(':', $item); $config[$value] = $label; diff --git a/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Main.typoscript b/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Main.typoscript index 7d448bdd..c1f33571 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Main.typoscript +++ b/web/typo3conf/ext/ep_events/Configuration/TypoScript/Page/Main.typoscript @@ -81,6 +81,12 @@ page { 10.references.fieldName = media 20 = EP\EpEvents\DataProcessing\TraveltypeProcessor 30 = EP\EpEvents\DataProcessing\OfferProcessor + 40 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor + 40 { + special = rootline + special.range = 0|0 + as = rootPage + } } } diff --git a/web/typo3conf/ext/ep_events/Configuration/TypoScript/setup.txt b/web/typo3conf/ext/ep_events/Configuration/TypoScript/setup.txt index 7838aaa6..b863dae9 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TypoScript/setup.txt +++ b/web/typo3conf/ext/ep_events/Configuration/TypoScript/setup.txt @@ -57,6 +57,16 @@ plugin.tx_epevents { defaults { budget = 4 } + options { + budget = 1:nicht festgelegt;2:400 - 600 €;3:600 - 800 €;4:800 - 1000 €;5:1000 - 1500 €;6:1500 - 2000 €;7:2500 - 3000 € + pax = 1:20 - 40;2:40 - 60;3:60 - 80;4:80 - 100;5:100 - 150;6:150 - 200;7:200 - 250;8:250 - 300;9:350 - 400;10:400 - 450;11:450 - 500;12:500+ + period = 1:Tagesevent;2:1 Nacht;3:2 Nächte;4:3 Nächte;5:4 Nächte;6:5 Nächte;7:6 Nächte;8:7 Nächte + travelType = 1:Incentive;2:Teambuilding;3:Meeting;4:Corporate Event + locationType = 1:Meer;2:Berge;3:Städte;4:Spezial + accommodationType = 1:3-Sterne;2:4-Sterne;3:5-Sterne;4:Spezial + programmeType = 1:Outdoor & Action;2:Event-Gastronomie;3:Sightseeing;4:Spezial + distance = 1:Deutschland;2:Europa;3:Welt + } } } } @@ -91,5 +101,25 @@ config { compressCss = 1 compressBody = 1 typolinkEnableLinksAcrossDomains = 1 + linkVars = L } +[globalVar = GP:L = 1] + config { + sys_language_uid = 1 + language = en + locale_all = en_EN.UTF-8 + htmlTag_langKey = en + } + plugin.tx_epevents.settings.configurator.options { + budget = 1:undetermined;2:400 - 600 €;3:600 - 800 €;4:800 - 1000 €;5:1000 - 1500 €;6:1500 - 2000 €;7:2500 - 3000 € + pax = 1:20 - 40;2:40 - 60;3:60 - 80;4:80 - 100;5:100 - 150;6:150 - 200;7:200 - 250;8:250 - 300;9:350 - 400;10:400 - 450;11:450 - 500;12:500+ + period = 1:Daytrip;2:1 Night;3:2 Nights;4:3 Nights;5:4 Nights;6:5 Nights;7:6 Nights;8:7 Nights + travelType = 1:Incentive;2:Teambuilding;3:Meeting;4:Corporate Event + locationType = 1:Swa;2:Mountains;3:Cities;4:Special + accommodationType = 1:3-Star;2:4-Star;3:5-Star;4:Special + programmeType = 1:Outdoor & Action;2:Event-Gastronomy;3:Sightseeing;4:Special + distance = 1:Germany;2:Europe;3:World + } +[global] + diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/Configurator.vue b/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/Configurator.vue index 85c95ff9..24fc53b2 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/Configurator.vue +++ b/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/Configurator.vue @@ -30,7 +30,8 @@ optionsDistance: { type: Object, required: true }, optionsPax: { type: Object, required: true }, optionsBudget: { type: Object, required: true }, - optionsPeriod: { type: Object, required: true } + optionsPeriod: { type: Object, required: true }, + language: { type: Object, required: true } }, data () { return { @@ -41,28 +42,28 @@ selectBoxes: { type: { active: true, - name: 'Art der Reise', + name: this.language['travel_type'], options: this.optionsType, images: this.imagesType, hasIcon: true }, destination: { active: false, - name: 'Destination', + name: this.language['destination'], options: this.optionsDestination, images: this.imagesDestination, hasIcon: true }, accommodation: { active: false, - name: 'Unterkunft', + name: this.language['accommodation'], options: this.optionsAccommodation, images: this.imagesAccommodation, hasIcon: true }, programme: { active: false, - name: 'Programm', + name: this.language['programme'], options: this.optionsProgramme, images: this.imagesProgramme, hasIcon: true @@ -70,22 +71,22 @@ }, inputFields: { distance: { - name: 'Ziel', + name: this.language['distance'], options: this.optionsDistance, suffix: '' }, pax: { - name: 'Teilnehmerzahl', + name: this.language['pax'], options: this.optionsPax, suffix: 'Personen' }, budget: { - name: 'Budget pro Person', + name: this.language['budget'], options: this.optionsBudget, suffix: '' }, period: { - name: 'Reisezeitraum', + name: this.language['period'], options: this.optionsPeriod, suffix: '' } diff --git a/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/DateRangeInput.vue b/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/DateRangeInput.vue index 40983d2c..5a6a0448 100644 --- a/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/DateRangeInput.vue +++ b/web/typo3conf/ext/ep_events/Resources/Private/Assets/js/components/DateRangeInput.vue @@ -1,12 +1,12 @@