From 96771d624b4567783f536b434cc324f7a1340342 Mon Sep 17 00:00:00 2001 From: Christian Schiffler Date: Mon, 10 Jul 2023 20:03:59 +0200 Subject: [PATCH] Changes to show translations from xlf and fixes for PHPCQ --- .composer-require-checker.json | 4 + .phpcq.lock | 2 +- composer.json | 10 +- psalm.xml | 3 + src/Attribute/Base.php | 5 +- src/Attribute/BaseSimple.php | 31 +- src/Attribute/TranslatedReference.php | 17 +- src/BackendIntegration/Module.php | 8 +- src/BackendIntegration/TemplateList.php | 62 +++- ...bstractContentElementAndModuleCallback.php | 53 ++- .../Contao/Hooks/FixupUserGroupModules.php | 156 -------- .../Contao/InsertTag/ResolveLanguageTag.php | 4 +- .../Backend/AbstractAddAllController.php | 26 +- .../Backend/ConfigurationController.php | 96 +++++ .../Backend/DcGeneralControllerTrait.php | 94 +++++ .../Backend/InputScreenAddAllController.php | 2 +- .../Backend/MetaModelController.php | 114 ++++++ .../Backend/SupportMetaModelsController.php | 16 +- .../ContentElement/ItemListController.php | 6 +- .../FrontendModule/ItemListController.php | 2 +- .../Controller/ListControllerTrait.php | 23 +- .../CompilerPass/PrepareTranslatorPass.php | 47 +++ .../MetaModelsCoreExtension.php | 6 +- .../BackendNavigationListener.php | 300 ++++++++++++--- .../BreadcrumbMetaModelListener.php | 2 +- .../DcGeneral/Breadcrumb/BreadcrumbStore.php | 27 +- .../DefinitionBuilder/CommandBuilder.php | 65 +--- .../Contao2BackendViewDefinitionBuilder.php | 6 +- .../DefinitionBuilder/PaletteBuilder.php | 12 +- .../PropertyDefinitionBuilder.php | 35 +- .../TranslatorPopulator.php | 43 +-- .../Attribute/AttributeRendererListener.php | 4 +- .../AttributeSchemaManagerHintListener.php | 12 +- .../Attribute/ColNameValidationListener.php | 32 +- .../Attribute/NameAndDescriptionListener.php | 19 +- .../Dca/BackendSectionOptionListener.php | 41 +- .../Table/Dca/RenderModeHintListener.php | 6 +- .../DcaSetting/DisableMandatoryListener.php | 6 +- .../DcaSetting/DisableReadOnlyListener.php | 6 +- .../EditMaskSubHeadlineListener.php | 2 +- .../Table/DcaSetting/ModelToLabelListener.php | 6 +- .../SetVisibilityConditionIconListener.php | 5 +- .../ModelToLabelListener.php | 57 ++- .../TypeOptionsListener.php | 13 +- .../DcaSortGroup/ModelToLabelListener.php | 6 +- .../Table/DeleteOperationButtonListener.php | 122 ++++++ .../AbstractFilterSettingTypeRenderer.php | 29 +- .../ModelSchemaManagerHintListener.php | 12 +- .../Table/MetaModel/ModelToLabelListener.php | 20 +- .../MetaModel/TableNamePrefixingListener.php | 14 +- .../RenderSetting/ModelToLabelListener.php | 21 +- .../Table/RenderSettings/JumpToListener.php | 13 +- .../LanguageCodeWizardListener.php | 4 +- src/CoreBundle/EventListener/UserListener.php | 1 + src/CoreBundle/MetaModelsCoreBundle.php | 2 + .../dc-general/environment-populator.yml | 1 + .../Resources/config/dc-general/listener.yml | 9 + .../config/dc-general/table/tl_dca.yml | 4 + src/CoreBundle/Resources/config/hooks.yml | 2 + src/CoreBundle/Resources/config/listeners.yml | 1 + src/CoreBundle/Resources/config/routing.yml | 16 + src/CoreBundle/Resources/config/services.yml | 23 ++ .../Resources/contao/config/config.php | 44 +-- .../Resources/contao/dca/tl_content.php | 0 .../Resources/contao/dca/tl_metamodel.php | 220 ++++++----- .../contao/dca/tl_metamodel_attribute.php | 126 ++++--- .../Resources/contao/dca/tl_metamodel_dca.php | 246 ++++++------ .../contao/dca/tl_metamodel_dca_combine.php | 94 ++--- .../contao/dca/tl_metamodel_dca_sortgroup.php | 176 +++++---- .../contao/dca/tl_metamodel_dcasetting.php | 321 +++++++++------- .../dca/tl_metamodel_dcasetting_condition.php | 119 +++--- .../contao/dca/tl_metamodel_filter.php | 82 ++-- .../contao/dca/tl_metamodel_filtersetting.php | 349 ++++++++++-------- .../contao/dca/tl_metamodel_item.php | 9 +- .../contao/dca/tl_metamodel_rendersetting.php | 97 ++--- .../dca/tl_metamodel_rendersettings.php | 240 ++++++------ .../dca/tl_metamodel_searchable_pages.php | 108 +++--- .../Resources/contao/dca/tl_module.php | 0 .../Resources/contao/dca/tl_user_group.php | 17 +- .../Resources/contao/languages/da/default.php | 80 ---- .../Resources/contao/languages/da/explain.php | 34 -- .../Resources/contao/languages/da/modules.php | 26 -- .../contao/languages/da/tl_metamodel.php | 16 - .../languages/da/tl_metamodel_dcasetting.php | 16 - .../da/tl_metamodel_dcasetting_condition.php | 16 - .../da/tl_metamodel_filtersetting.php | 26 -- .../contao/languages/da/tl_metamodel_item.php | 16 - .../da/tl_metamodel_rendersetting.php | 16 - .../da/tl_metamodel_rendersettings.php | 15 - .../da/tl_metamodel_searchable_pages.php | 16 - .../languages/da/tl_syncCto_database.php | 23 -- .../Resources/contao/languages/de/default.php | 116 ------ .../Resources/contao/languages/de/explain.php | 102 ----- .../Resources/contao/languages/de/modules.php | 25 -- .../contao/languages/de/tl_content.php | 113 ------ .../contao/languages/de/tl_form_field.php | 28 -- .../contao/languages/de/tl_maintenance.php | 18 - .../contao/languages/de/tl_metamodel.php | 82 ---- .../languages/de/tl_metamodel_attribute.php | 60 --- .../contao/languages/de/tl_metamodel_dca.php | 85 ----- .../languages/de/tl_metamodel_dca_combine.php | 36 -- .../de/tl_metamodel_dca_sortgroup.php | 74 ---- .../languages/de/tl_metamodel_dcasetting.php | 112 ------ .../de/tl_metamodel_dcasetting_condition.php | 70 ---- .../languages/de/tl_metamodel_filter.php | 35 -- .../de/tl_metamodel_filtersetting.php | 112 ------ .../contao/languages/de/tl_metamodel_item.php | 52 --- .../de/tl_metamodel_rendersetting.php | 55 --- .../de/tl_metamodel_rendersettings.php | 75 ---- .../de/tl_metamodel_searchable_pages.php | 50 --- .../contao/languages/de/tl_module.php | 112 ------ .../languages/de/tl_syncCto_database.php | 23 -- .../Resources/contao/languages/el/default.php | 32 -- .../Resources/contao/languages/el/explain.php | 22 -- .../Resources/contao/languages/el/modules.php | 26 -- .../contao/languages/el/tl_content.php | 71 ---- .../contao/languages/el/tl_metamodel.php | 69 ---- .../languages/el/tl_metamodel_attribute.php | 45 --- .../contao/languages/el/tl_metamodel_dca.php | 32 -- .../languages/el/tl_metamodel_dca_combine.php | 33 -- .../el/tl_metamodel_dca_sortgroup.php | 23 -- .../languages/el/tl_metamodel_dcasetting.php | 78 ---- .../el/tl_metamodel_dcasetting_condition.php | 31 -- .../languages/el/tl_metamodel_filter.php | 33 -- .../el/tl_metamodel_filtersetting.php | 71 ---- .../contao/languages/el/tl_metamodel_item.php | 45 --- .../el/tl_metamodel_rendersetting.php | 37 -- .../el/tl_metamodel_rendersettings.php | 64 ---- .../el/tl_metamodel_searchable_pages.php | 21 -- .../contao/languages/el/tl_module.php | 70 ---- .../languages/el/tl_syncCto_database.php | 23 -- .../Resources/contao/languages/en/default.php | 168 +-------- .../Resources/contao/languages/en/explain.php | 0 .../Resources/contao/languages/en/modules.php | 10 +- .../contao/languages/en/tl_content.php | 20 +- .../contao/languages/en/tl_form_field.php | 0 .../contao/languages/en/tl_maintenance.php | 0 .../contao/languages/en/tl_metamodel.php | 93 ----- .../languages/en/tl_metamodel_attribute.php | 73 ---- .../contao/languages/en/tl_metamodel_dca.php | 106 ------ .../languages/en/tl_metamodel_dca_combine.php | 40 -- .../en/tl_metamodel_dca_sortgroup.php | 90 ----- .../languages/en/tl_metamodel_dcasetting.php | 145 -------- .../en/tl_metamodel_dcasetting_condition.php | 110 ------ .../languages/en/tl_metamodel_filter.php | 45 --- .../en/tl_metamodel_filtersetting.php | 157 -------- .../contao/languages/en/tl_metamodel_item.php | 57 --- .../en/tl_metamodel_rendersetting.php | 63 ---- .../en/tl_metamodel_rendersettings.php | 85 ----- .../en/tl_metamodel_searchable_pages.php | 58 --- .../contao/languages/en/tl_module.php | 16 +- .../languages/en/tl_syncCto_database.php | 0 .../Resources/contao/languages/et/default.php | 62 ---- .../Resources/contao/languages/et/explain.php | 39 -- .../Resources/contao/languages/et/modules.php | 19 - .../contao/languages/et/tl_content.php | 47 --- .../contao/languages/et/tl_maintenance.php | 16 - .../contao/languages/et/tl_metamodel.php | 37 -- .../languages/et/tl_metamodel_attribute.php | 32 -- .../contao/languages/et/tl_metamodel_dca.php | 45 --- .../languages/et/tl_metamodel_dca_combine.php | 17 - .../et/tl_metamodel_dca_sortgroup.php | 40 -- .../languages/et/tl_metamodel_dcasetting.php | 61 --- .../et/tl_metamodel_dcasetting_condition.php | 38 -- .../languages/et/tl_metamodel_filter.php | 28 -- .../et/tl_metamodel_filtersetting.php | 55 --- .../contao/languages/et/tl_metamodel_item.php | 30 -- .../et/tl_metamodel_rendersetting.php | 23 -- .../et/tl_metamodel_rendersettings.php | 52 --- .../et/tl_metamodel_searchable_pages.php | 20 - .../contao/languages/et/tl_module.php | 48 --- .../languages/et/tl_syncCto_database.php | 17 - .../Resources/contao/languages/fa/default.php | 27 -- .../contao/languages/fa/tl_content.php | 16 - .../contao/languages/fa/tl_metamodel.php | 16 - .../fa/tl_metamodel_filtersetting.php | 25 -- .../contao/languages/fa/tl_metamodel_item.php | 16 - .../contao/languages/fa/tl_module.php | 16 - .../Resources/contao/languages/fr/default.php | 101 ----- .../Resources/contao/languages/fr/explain.php | 45 --- .../Resources/contao/languages/fr/modules.php | 25 -- .../contao/languages/fr/tl_content.php | 78 ---- .../contao/languages/fr/tl_maintenance.php | 17 - .../contao/languages/fr/tl_metamodel.php | 76 ---- .../languages/fr/tl_metamodel_attribute.php | 45 --- .../contao/languages/fr/tl_metamodel_dca.php | 78 ---- .../languages/fr/tl_metamodel_dca_combine.php | 33 -- .../fr/tl_metamodel_dca_sortgroup.php | 29 -- .../languages/fr/tl_metamodel_dcasetting.php | 83 ----- .../fr/tl_metamodel_dcasetting_condition.php | 32 -- .../languages/fr/tl_metamodel_filter.php | 33 -- .../fr/tl_metamodel_filtersetting.php | 75 ---- .../contao/languages/fr/tl_metamodel_item.php | 46 --- .../fr/tl_metamodel_rendersetting.php | 37 -- .../fr/tl_metamodel_rendersettings.php | 65 ---- .../fr/tl_metamodel_searchable_pages.php | 22 -- .../contao/languages/fr/tl_module.php | 77 ---- .../languages/fr/tl_syncCto_database.php | 22 -- .../Resources/contao/languages/it/default.php | 95 ----- .../Resources/contao/languages/it/explain.php | 45 --- .../Resources/contao/languages/it/modules.php | 25 -- .../contao/languages/it/tl_content.php | 78 ---- .../contao/languages/it/tl_metamodel.php | 70 ---- .../languages/it/tl_metamodel_attribute.php | 45 --- .../contao/languages/it/tl_metamodel_dca.php | 65 ---- .../languages/it/tl_metamodel_dca_combine.php | 33 -- .../it/tl_metamodel_dca_sortgroup.php | 28 -- .../languages/it/tl_metamodel_dcasetting.php | 83 ----- .../it/tl_metamodel_dcasetting_condition.php | 32 -- .../languages/it/tl_metamodel_filter.php | 33 -- .../it/tl_metamodel_filtersetting.php | 77 ---- .../contao/languages/it/tl_metamodel_item.php | 46 --- .../it/tl_metamodel_rendersetting.php | 37 -- .../it/tl_metamodel_rendersettings.php | 65 ---- .../it/tl_metamodel_searchable_pages.php | 22 -- .../contao/languages/it/tl_module.php | 77 ---- .../languages/it/tl_syncCto_database.php | 22 -- .../Resources/contao/languages/rm/default.php | 97 ----- .../Resources/contao/languages/rm/explain.php | 45 --- .../Resources/contao/languages/rm/modules.php | 26 -- .../contao/languages/rm/tl_content.php | 73 ---- .../contao/languages/rm/tl_metamodel.php | 69 ---- .../languages/rm/tl_metamodel_attribute.php | 45 --- .../contao/languages/rm/tl_metamodel_dca.php | 65 ---- .../languages/rm/tl_metamodel_dca_combine.php | 33 -- .../rm/tl_metamodel_dca_sortgroup.php | 28 -- .../languages/rm/tl_metamodel_dcasetting.php | 83 ----- .../rm/tl_metamodel_dcasetting_condition.php | 32 -- .../languages/rm/tl_metamodel_filter.php | 33 -- .../rm/tl_metamodel_filtersetting.php | 75 ---- .../contao/languages/rm/tl_metamodel_item.php | 46 --- .../rm/tl_metamodel_rendersetting.php | 37 -- .../rm/tl_metamodel_rendersettings.php | 65 ---- .../rm/tl_metamodel_searchable_pages.php | 22 -- .../contao/languages/rm/tl_module.php | 72 ---- .../languages/rm/tl_syncCto_database.php | 23 -- .../Resources/contao/languages/ru/default.php | 141 ------- .../Resources/contao/languages/ru/explain.php | 85 ----- .../Resources/contao/languages/ru/modules.php | 26 -- .../contao/languages/ru/tl_content.php | 81 ---- .../contao/languages/ru/tl_maintenance.php | 18 - .../contao/languages/ru/tl_metamodel.php | 80 ---- .../languages/ru/tl_metamodel_attribute.php | 50 --- .../contao/languages/ru/tl_metamodel_dca.php | 83 ----- .../languages/ru/tl_metamodel_dca_combine.php | 34 -- .../ru/tl_metamodel_dca_sortgroup.php | 64 ---- .../languages/ru/tl_metamodel_dcasetting.php | 106 ------ .../ru/tl_metamodel_dcasetting_condition.php | 59 --- .../languages/ru/tl_metamodel_filter.php | 35 -- .../ru/tl_metamodel_filtersetting.php | 93 ----- .../contao/languages/ru/tl_metamodel_item.php | 52 --- .../ru/tl_metamodel_rendersetting.php | 52 --- .../ru/tl_metamodel_rendersettings.php | 73 ---- .../ru/tl_metamodel_searchable_pages.php | 40 -- .../contao/languages/ru/tl_module.php | 80 ---- .../languages/ru/tl_syncCto_database.php | 23 -- .../Resources/contao/languages/sk/default.php | 65 ---- .../Resources/contao/languages/sk/explain.php | 34 -- .../Resources/contao/languages/sk/modules.php | 18 - .../contao/languages/sk/tl_metamodel.php | 16 - .../sk/tl_metamodel_filtersetting.php | 25 -- .../contao/languages/sk/tl_metamodel_item.php | 16 - .../languages/sk/tl_syncCto_database.php | 15 - .../Resources/contao/languages/tr/default.php | 16 - .../contao/languages/tr/tl_content.php | 16 - .../languages/tr/tl_metamodel_dcasetting.php | 16 - .../tr/tl_metamodel_dcasetting_condition.php | 16 - .../tr/tl_metamodel_filtersetting.php | 25 -- .../tr/tl_metamodel_rendersetting.php | 16 - .../tr/tl_metamodel_searchable_pages.php | 16 - .../contao/languages/tr/tl_module.php | 16 - .../Resources/contao/languages/uk/default.php | 32 -- .../contao/languages/uk/tl_metamodel.php | 16 - .../uk/tl_metamodel_filtersetting.php | 25 -- .../contao/languages/uk/tl_metamodel_item.php | 16 - .../templates/be_addallattributes.html5 | 2 +- .../templates/be_detectedproblems.html5 | 2 +- .../templates/metamodel_prerendered.html5 | 17 +- .../templates/metamodel_prerendered.text | 5 +- .../templates/metamodel_unrendered.html5 | 16 +- .../templates/metamodel_unrendered.text | 3 +- .../contao/templates/mm_actionbutton.html5 | 2 +- .../templates/mm_clearall_default.html5 | 4 +- .../contao/templates/mm_pagination.html5 | 2 +- src/CoreBundle/Resources/public/css/style.css | 2 +- .../Resources/public/scss/style.scss | 2 +- .../translations/metamodels_default.en.xlf | 16 + .../translations/metamodels_filter.en.xlf | 13 + .../translations/metamodels_list.en.xlf | 25 ++ .../translations/metamodels_navigation.en.xlf | 53 +++ .../translations/metamodels_support.en.xlf | 62 ++++ .../translations/metamodels_wildcard.en.xlf | 41 ++ .../mm_testselecttags.en.metamodels | 0 .../Resources/translations/modules.en.xlf | 7 + .../Resources/translations/tl_content.en.xlf | 25 ++ .../translations/tl_metamodel.en.xlf | 243 ++++++++++++ .../tl_metamodel_attribute.en.xlf | 192 ++++++++++ .../translations/tl_metamodel_dca.en.xlf | 284 ++++++++++++++ .../tl_metamodel_dca_combine.en.xlf | 73 ++++ .../tl_metamodel_dca_sortgroup.en.xlf | 231 ++++++++++++ .../tl_metamodel_dcasetting.en.xlf | 335 +++++++++++++++++ .../tl_metamodel_dcasetting_condition.en.xlf | 192 ++++++++++ .../translations/tl_metamodel_filter.en.xlf | 128 +++++++ .../tl_metamodel_filtersetting.en.xlf | 339 +++++++++++++++++ .../translations/tl_metamodel_item.en.xlf | 150 ++++++++ .../tl_metamodel_rendersetting.en.xlf | 178 +++++++++ .../tl_metamodel_rendersettings.en.xlf | 225 +++++++++++ .../tl_metamodel_searchable_pages.en.xlf | 140 +++++++ .../Resources/translations/tl_modules.en.xlf | 25 ++ .../Resources/views/Backend/add-all.html.twig | 2 +- .../views/Backend/be_config.html.twig | 15 + .../Translator/MetaModelTranslationLoader.php | 238 +++++++++++- .../MetaModelTranslatorConfigurator.php | 109 ++++++ src/CoreBundle/Translator/Translator.php | 28 +- src/DcGeneral/Data/Driver.php | 6 +- src/DcGeneral/Data/FilterBuilder.php | 3 +- .../Events/MetaModel/DuplicateModel.php | 3 +- src/Dca/Helper.php | 32 +- src/Filter/Rules/SimpleQuery.php | 6 +- src/Filter/Rules/StaticIdList.php | 4 +- src/Filter/Setting/SimpleLookup.php | 26 +- src/FrontendIntegration/FrontendFilter.php | 2 +- src/FrontendIntegration/MetaModelHybrid.php | 23 +- src/Item.php | 36 +- src/ItemList.php | 9 +- src/Render/Setting/Collection.php | 15 +- .../InputScreenInformationBuilder.php | 31 +- tests/Data/FilterBuilderTest.php | 6 +- tests/MetaModelsTest.php | 1 - 329 files changed, 5900 insertions(+), 11158 deletions(-) delete mode 100644 src/CoreBundle/Contao/Hooks/FixupUserGroupModules.php create mode 100644 src/CoreBundle/Controller/Backend/ConfigurationController.php create mode 100644 src/CoreBundle/Controller/Backend/DcGeneralControllerTrait.php create mode 100644 src/CoreBundle/Controller/Backend/MetaModelController.php create mode 100644 src/CoreBundle/DependencyInjection/CompilerPass/PrepareTranslatorPass.php create mode 100755 src/CoreBundle/EventListener/DcGeneral/Table/DeleteOperationButtonListener.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/dca/tl_content.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/dca/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/da/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_form_field.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_maintenance.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/de/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/el/tl_syncCto_database.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/default.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/explain.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/modules.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/tl_content.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/tl_form_field.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/tl_maintenance.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/en/tl_metamodel_searchable_pages.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/tl_module.php mode change 100644 => 100755 src/CoreBundle/Resources/contao/languages/en/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_maintenance.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/et/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fa/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fa/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fa/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fa/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fa/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fa/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_maintenance.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/fr/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/it/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/rm/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_maintenance.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_attribute.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dca.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dca_combine.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dca_sortgroup.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_filter.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_rendersettings.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/ru/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/sk/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/sk/explain.php delete mode 100644 src/CoreBundle/Resources/contao/languages/sk/modules.php delete mode 100644 src/CoreBundle/Resources/contao/languages/sk/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/sk/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/sk/tl_metamodel_item.php delete mode 100644 src/CoreBundle/Resources/contao/languages/sk/tl_syncCto_database.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/tl_content.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/tl_metamodel_dcasetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/tl_metamodel_dcasetting_condition.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/tl_metamodel_rendersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/tl_metamodel_searchable_pages.php delete mode 100644 src/CoreBundle/Resources/contao/languages/tr/tl_module.php delete mode 100644 src/CoreBundle/Resources/contao/languages/uk/default.php delete mode 100644 src/CoreBundle/Resources/contao/languages/uk/tl_metamodel.php delete mode 100644 src/CoreBundle/Resources/contao/languages/uk/tl_metamodel_filtersetting.php delete mode 100644 src/CoreBundle/Resources/contao/languages/uk/tl_metamodel_item.php create mode 100644 src/CoreBundle/Resources/translations/metamodels_default.en.xlf create mode 100644 src/CoreBundle/Resources/translations/metamodels_filter.en.xlf create mode 100644 src/CoreBundle/Resources/translations/metamodels_list.en.xlf create mode 100644 src/CoreBundle/Resources/translations/metamodels_navigation.en.xlf create mode 100644 src/CoreBundle/Resources/translations/metamodels_support.en.xlf create mode 100644 src/CoreBundle/Resources/translations/metamodels_wildcard.en.xlf delete mode 100644 src/CoreBundle/Resources/translations/mm_testselecttags.en.metamodels create mode 100644 src/CoreBundle/Resources/translations/modules.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_content.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_attribute.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_dca.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_dca_combine.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_dca_sortgroup.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_dcasetting.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_dcasetting_condition.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_filter.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_filtersetting.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_rendersetting.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_rendersettings.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_metamodel_searchable_pages.en.xlf create mode 100644 src/CoreBundle/Resources/translations/tl_modules.en.xlf create mode 100644 src/CoreBundle/Resources/views/Backend/be_config.html.twig create mode 100644 src/CoreBundle/Translator/MetaModelTranslatorConfigurator.php diff --git a/.composer-require-checker.json b/.composer-require-checker.json index 8a45915bd..53cf5c017 100644 --- a/.composer-require-checker.json +++ b/.composer-require-checker.json @@ -7,6 +7,10 @@ "Contao\\ManagerPlugin\\Bundle\\Parser\\ParserInterface", "Contao\\ManagerPlugin\\Routing\\RoutingPluginInterface", "Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle", + "Knp\\Menu\\FactoryInterface", + "Knp\\Menu\\ItemInterface", + "Symfony\\Bundle\\FrameworkBundle\\Translation\\Translator", + "Symfony\\Contracts\\Cache\\CacheInterface", "tl_user_group" ] } diff --git a/.phpcq.lock b/.phpcq.lock index 4ec1fc353..d79776ed4 100644 --- a/.phpcq.lock +++ b/.phpcq.lock @@ -1 +1 @@ -{"plugins":{"phpunit":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpunit/phpunit-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"phpunit":"^6.0 || ^7.0 || ^8.0 || ^9.0"}},"checksum":{"type":"sha-512","value":"c73f15658e3ba62665f09492ec91c3a6a715760bfaa88473a987538439fff442540148e086e46a6aa18ce55a3ea2fbf76caaa581384cb84a38859fcc609ae7e4"},"tools":{"phpunit":{"version":"9.6.18","url":"https://phar.phpunit.de/phpunit-9.6.18.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-xml":"*","ext-xmlwriter":"*"}},"checksum":{"type":"sha-256","value":"fc3729afdbab93cbf9f662de730bcc2f936bd9255bb08c6c53d41b9b0a30ec62"},"signature":"https://phar.phpunit.de/phpunit-9.6.18.phar.asc"}},"composerLock":null},"psalm":{"api-version":"1.0.0","version":"1.2.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/psalm/psalm-1.2.0.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0","ext-dom":"*"},"tool":{"psalm":"^3.0 || ^4.0 || ^5.0"}},"checksum":{"type":"sha-512","value":"4a550c9226d7bca582d7c10bd87cce01190c96398936b1613421640c83df62ed1c6e0d44c1b39635414ea8cf4a892a6458d27590793238add24e7cb5547e6ffd"},"tools":{"psalm":{"version":"5.23.1","url":"https://github.com/vimeo/psalm/releases/download/5.23.1/psalm.phar","requirements":{"php":{"php":"^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0","ext-SimpleXML":"*","ext-ctype":"*","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-tokenizer":"*"}},"checksum":null,"signature":"https://github.com/vimeo/psalm/releases/download/5.23.1/psalm.phar.asc"}},"composerLock":null},"composer-require-checker":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-require-checker/composer-require-checker-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0"},"tool":{"composer-require-checker":"^3.8 || ^4.0"}},"checksum":{"type":"sha-512","value":"d5415bddfe024c5749d894034583882aee4e5c3e1087815d9fdd81cb5e71630f631a0e35de0ff84b97fbbf738c16ece5f83bd8c00695913eb846aa6f04577dc2"},"tools":{"composer-require-checker":{"version":"4.7.1","url":"https://github.com/maglnet/ComposerRequireChecker/releases/download/4.7.1/composer-require-checker.phar","requirements":{"php":{"php":"~8.1.0 || ~8.2.0 || ~8.3.0","ext-phar":"*"}},"checksum":null,"signature":"https://github.com/maglnet/ComposerRequireChecker/releases/download/4.7.1/composer-require-checker.phar.asc"}},"composerLock":null},"phpmd":{"api-version":"1.0.0","version":"1.0.2.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpmd/phpmd-1.0.2.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpmd":"^2.6.1"}},"checksum":{"type":"sha-512","value":"f22280a6dec8dbdd2ec1d83b294f23237fe32c34f4a298e52038e0a7a0074d541635b2b488b1a6098a42d8418a6cd8eb804406ea82b91e362be2b5d11a0915b0"},"tools":{"phpmd":{"version":"2.15.0","url":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar","requirements":{"php":{"php":">=5.3.9","ext-xml":"*"}},"checksum":null,"signature":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar.asc"}},"composerLock":null},"phpcpd":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcpd/phpcpd-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcpd":"^6.0"}},"checksum":{"type":"sha-512","value":"1189ce0bf3fade4cb4241f1d96f915ef8fc7651f4450dc79fdf464ee3d6be3009316f0d423ce2d4af9d76ad50807b7fdf4d77bfa6d9ee2c91d6eda32ea214433"},"tools":{"phpcpd":{"version":"6.0.3","url":"https://phar.phpunit.de/phpcpd-6.0.3.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*"}},"checksum":{"type":"sha-256","value":"2cbaea7cfda1bb4299d863eb075e977c3f49055dd16d88529fae5150d48a84cb"},"signature":"https://phar.phpunit.de/phpcpd-6.0.3.phar.asc"}},"composerLock":null},"phploc":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phploc/phploc-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*","ext-json":"*"},"tool":{"phploc":"^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"}},"checksum":{"type":"sha-512","value":"f67b02d494796adf553cb3dd13ec06c1cb8e53c799954061749424251379541637538199afb3afa3c7a01cabd1cb6f1c53eb621f015dff9644c6c7cbf10c56d1"},"tools":{"phploc":{"version":"7.0.2","url":"https://phar.phpunit.de/phploc-7.0.2.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*"}},"checksum":{"type":"sha-256","value":"3d59778ec86faf25fd00e3a329b2f9ad4a3c751ca91601ea7dab70f887b0bf46"},"signature":"https://phar.phpunit.de/phploc-7.0.2.phar.asc"}},"composerLock":null},"phpcs":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcs/phpcs-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcs":"^3.0 || ^2.0","phpcbf":"^3.0 || ^2.0"}},"checksum":{"type":"sha-512","value":"2737022369da1318cc4e0ea194e8a81019f7b079080d869aab878b7486052fdbe68fee3f28131f35573226def1aabd4bd005e038ee7b767c137b1107c1492a83"},"tools":{"phpcs":{"version":"3.9.1","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.1/phpcs.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.1/phpcs.phar.asc"},"phpcbf":{"version":"3.9.1","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.1/phpcbf.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.1/phpcbf.phar.asc"}},"composerLock":null},"composer-normalize":{"api-version":"1.0.0","version":"1.1.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-normalize/composer-normalize-1.1.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-json":"*"},"tool":{"composer-normalize":"^2.1"}},"checksum":{"type":"sha-512","value":"d59d3557cb20630734878a9115df5dd32d5aff815e5b15be36f6fb5d6e9d83dd36efd84215ab6529edcc924f600946f739a0d9e67723deff95c88346ab502498"},"tools":{"composer-normalize":{"version":"2.42.0","url":"https://github.com/ergebnis/composer-normalize/releases/download/2.42.0/composer-normalize.phar","requirements":{"php":{"php":"~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0","ext-json":"*"}},"checksum":null,"signature":"https://github.com/ergebnis/composer-normalize/releases/download/2.42.0/composer-normalize.phar.asc"}},"composerLock":null}},"tools":[]} \ No newline at end of file +{"plugins":{"phpunit":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpunit/phpunit-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0"},"tool":{"phpunit":"^6.0 || ^7.0 || ^8.0 || ^9.0"}},"checksum":{"type":"sha-512","value":"c73f15658e3ba62665f09492ec91c3a6a715760bfaa88473a987538439fff442540148e086e46a6aa18ce55a3ea2fbf76caaa581384cb84a38859fcc609ae7e4"},"tools":{"phpunit":{"version":"9.6.19","url":"https://phar.phpunit.de/phpunit-9.6.19.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-xml":"*","ext-xmlwriter":"*"}},"checksum":{"type":"sha-256","value":"f30c21743f4fbea14ad8ab8f47673f9067117262dafa147fcb182e75fbc1c249"},"signature":"https://phar.phpunit.de/phpunit-9.6.19.phar.asc"}},"composerLock":null},"psalm":{"api-version":"1.0.0","version":"1.2.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/psalm/psalm-1.2.0.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0","ext-dom":"*"},"tool":{"psalm":"^3.0 || ^4.0 || ^5.0"}},"checksum":{"type":"sha-512","value":"4a550c9226d7bca582d7c10bd87cce01190c96398936b1613421640c83df62ed1c6e0d44c1b39635414ea8cf4a892a6458d27590793238add24e7cb5547e6ffd"},"tools":{"psalm":{"version":"5.24.0","url":"https://github.com/vimeo/psalm/releases/download/5.24.0/psalm.phar","requirements":{"php":{"php":"^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0","ext-SimpleXML":"*","ext-ctype":"*","ext-dom":"*","ext-json":"*","ext-libxml":"*","ext-mbstring":"*","ext-tokenizer":"*"}},"checksum":null,"signature":"https://github.com/vimeo/psalm/releases/download/5.24.0/psalm.phar.asc"}},"composerLock":null},"composer-require-checker":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-require-checker/composer-require-checker-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.4 || ^8.0"},"tool":{"composer-require-checker":"^3.8 || ^4.0"}},"checksum":{"type":"sha-512","value":"d5415bddfe024c5749d894034583882aee4e5c3e1087815d9fdd81cb5e71630f631a0e35de0ff84b97fbbf738c16ece5f83bd8c00695913eb846aa6f04577dc2"},"tools":{"composer-require-checker":{"version":"4.7.1","url":"https://github.com/maglnet/ComposerRequireChecker/releases/download/4.7.1/composer-require-checker.phar","requirements":{"php":{"php":"~8.1.0 || ~8.2.0 || ~8.3.0","ext-phar":"*"}},"checksum":null,"signature":"https://github.com/maglnet/ComposerRequireChecker/releases/download/4.7.1/composer-require-checker.phar.asc"}},"composerLock":null},"phpmd":{"api-version":"1.0.0","version":"1.0.2.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpmd/phpmd-1.0.2.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpmd":"^2.6.1"}},"checksum":{"type":"sha-512","value":"f22280a6dec8dbdd2ec1d83b294f23237fe32c34f4a298e52038e0a7a0074d541635b2b488b1a6098a42d8418a6cd8eb804406ea82b91e362be2b5d11a0915b0"},"tools":{"phpmd":{"version":"2.15.0","url":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar","requirements":{"php":{"php":">=5.3.9","ext-xml":"*"}},"checksum":null,"signature":"https://github.com/phpmd/phpmd/releases/download/2.15.0/phpmd.phar.asc"}},"composerLock":null},"phpcpd":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcpd/phpcpd-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcpd":"^6.0"}},"checksum":{"type":"sha-512","value":"1189ce0bf3fade4cb4241f1d96f915ef8fc7651f4450dc79fdf464ee3d6be3009316f0d423ce2d4af9d76ad50807b7fdf4d77bfa6d9ee2c91d6eda32ea214433"},"tools":{"phpcpd":{"version":"6.0.3","url":"https://phar.phpunit.de/phpcpd-6.0.3.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*"}},"checksum":{"type":"sha-256","value":"2cbaea7cfda1bb4299d863eb075e977c3f49055dd16d88529fae5150d48a84cb"},"signature":"https://phar.phpunit.de/phpcpd-6.0.3.phar.asc"}},"composerLock":null},"phploc":{"api-version":"1.0.0","version":"1.0.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phploc/phploc-1.0.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*","ext-json":"*"},"tool":{"phploc":"^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0"}},"checksum":{"type":"sha-512","value":"f67b02d494796adf553cb3dd13ec06c1cb8e53c799954061749424251379541637538199afb3afa3c7a01cabd1cb6f1c53eb621f015dff9644c6c7cbf10c56d1"},"tools":{"phploc":{"version":"7.0.2","url":"https://phar.phpunit.de/phploc-7.0.2.phar","requirements":{"php":{"php":">=7.3","ext-dom":"*","ext-json":"*"}},"checksum":{"type":"sha-256","value":"3d59778ec86faf25fd00e3a329b2f9ad4a3c751ca91601ea7dab70f887b0bf46"},"signature":"https://phar.phpunit.de/phploc-7.0.2.phar.asc"}},"composerLock":null},"phpcs":{"api-version":"1.0.0","version":"1.2.0.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/phpcs/phpcs-1.2.0.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-dom":"*"},"tool":{"phpcs":"^3.0 || ^2.0","phpcbf":"^3.0 || ^2.0"}},"checksum":{"type":"sha-512","value":"b6ed00306e76068a6af5e3b1dec837724f9e1900ef1049ce88e7ce195b0583524ca33a73613fba13244307a7ca853b6ddaa14ded69f651c3f184ac130bd1aaad"},"tools":{"phpcs":{"version":"3.9.2","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.2/phpcs.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.2/phpcs.phar.asc"},"phpcbf":{"version":"3.9.2","url":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.2/phpcbf.phar","requirements":{"php":{"php":">=5.4.0","ext-simplexml":"*","ext-tokenizer":"*","ext-xmlwriter":"*"}},"checksum":null,"signature":"https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/download/3.9.2/phpcbf.phar.asc"}},"composerLock":null},"composer-normalize":{"api-version":"1.0.0","version":"1.1.1.0","type":"php-file","url":"https://phpcq.github.io/repository/plugin/composer-normalize/composer-normalize-1.1.1.0.php","signature":null,"requirements":{"php":{"php":"^7.3 || ^8.0","ext-json":"*"},"tool":{"composer-normalize":"^2.1"}},"checksum":{"type":"sha-512","value":"d9abda440b85d501c58abf9c81bf76f417594b397129215ffa8b777e9bb5e5eda37d7661d661db3c8d11c24f20345bc6fbe56f013b3b9435d459d2b94f086e0f"},"tools":{"composer-normalize":{"version":"2.42.0","url":"https://github.com/ergebnis/composer-normalize/releases/download/2.42.0/composer-normalize.phar","requirements":{"php":{"php":"~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0","ext-json":"*"}},"checksum":null,"signature":"https://github.com/ergebnis/composer-normalize/releases/download/2.42.0/composer-normalize.phar.asc"}},"composerLock":null}},"tools":[]} \ No newline at end of file diff --git a/composer.json b/composer.json index 34642032b..5bfbeab09 100644 --- a/composer.json +++ b/composer.json @@ -33,16 +33,16 @@ "php": "^8.1", "ext-dom": "*", "contao-community-alliance/dc-general": "^2.3", - "contao-community-alliance/events-contao-bindings": "^4.13", + "contao-community-alliance/events-contao-bindings": "^4.13.1", "contao-community-alliance/meta-palettes": "^2.0.10", - "contao-community-alliance/translator": "^2.3", + "contao-community-alliance/translator": "^2.4.2", "contao-community-alliance/url-builder": "^1.3.3", "contao/core-bundle": "^4.13.5 <5.0", "discordier/justtextwidgets": "^1.3", "doctrine/cache": "^2.1", "doctrine/dbal": "^3.6.0", "doctrine/orm": "^2.16.0", - "menatwork/contao-multicolumnwizard-bundle": "^3.5.7", + "menatwork/contao-multicolumnwizard-bundle": "^3.6.7", "psr/container": "^1.1.2", "psr/log": "^2.0.0", "symfony/asset": "^5.4", @@ -60,6 +60,7 @@ "symfony/routing": "^5.4", "symfony/security-core": "^5.4", "symfony/service-contracts": "^2.5.2", + "symfony/translation": "^5.4", "symfony/translation-contracts": "^2.5.2", "terminal42/service-annotation-bundle": "^1.0", "twig/twig": "^3.7.0" @@ -90,7 +91,8 @@ }, "extra": { "branch-alias": { - "dev-feature/2.3.0": "2.3.x-dev" + "dev-feature/2.3.0": "2.3.x-dev", + "dev-feature/translation_loader": "2.3.x-trans-dev" }, "contao": { "runonce": [ diff --git a/psalm.xml b/psalm.xml index 39a76c1f4..6878801dc 100644 --- a/psalm.xml +++ b/psalm.xml @@ -12,6 +12,9 @@ + + + diff --git a/src/Attribute/Base.php b/src/Attribute/Base.php index 6c6c28c43..681b40da5 100644 --- a/src/Attribute/Base.php +++ b/src/Attribute/Base.php @@ -40,6 +40,8 @@ * * @SuppressWarnings(PHPMD.TooManyPublicMethods) * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) */ abstract class Base implements IAttribute { @@ -192,7 +194,8 @@ protected function getLangValue($arrValues, $strLangCode = null): ?string ); } - if (\array_key_exists($strLangCode, $arrValues)) { + // If empty, use main-language. + if (\array_key_exists($strLangCode, $arrValues) && '' !== $arrValues[$strLangCode]) { return $arrValues[$strLangCode]; } diff --git a/src/Attribute/BaseSimple.php b/src/Attribute/BaseSimple.php index d2a4f3218..9d3666c92 100644 --- a/src/Attribute/BaseSimple.php +++ b/src/Attribute/BaseSimple.php @@ -32,6 +32,11 @@ use MetaModels\Helper\TableManipulator; use MetaModels\IMetaModel; +use function array_map; +use function is_array; +use function serialize; +use function str_replace; + /** * Reference implementation for Simple attributes. * Simple fields are fields that only consist of one column in the metamodel table and therefore do not need @@ -117,7 +122,7 @@ public function __construct( * @param string $strMetaName Name of the meta information that shall be updated. * @param mixed $varNewValue The new value for this meta information. * - * @return \MetaModels\Attribute\IAttribute The instance of this attribute, to support chaining. + * @return IAttribute The instance of this attribute, to support chaining. * * @throws Exception * @@ -163,7 +168,7 @@ public function setDataFor($arrValues) ->update($strTable, 't') ->where('t.id=:id') ->set('t.' . $strColName, ':' . $strColName) - ->setParameter($strColName, \is_array($varData) ? \serialize($varData) : $varData) + ->setParameter($strColName, is_array($varData) ? serialize($varData) : $varData) ->setParameter('id', $intId) ->executeQuery(); } @@ -202,7 +207,7 @@ public function getFilterOptions($idList, $usedOnly, &$arrCount = null) $arrResult = []; while ($objRow = $statement->fetchAssociative()) { - if (\is_array($arrCount)) { + if (is_array($arrCount)) { $arrCount[$objRow[$strCol]] = $objRow['mm_count']; } @@ -222,14 +227,17 @@ public function getFilterOptions($idList, $usedOnly, &$arrCount = null) public function sortIds($idList, $strDirection) { // Base implementation, do a simple sorting on given column. - return $this->connection->createQueryBuilder() + $statement = $this->connection + ->createQueryBuilder() ->select('t.id') ->from($this->getMetaModel()->getTableName(), 't') ->where('t.id IN (:ids)') ->setParameter('ids', $idList, ArrayParameterType::STRING) ->orderBy('t.' . $this->getColName(), $strDirection) - ->executeQuery() - ->fetchFirstColumn(); + ->executeQuery(); + + // Return value list as list, parent function wants a list so we make a cast. + return array_map(static fn (mixed $value) => (string) $value, $statement->fetchFirstColumn()); } /** @@ -247,17 +255,18 @@ public function sortIds($idList, $strDirection) public function searchFor($strPattern) { // Base implementation, do a simple search on given column. - $strPattern = \str_replace(['*', '?'], ['%', '_'], $strPattern); + $strPattern = str_replace(['*', '?'], ['%', '_'], $strPattern); - $result = $this->connection->createQueryBuilder() + $statement = $this->connection + ->createQueryBuilder() ->select('t.id') ->from($this->getMetaModel()->getTableName(), 't') ->where('t.' . $this->getColName() . ' LIKE :pattern') ->setParameter('pattern', $strPattern) - ->executeQuery() - ->fetchFirstColumn(); + ->executeQuery(); - return \array_map(static fn (mixed $value) => (string) $value, $result); + // Return value list as list, parent function wants a list so we make a cast. + return array_map(static fn (mixed $value) => (string) $value, $statement->fetchFirstColumn()); } /** diff --git a/src/Attribute/TranslatedReference.php b/src/Attribute/TranslatedReference.php index 3892e00db..900b999e1 100644 --- a/src/Attribute/TranslatedReference.php +++ b/src/Attribute/TranslatedReference.php @@ -207,10 +207,10 @@ public function getDataFor($arrIds) $arrReturn = $this->getTranslatedDataFor($arrIds, $strActiveLanguage); // Second round, fetch fallback languages if not all items could be resolved. - if ((\count($arrReturn) < \count($arrIds)) && ($strActiveLanguage !== $strFallbackLanguage)) { + if (($strActiveLanguage !== $strFallbackLanguage) && (\count($arrReturn) < \count($arrIds))) { $arrFallbackIds = []; foreach ($arrIds as $intId) { - if (empty($arrReturn[$intId])) { + if (!\array_key_exists($intId, $arrReturn)) { $arrFallbackIds[] = $intId; } } @@ -223,6 +223,7 @@ public function getDataFor($arrIds) } } } + return $arrReturn; } @@ -301,6 +302,7 @@ public function searchForInLanguages($strPattern, $arrLanguages = []) $statement = $queryBuilder->executeQuery(); + // Return value list as list, parent function wants a list so we make a cast. return \array_map(static fn (mixed $value) => (string) $value, $statement->fetchFirstColumn()); } @@ -309,9 +311,9 @@ public function searchForInLanguages($strPattern, $arrLanguages = []) */ public function sortIds($idList, $strDirection) { - $builder = $this->connection->createQueryBuilder(); - $expr = $builder->expr(); - $builder + $queryBuilder = $this->connection->createQueryBuilder(); + $expr = $queryBuilder->expr(); + $queryBuilder ->select('IF(t2.item_id IS NOT NULL, t2.item_id, t1.item_id)') ->from($this->getValueTable(), 't1') ->leftJoin( @@ -332,7 +334,10 @@ public function sortIds($idList, $strDirection) ->setParameter('att_id', $this->get('id')) ->setParameter('id_list', \array_unique($idList), ArrayParameterType::STRING); - return $builder->executeQuery()->fetchFirstColumn(); + $statement = $queryBuilder->executeQuery(); + + // Return value list as list, parent function wants a list so we make a cast. + return \array_map(static fn(mixed $value) => (string) $value, $statement->fetchFirstColumn()); } /** diff --git a/src/BackendIntegration/Module.php b/src/BackendIntegration/Module.php index 662466eed..8104802a3 100644 --- a/src/BackendIntegration/Module.php +++ b/src/BackendIntegration/Module.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,7 +16,7 @@ * @author Stefan Heimes * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -31,7 +31,9 @@ /** * Implementation of the MetaModel Backend Module that allowing access to MetaModel configuration etc. Everything below - * http://..../contao?do=metamodels&.... ends up here. + * https://..../contao/metamodels?.... ends up here. + * + * @deprecated Not in use anymore since 2.3. */ class Module { diff --git a/src/BackendIntegration/TemplateList.php b/src/BackendIntegration/TemplateList.php index a5de5d86b..4484f6e38 100644 --- a/src/BackendIntegration/TemplateList.php +++ b/src/BackendIntegration/TemplateList.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2020 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2020 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -23,6 +23,14 @@ use Doctrine\DBAL\Connection; use Symfony\Component\Finder\Finder; +use Symfony\Component\Finder\SplFileInfo; +use Symfony\Contracts\Translation\TranslatorInterface; + +use function array_replace_recursive; +use function array_unique; +use function implode; +use function is_dir; +use function ksort; /** * Handy helper class to retrieve a list of templates. @@ -34,14 +42,14 @@ class TemplateList * * @var Connection */ - private $database; + private Connection $database; /** * The resource directories. * * @var string[] */ - private $resourceDirs; + private array $resourceDirs; /** * The project root directory. @@ -50,18 +58,27 @@ class TemplateList */ private $rootDir; + /** + * The translator. + * + * @var TranslatorInterface + */ + private TranslatorInterface $translator; + /** * Create a new instance. * - * @param Connection $database The database connection. - * @param string[] $resourceDirs The resource directories. - * @param string $rootDir The root directory. + * @param Connection $database The database connection. + * @param string[] $resourceDirs The resource directories. + * @param string $rootDir The root directory. + * @param TranslatorInterface $translator The translator. */ - public function __construct(Connection $database, $resourceDirs, $rootDir) + public function __construct(Connection $database, $resourceDirs, $rootDir, TranslatorInterface $translator) { $this->database = $database; $this->resourceDirs = $resourceDirs; $this->rootDir = $rootDir; + $this->translator = $translator; } /** @@ -82,12 +99,15 @@ public function getTemplatesForBase($templateBaseName) $this->fetchTemplatesFromResourceDirectories($templateBaseName) ); - $templateList = array(); + $templateList = []; foreach ($allTemplates as $template => $themeList) { - $templateList[$template] = sprintf( - $GLOBALS['TL_LANG']['MSC']['template_in_theme'], - $template, - implode(', ', $themeList) + $templateList[$template] = $this->translator->trans( + 'template_in_theme', + [ + '%template%' => $template, + '%themes%' => implode(', ', $themeList) + ], + 'metamodels_default' ); } @@ -106,7 +126,7 @@ public function getTemplatesForBase($templateBaseName) */ private function getNoThemeMessage() { - return $GLOBALS['TL_LANG']['MSC']['no_theme']; + return $this->translator->trans('no_theme', [], 'metamodels_default'); } /** @@ -121,7 +141,8 @@ private function fetchRootTemplates($templateBaseName) return $this->getTemplatesForBaseFrom( $templateBaseName, $this->rootDir . '/templates', - $this->getNoThemeMessage() + $this->getNoThemeMessage(), + true ); } @@ -147,7 +168,7 @@ private function fetchTemplatesFromThemes($templateBaseName) foreach ($themes as $theme) { $templateDir = $theme['templates']; $themeName = $theme['name']; - if ($templateDir != '') { + if ($templateDir !== '') { $allTemplates = array_replace_recursive( $allTemplates, $this->getTemplatesForBaseFrom( @@ -188,15 +209,13 @@ private function fetchTemplatesFromResourceDirectories($templateBaseName) * Fetch a list of matching templates of the current base within the given folder and the passed theme name. * * @param string $base The base for the templates to be retrieved. - * * @param string $folder The folder to search in. - * * @param string $themeName The name of the theme for the given folder (will get used in the returned description * text). * * @return array */ - private function getTemplatesForBaseFrom($base, $folder, $themeName) + private function getTemplatesForBaseFrom($base, $folder, $themeName, bool $onlyOneLevel = false) { if (!is_dir($folder)) { return []; @@ -204,10 +223,13 @@ private function getTemplatesForBaseFrom($base, $folder, $themeName) $themeName = trim($themeName); $foundTemplates = Finder::create()->in($folder)->name($base . '*'); + if ($onlyOneLevel) { + $foundTemplates->depth('<1'); + } $templates = []; foreach ($foundTemplates as $template) { - /** @var \Symfony\Component\Finder\SplFileInfo $template */ + /** @var SplFileInfo $template */ $templates[$template->getBasename('.' . $template->getExtension())] = [$themeName => $themeName]; } diff --git a/src/CoreBundle/Contao/Hooks/AbstractContentElementAndModuleCallback.php b/src/CoreBundle/Contao/Hooks/AbstractContentElementAndModuleCallback.php index dfb2bb455..0ec480529 100644 --- a/src/CoreBundle/Contao/Hooks/AbstractContentElementAndModuleCallback.php +++ b/src/CoreBundle/Contao/Hooks/AbstractContentElementAndModuleCallback.php @@ -35,6 +35,7 @@ use MetaModels\IFactory; use RuntimeException; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Contracts\Translation\TranslatorInterface; use function asort; use function base64_decode; @@ -107,6 +108,8 @@ abstract class AbstractContentElementAndModuleCallback */ private RequestStack $requestStack; + private TranslatorInterface $translator; + /** * Create a new instance. * @@ -117,6 +120,7 @@ abstract class AbstractContentElementAndModuleCallback * @param Connection $connection The database connection. * @param TemplateList $templateList The template list loader. * @param RequestStack $requestStack The request stack. + * @param TranslatorInterface $translator The translator. */ public function __construct( IconBuilder $iconBuilder, @@ -125,7 +129,8 @@ public function __construct( FilterSettingFactory $filterFactory, Connection $connection, TemplateList $templateList, - RequestStack $requestStack + RequestStack $requestStack, + TranslatorInterface $translator, ) { $this->iconBuilder = $iconBuilder; $this->urlBuilderFactory = $urlBuilderFactory; @@ -134,6 +139,7 @@ public function __construct( $this->templateList = $templateList; $this->factory = $factory; $this->requestStack = $requestStack; + $this->translator = $translator; } /** @@ -152,14 +158,17 @@ public function editMetaModelButton(DC_Table $dataContainer) return ''; } - $url = $this->urlBuilderFactory->create('contao/main.php?do=metamodels&act=edit') + $url = $this->urlBuilderFactory->create('contao/metamodels?act=edit') ->setQueryParameter('id', ModelId::fromValues('tl_metamodel', $dataContainer->value)->getSerialized()); return $this->renderEditButton( - $GLOBALS['TL_LANG'][static::$tableName]['editmetamodel'][0], - sprintf( - StringUtil::specialchars($GLOBALS['TL_LANG'][static::$tableName]['editmetamodel'][1]), - $dataContainer->value + $this->translator->trans('editmetamodel.label', [], static::$tableName), + StringUtil::specialchars( + $this->translator->trans( + 'editmetamodel.description', + ['%id%' => $dataContainer->value], + static::$tableName + ) ), $url ); @@ -181,17 +190,20 @@ public function editFilterSettingButton(DC_Table $dataContainer) return ''; } - $url = $this->urlBuilderFactory->create('contao/main.php?do=metamodels&table=tl_metamodel_filtersetting') + $url = $this->urlBuilderFactory->create('contao/metamodels?table=tl_metamodel_filtersetting') ->setQueryParameter( 'pid', ModelId::fromValues('tl_metamodel_filter', $dataContainer->value)->getSerialized() ); return $this->renderEditButton( - $GLOBALS['TL_LANG'][static::$tableName]['editfiltersetting'][0], - sprintf( - StringUtil::specialchars($GLOBALS['TL_LANG'][static::$tableName]['editfiltersetting'][1]), - $dataContainer->value + $this->translator->trans('editfiltersetting.label', [], static::$tableName), + StringUtil::specialchars( + $this->translator->trans( + 'editfiltersetting.description', + ['%id%' => $dataContainer->value], + static::$tableName + ) ), $url ); @@ -213,17 +225,20 @@ public function editRenderSettingButton(DC_Table $dataContainer) return ''; } - $url = $this->urlBuilderFactory->create('contao/main.php?do=metamodels&table=tl_metamodel_rendersetting') + $url = $this->urlBuilderFactory->create('contao/metamodels?table=tl_metamodel_rendersetting') ->setQueryParameter( 'pid', ModelId::fromValues('tl_metamodel_rendersettings', $dataContainer->value)->getSerialized() ); return $this->renderEditButton( - $GLOBALS['TL_LANG'][static::$tableName]['editrendersetting'][0], - sprintf( - StringUtil::specialchars($GLOBALS['TL_LANG'][static::$tableName]['editrendersetting'][1]), - $dataContainer->value + $this->translator->trans('editrendersetting.label', [], static::$tableName), + StringUtil::specialchars( + $this->translator->trans( + 'editrendersetting.description', + ['%id%' => $dataContainer->value], + static::$tableName + ), ), $url ); @@ -242,9 +257,9 @@ public function editRenderSettingButton(DC_Table $dataContainer) public function getAttributeNames(DC_Table $objDc) { $attributeNames = [ - 'sorting' => $GLOBALS['TL_LANG']['MSC']['metamodels_sorting'], - 'random' => $GLOBALS['TL_LANG']['MSC']['random'], - 'id' => $GLOBALS['TL_LANG']['MSC']['id'][0] + 'sorting' => $this->translator->trans('metamodels_sorting', [], 'metamodels_list'), + 'random' => $this->translator->trans('random', [], 'metamodels_list'), + 'id' => $this->translator->trans('id', [], 'metamodels_list') ]; assert(null !== $objDc->activeRecord); diff --git a/src/CoreBundle/Contao/Hooks/FixupUserGroupModules.php b/src/CoreBundle/Contao/Hooks/FixupUserGroupModules.php deleted file mode 100644 index b093c5dd2..000000000 --- a/src/CoreBundle/Contao/Hooks/FixupUserGroupModules.php +++ /dev/null @@ -1,156 +0,0 @@ - - * @author Ben - * @author Ingolf Steinhardt - * @copyright 2012-2024 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -namespace MetaModels\CoreBundle\Contao\Hooks; - -use Contao\DataContainer; -use MetaModels\ViewCombination\InputScreenInformationBuilder; -use MetaModels\ViewCombination\ViewCombinationBuilder; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\RequestStack; - -/** - * This is called as a HOOK from tl_user_group. - */ -class FixupUserGroupModules -{ - /** - * The view combination builder. - * - * @var ViewCombinationBuilder - */ - private ViewCombinationBuilder $combinationBuilder; - - /** - * The input screen information builder. - * - * @var InputScreenInformationBuilder - */ - private InputScreenInformationBuilder $inputScreens; - - /** - * The request stack. - * - * @var RequestStack - */ - protected $requestStack; - - /** - * Create a new instance. - * - * @param ViewCombinationBuilder $combinationBuilder The view combination builder. - * @param InputScreenInformationBuilder $inputScreens The input screen information builder. - * @param RequestStack $requestStack The request stack. - */ - public function __construct( - ViewCombinationBuilder $combinationBuilder, - InputScreenInformationBuilder $inputScreens, - RequestStack $requestStack - ) { - $this->combinationBuilder = $combinationBuilder; - $this->inputScreens = $inputScreens; - $this->requestStack = $requestStack; - } - - /** - * Fix up the modules in the backend. - * - * @param DataContainer $dataContainer The current data container. - * - * @return array - * - * @throws \RuntimeException When the "parenting" class can not be found. - */ - public function fixupModules(DataContainer $dataContainer) - { - if (!\class_exists('tl_user_group', false)) { - throw new \RuntimeException('data container is not loaded!'); - } - - $original = new \tl_user_group(); - /** @var array> $modules */ - $modules = $original->getModules($dataContainer); - - // 1. remove all MetaModels - foreach (\array_keys($modules) as $group) { - foreach ($modules[$group] as $key => $module) { - if (\str_starts_with($module, 'metamodel_')) { - unset($modules[$group][$key]); - } - } - // Otherwise we end up with an associative array. - $modules[$group] = \array_values($modules[$group]); - } - if (!\is_array($modules['metamodels'] ?? null)) { - $modules['metamodels'] = []; - } - - // 2. Add our "custom" modules and remove the main module. - $modules['metamodels'][] = 'support_metamodels'; - if (false !== ($index = \array_search('metamodels', $modules['metamodels'], true))) { - unset($modules['metamodels'][$index]); - $modules['metamodels'] = \array_values($modules['metamodels']); - } - - // 3. Add back all MetaModels for the current group. - assert(null !== $dataContainer->activeRecord); - $combinations = $this->combinationBuilder->getCombinationsForUser([$dataContainer->activeRecord->id], 'be'); - - $screenIds = \array_map(static function (array $combination): mixed { - return $combination['dca_id']; - }, $combinations['byName'] ?? []); - - $screens = $this->inputScreens->fetchInputScreens($screenIds); - $currentRequest = $this->requestStack->getCurrentRequest(); - assert($currentRequest instanceof Request); - $locale = $currentRequest->getLocale(); - foreach ($screens as $metaModel => $screen) { - if ('standalone' === $screen['meta']['rendertype']) { - $modules[$screen['meta']['backendsection']][] = 'metamodel_' . $metaModel; - $this->buildLanguageString('metamodel_' . $metaModel, $screen, $locale); - } - } - - return $modules; - } - - /** - * Build the language string for the passed backend module. - * - * @param string $name The module name. - * @param array $screen The input screen information. - * @param string $locale The locale. - * - * @return void - * - * @SuppressWarnings(PHPMD.Superglobals) - * @SuppressWarnings(PHPMD.CamelCaseVariableName) - */ - private function buildLanguageString(string $name, array $screen, string $locale): void - { - if (isset($screen['label'][$locale])) { - $GLOBALS['TL_LANG']['MOD'][$name] = $screen['label'][$locale]; - return; - } - - $GLOBALS['TL_LANG']['MOD'][$name] = $screen['label']['']; - } -} diff --git a/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php b/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php index 77f9de229..d1f6e7377 100644 --- a/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php +++ b/src/CoreBundle/Contao/InsertTag/ResolveLanguageTag.php @@ -83,12 +83,12 @@ public function resolve(string $queryString): string $flags = \explode('|', $strTag); $tag = \array_shift($flags); - $elements = \explode('::', $tag); + $elements = \array_merge(\explode('::', $tag), ['']); $arrCache[$strTag] = ''; if ( - !empty($elements[1]) && + '' !== $elements[1] && $this->languageMatches($elements[1]) === (\strtolower($elements[0]) === 'ifnlng') ) { for (; $_rit<$_cnt; $_rit+=2) { diff --git a/src/CoreBundle/Controller/Backend/AbstractAddAllController.php b/src/CoreBundle/Controller/Backend/AbstractAddAllController.php index 6db831cb1..1d5981599 100644 --- a/src/CoreBundle/Controller/Backend/AbstractAddAllController.php +++ b/src/CoreBundle/Controller/Backend/AbstractAddAllController.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,7 @@ * @author Sven Baumann * @author Richard Henkenjohann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -201,13 +201,13 @@ protected function render($table, $metaModel, Request $request) 'action' => '', 'requestToken' => System::getContainer()->get('contao.csrf.token_manager')?->getDefaultTokenValue(), 'href' => $this->getReferer($request, $table, true), - 'backBt' => $this->translator->trans('MSC.backBT', [], 'contao_default'), - 'add' => $this->translator->trans('MSC.continue', [], 'contao_default'), - 'saveNclose' => $this->translator->trans('MSC.saveNclose', [], 'contao_default'), - 'activate' => $this->translator->trans($table . '.addAll_activate', [], 'contao_' . $table), + 'backBt' => $this->translator->trans('backBT', [], $table), + 'add' => $this->translator->trans('continue', [], $table), + 'saveNclose' => $this->translator->trans('saveNclose', [], $table), + 'activate' => $this->translator->trans('addAll_activate', [], $table), 'tlclass' => '', - 'headline' => $this->translator->trans($table . '.addall.1', [], 'contao_' . $table), - 'selectAll' => $this->translator->trans('MSC.selectAll', [], 'contao_default') . '.', + 'headline' => $this->translator->trans('addall.description', [], $table), + 'selectAll' => $this->translator->trans('selectAll', [], $table) . '.', 'cacheMessage' => '', 'updateMessage' => '', 'hasCheckbox' => \count($fields) > 0, @@ -320,9 +320,13 @@ private function generateForm(string $table, IMetaModel $metaModel, Request $req private function checkboxCaption(string $key, string $table, IAttribute $attribute): string { return $this->translator->trans( - $table . '.' . $key, - [$attribute->getName(), $attribute->get('type'), $attribute->getColName()], - 'contao_' . $table + $key, + [ + '%name%' => $attribute->getName(), + '%type%' => $attribute->get('type'), + '%colName%' => $attribute->getColName() + ], + $table ); } diff --git a/src/CoreBundle/Controller/Backend/ConfigurationController.php b/src/CoreBundle/Controller/Backend/ConfigurationController.php new file mode 100644 index 000000000..6795b63cb --- /dev/null +++ b/src/CoreBundle/Controller/Backend/ConfigurationController.php @@ -0,0 +1,96 @@ + + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. + * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later + * @filesource + */ + +namespace MetaModels\CoreBundle\Controller\Backend; + +use Contao\CoreBundle\Framework\ContaoFramework; +use ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactoryService; +use ContaoCommunityAlliance\Translator\TranslatorInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Twig\Environment as TwigEnvironment; +use Twig\Error\LoaderError; +use Twig\Error\RuntimeError; +use Twig\Error\SyntaxError; + +final class ConfigurationController +{ + use DcGeneralControllerTrait; + + /** + * @param Request $request The request. + * @param TwigEnvironment $twig The twig environment. + * @param DcGeneralFactoryService $factoryFactory The DCG factory + * @param EventDispatcherInterface $dispatcher The event dispatcher. + * @param TranslatorInterface $translator The translator. + * @param ContaoFramework $framework The Contao framework + * + * @return Response + * @throws LoaderError + * @throws RuntimeError + * @throws SyntaxError + */ + public function __invoke( + Request $request, + TwigEnvironment $twig, + DcGeneralFactoryService $factoryFactory, + EventDispatcherInterface $dispatcher, + TranslatorInterface $translator, + ContaoFramework $framework, + ): Response { + $containerName = (string) $request->query->get('table', 'tl_metamodel'); + $controllerResult = $this->bootDcGeneralAndProcess( + $request, + $containerName, + $factoryFactory, + $dispatcher, + $translator, + $framework + ); + $headline = $this->determineHeadline($containerName, $translator); + + return new Response( + $twig->render( + '@MetaModelsCore/Backend/be_config.html.twig', + [ + 'headline' => $headline, + 'body' => $controllerResult, + 'stylesheets' => ['bundles/metamodelscore/css/style.css'] + ] + ) + ); + } + + /** + * Generate headline. + * + * @param string $containerName The container. + * @param TranslatorInterface $translator The translator. + * + * @return string + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + private function determineHeadline(string $containerName, TranslatorInterface $translator): string + { + return $translator->translate('backend-module.headline', $containerName); + } +} diff --git a/src/CoreBundle/Controller/Backend/DcGeneralControllerTrait.php b/src/CoreBundle/Controller/Backend/DcGeneralControllerTrait.php new file mode 100644 index 000000000..5651e4b2c --- /dev/null +++ b/src/CoreBundle/Controller/Backend/DcGeneralControllerTrait.php @@ -0,0 +1,94 @@ + + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. + * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later + * @filesource + */ + +namespace MetaModels\CoreBundle\Controller\Backend; + +use Contao\Ajax; +use Contao\Controller; +use Contao\CoreBundle\Framework\ContaoFramework; +use ContaoCommunityAlliance\DcGeneral\Action; +use ContaoCommunityAlliance\DcGeneral\Clipboard\ClipboardInterface; +use ContaoCommunityAlliance\DcGeneral\Controller\ControllerInterface; +use ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactoryService; +use ContaoCommunityAlliance\Translator\TranslatorInterface; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Request; + +trait DcGeneralControllerTrait +{ + /** + * @param Request $request The request. + * @param string $tableName The table name + * @param DcGeneralFactoryService $factoryFactory The DCG factory + * @param EventDispatcherInterface $dispatcher The event dispatcher. + * @param TranslatorInterface $translator The translator. + * @param ContaoFramework $framework The Contao framework + * + * @return string + * @throws \Exception + */ + public function bootDcGeneralAndProcess( + Request $request, + string $tableName, + DcGeneralFactoryService $factoryFactory, + EventDispatcherInterface $dispatcher, + TranslatorInterface $translator, + ContaoFramework $framework, + ): string { + $act = (string) $request->query->get('act', 'showAll'); + + // Work around legacy Contao code. + /** @psalm-suppress InternalMethod - Class ContaoFramework is internal, not the getAdapter() method. */ + $contaoController = $framework->getAdapter(Controller::class); + // Need to load the language file due to Widget class using hardcoded lang array offsets. + $contaoController->loadLanguageFile('default'); + + // Handle Ajax calls. + $action = null; + if ($request->isXmlHttpRequest() && '' !== ($action = (string) $request->request->get('action', ''))) { + $ajaxClass = new Ajax($action); + $ajaxClass->executePreActions(); + } + + // Build data container. + $factory = $factoryFactory->createFactory(); + $general = $factory + ->setContainerName($tableName) + ->setTranslator($translator) + ->setEventDispatcher($dispatcher) + ->createDcGeneral(); + + $environment = $general->getEnvironment(); + $clipboard = $environment->getClipboard(); + assert($clipboard instanceof ClipboardInterface); + + // Load the clipboard. + $clipboard->loadFrom($environment); + + $controller = $environment->getController(); + assert($controller instanceof ControllerInterface); + + if (null !== $action) { + $environment->getView()?->handleAjaxCall(); + } + + return $controller->handle(new Action($act)); + } +} diff --git a/src/CoreBundle/Controller/Backend/InputScreenAddAllController.php b/src/CoreBundle/Controller/Backend/InputScreenAddAllController.php index 0741fc633..4106bd209 100644 --- a/src/CoreBundle/Controller/Backend/InputScreenAddAllController.php +++ b/src/CoreBundle/Controller/Backend/InputScreenAddAllController.php @@ -102,7 +102,7 @@ protected function render($table, $metaModel, Request $request) { return \array_merge( parent::render($table, $metaModel, $request), - ['tlclass' => $this->translator->trans($table . '.addAll_tlclass', [], 'contao_' . $table)] + ['tlclass' => $this->translator->trans('addAll_tlclass', [], $table)] ); } diff --git a/src/CoreBundle/Controller/Backend/MetaModelController.php b/src/CoreBundle/Controller/Backend/MetaModelController.php new file mode 100644 index 000000000..7dfe28bc6 --- /dev/null +++ b/src/CoreBundle/Controller/Backend/MetaModelController.php @@ -0,0 +1,114 @@ + + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. + * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later + * @filesource + */ + +namespace MetaModels\CoreBundle\Controller\Backend; + +use Contao\CoreBundle\Exception\AccessDeniedException; +use Contao\CoreBundle\Framework\ContaoFramework; +use Contao\CoreBundle\Menu\BackendMenuBuilder; +use ContaoCommunityAlliance\DcGeneral\Factory\DcGeneralFactoryService; +use ContaoCommunityAlliance\Translator\TranslatorInterface; +use MetaModels\ViewCombination\ViewCombination; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +use Twig\Environment as TwigEnvironment; + +final class MetaModelController +{ + use DcGeneralControllerTrait; + + /** + * The constructor. + * + * @param BackendMenuBuilder $builder The menu builder. + */ + public function __construct( + private readonly BackendMenuBuilder $builder + ) { + } + + /** + * @param Request $request The request. + * @param TwigEnvironment $twig The twig environment. + * @param DcGeneralFactoryService $factoryFactory The DCG factory + * @param EventDispatcherInterface $dispatcher The event dispatcher. + * @param TranslatorInterface $translator The translator. + * @param ContaoFramework $framework The Contao framework + * + * @return Response + */ + public function __invoke( + Request $request, + TwigEnvironment $twig, + DcGeneralFactoryService $factoryFactory, + EventDispatcherInterface $dispatcher, + TranslatorInterface $translator, + ContaoFramework $framework, + ViewCombination $viewCombination, + ): Response { + $containerName = (string) $request->query->get('table', ''); + if ('' === $containerName) { + $containerName = (string) ($request->attributes->get('_route_params', [])['tableName'] ?? ''); + } + $combination = $viewCombination->getCombination($containerName); + if (null === $combination) { + throw new AccessDeniedException('Permission denied to access back end module "' . $containerName . '".'); + } + $inputScreenId = $combination['dca_id'] ?? ''; + $controllerResult = $this->bootDcGeneralAndProcess( + $request, + $containerName, + $factoryFactory, + $dispatcher, + $translator, + $framework + ); + $headline = $this->determineHeadline($containerName, $inputScreenId, $translator); + + return new Response( + $twig->render( + '@MetaModelsCore/Backend/be_config.html.twig', + [ + 'headline' => $headline, + 'body' => $controllerResult, + 'stylesheets' => ['bundles/metamodelscore/css/style.css'] + ] + ) + ); + } + + /** + * Generate headline. + * + * @param string $containerName The container. + * @param string $inputScreenId The input screen id. + * @param TranslatorInterface $translator The translator. + * + * @return string + */ + private function determineHeadline( + string $containerName, + string $inputScreenId, + TranslatorInterface $translator + ): string { + return $translator->translate('backend-module.' . $inputScreenId . '.headline', $containerName); + } +} diff --git a/src/CoreBundle/Controller/Backend/SupportMetaModelsController.php b/src/CoreBundle/Controller/Backend/SupportMetaModelsController.php index 9335e1c90..7eef890e2 100644 --- a/src/CoreBundle/Controller/Backend/SupportMetaModelsController.php +++ b/src/CoreBundle/Controller/Backend/SupportMetaModelsController.php @@ -89,20 +89,20 @@ public function __invoke() 'stylesheets' => [ 'bundles/metamodelscore/css/supportscreen.css' ], - 'headline' => $this->translator->trans('MOD.support_metamodels.0', [], 'contao_modules'), + 'headline' => $this->translator->trans('menu.label', [], 'metamodels_support'), 'sub_headline' => - $this->translator->trans('MSC.metamodels_support.main_headline', [], 'contao_default'), + $this->translator->trans('main_headline', [], 'metamodels_support'), 'head_contributor' => - $this->translator->trans('MSC.metamodels_support.contributor_headline', [], 'contao_default'), - 'purpose' => $this->translator->trans('MSC.metamodels_support.purpose', [], 'contao_default'), + $this->translator->trans('contributor_headline', [], 'metamodels_support'), + 'purpose' => $this->translator->trans('purpose', [], 'metamodels_support'), 'other_donations' => - $this->translator->trans('MSC.metamodels_support.other_donations', [], 'contao_default'), + $this->translator->trans('other_donations', [], 'metamodels_support'), 'main_text' => - $this->translator->trans('MSC.metamodels_support.main_text', [], 'contao_default'), + $this->translator->trans('main_text', [], 'metamodels_support'), 'help_headline' => - $this->translator->trans('MSC.metamodels_support.help_headline', [], 'contao_default'), + $this->translator->trans('help_headline', [], 'metamodels_support'), 'help_text' => - $this->translator->trans('MSC.metamodels_support.help_text', [], 'contao_default'), + $this->translator->trans('help_text', [], 'metamodels_support'), 'github_contributors' => $this->getJsonFile($this->github), 'transifex_contributors' => $this->getJsonFile($this->transifex) ] diff --git a/src/CoreBundle/Controller/ContentElement/ItemListController.php b/src/CoreBundle/Controller/ContentElement/ItemListController.php index 080460bf9..f73870b28 100644 --- a/src/CoreBundle/Controller/ContentElement/ItemListController.php +++ b/src/CoreBundle/Controller/ContentElement/ItemListController.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2022 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,7 @@ * @author Ingolf Steinhardt * @author Christian Schiffler * @author Sven Baumann - * @copyright 2012-2022 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -99,7 +99,7 @@ protected function getResponse(Template $template, ContentModel $model, Request */ private function getBackendWildcard(ContentModel $model): Response { - $name = $this->translator->trans('CTE.' . $this->getType() . '.0', [], 'contao_modules'); + $name = $this->translator->trans($this->getType(), [], 'metamodels_wildcard'); $href = $this->router->generate( 'contao_backend', ['do' => 'article', 'table' => 'tl_content', 'act' => 'edit', 'id' => $model->id] diff --git a/src/CoreBundle/Controller/FrontendModule/ItemListController.php b/src/CoreBundle/Controller/FrontendModule/ItemListController.php index c26cee486..c5f4f0839 100644 --- a/src/CoreBundle/Controller/FrontendModule/ItemListController.php +++ b/src/CoreBundle/Controller/FrontendModule/ItemListController.php @@ -81,7 +81,7 @@ public function __invoke( */ protected function getBackendWildcard(ModuleModel $module): Response { - $name = $this->translator->trans('FMD.' . $this->getType() . '.0', [], 'contao_modules'); + $name = $this->translator->trans($this->getType(), [], 'metamodels_wildcard'); $href = $this->router->generate( 'contao_backend', ['do' => 'themes', 'table' => 'tl_module', 'act' => 'edit', 'id' => $module->id] diff --git a/src/CoreBundle/Controller/ListControllerTrait.php b/src/CoreBundle/Controller/ListControllerTrait.php index 9832684a9..6c0359785 100644 --- a/src/CoreBundle/Controller/ListControllerTrait.php +++ b/src/CoreBundle/Controller/ListControllerTrait.php @@ -432,13 +432,14 @@ private function getWildcardInfoText(Model $model, string $href, string $name): // Add CSS file. $GLOBALS['TL_CSS'][] = 'bundles/metamodelscore/css/style.css'; - // Retrieve name of MetaModels. + // Retrieve name of MetaModel. $infoTemplate = '
%s: %s
'; $metaModel = $this->factory->getMetaModel($metaModelName); assert($metaModel instanceof IMetaModel); - $header = $name . ': ' . $metaModel->getName(); + + $header = $metaModel->getName(); if ($href) { $header .= \sprintf( ' (ID: %3$s)', @@ -447,11 +448,11 @@ private function getWildcardInfoText(Model $model, string $href, string $name): (string) $model->id ); } - $infoText = \sprintf( + $infoText = '### ' . $name . ' ###' . \sprintf( $infoTemplate, - $this->translator->trans('MSC.mm_be_info_name.1', [], 'contao_default'), - $this->translator->trans('MSC.mm_be_info_name.0', [], 'contao_default'), - $header + $this->translator->trans('mm_be_info_name.description', [], 'metamodels_wildcard'), + $this->translator->trans('mm_be_info_name.label', [], 'metamodels_wildcard'), + $header, ); // Retrieve name of filter. @@ -469,14 +470,14 @@ private function getWildcardInfoText(Model $model, string $href, string $name): if (null !== $infoFi) { $infoText .= \sprintf( $infoTemplate, - $this->translator->trans('MSC.mm_be_info_filter.1', [], 'contao_default'), - $this->translator->trans('MSC.mm_be_info_filter.0', [], 'contao_default'), + $this->translator->trans('mm_be_info_filter.description', [], 'metamodels_wildcard'), + $this->translator->trans('mm_be_info_filter.label', [], 'metamodels_wildcard'), $infoFi . $infoFiPa ); } } - // Retrieve name of rendersetting. + // Retrieve name of render setting. /** @psalm-suppress UndefinedMagicPropertyFetch */ if ($model->metamodel_rendersettings) { $infoRs = $this->renderSettingFactory @@ -485,8 +486,8 @@ private function getWildcardInfoText(Model $model, string $href, string $name): if (null !== $infoRs) { $infoText .= \sprintf( $infoTemplate, - $this->translator->trans('MSC.mm_be_info_render_setting.1', [], 'contao_default'), - $this->translator->trans('MSC.mm_be_info_render_setting.0', [], 'contao_default'), + $this->translator->trans('mm_be_info_render_setting.description', [], 'metamodels_wildcard'), + $this->translator->trans('mm_be_info_render_setting.label', [], 'metamodels_wildcard'), $infoRs ); } diff --git a/src/CoreBundle/DependencyInjection/CompilerPass/PrepareTranslatorPass.php b/src/CoreBundle/DependencyInjection/CompilerPass/PrepareTranslatorPass.php new file mode 100644 index 000000000..be83bc0ba --- /dev/null +++ b/src/CoreBundle/DependencyInjection/CompilerPass/PrepareTranslatorPass.php @@ -0,0 +1,47 @@ + + * @copyright 2012-2024 The MetaModels team. + * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later + * @filesource + */ + +declare(strict_types=1); + +namespace MetaModels\CoreBundle\DependencyInjection\CompilerPass; + +use MetaModels\CoreBundle\Translator\MetaModelTranslatorConfigurator; +use Symfony\Bundle\FrameworkBundle\Translation\Translator; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; + +final class PrepareTranslatorPass implements CompilerPassInterface +{ + public function process(ContainerBuilder $container): void + { + $definition = $container->getDefinition('translator.default'); + if (Translator::class !== $definition->getClass()) { + return; + } + $previousConfigurator = $definition->getConfigurator(); + $definition->setConfigurator(new Reference(MetaModelTranslatorConfigurator::class)); + if (null !== $previousConfigurator) { + $container->getDefinition(MetaModelTranslatorConfigurator::class)->setArgument( + '$previous', + $previousConfigurator + ); + } + } +} diff --git a/src/CoreBundle/DependencyInjection/MetaModelsCoreExtension.php b/src/CoreBundle/DependencyInjection/MetaModelsCoreExtension.php index 74ae196d4..1aa37c4f7 100644 --- a/src/CoreBundle/DependencyInjection/MetaModelsCoreExtension.php +++ b/src/CoreBundle/DependencyInjection/MetaModelsCoreExtension.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * 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 * @author Ingolf Steinhardt * @author Richard Henkenjohann - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -133,7 +133,7 @@ public function getConfiguration(array $config, ContainerBuilder $container) */ private function buildCacheService(ContainerBuilder $container, array $config): void { - // if cache disabled, swap it out with the dummy cache. + // If cache disabled, swap it out with the dummy cache. if (!$config['enable_cache']) { $cache = $container->getDefinition('metamodels.cache_internal'); $cache->setClass(ArrayAdapter::class); diff --git a/src/CoreBundle/EventListener/BackendNavigationListener.php b/src/CoreBundle/EventListener/BackendNavigationListener.php index 590445e9c..93c240aeb 100644 --- a/src/CoreBundle/EventListener/BackendNavigationListener.php +++ b/src/CoreBundle/EventListener/BackendNavigationListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,25 +14,34 @@ * @author Christian Schiffler * @author Richard Henkenjohann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ namespace MetaModels\CoreBundle\EventListener; -use Contao\BackendUser; use Contao\CoreBundle\Event\MenuEvent; -use Contao\StringUtil; +use Knp\Menu\FactoryInterface; +use Knp\Menu\ItemInterface; use MetaModels\ViewCombination\ViewCombination; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; +use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\Routing\RouterInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; -use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Contracts\Translation\TranslatorInterface; +use function array_key_exists; +use function array_map; +use function in_array; +use function is_array; + /** * This registers the backend navigation of MetaModels. + * + * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class BackendNavigationListener { @@ -71,6 +80,13 @@ class BackendNavigationListener */ private RouterInterface $router; + /** + * The session. + * + * @var Session + */ + private Session $session; + /** * Create a new instance. * @@ -79,19 +95,22 @@ class BackendNavigationListener * @param ViewCombination $viewCombination The view combination. * @param TokenStorageInterface $tokenStorage The token storage. * @param RouterInterface $router The router. + * @param Session $session The session. */ public function __construct( TranslatorInterface $translator, RequestStack $requestStack, ViewCombination $viewCombination, TokenStorageInterface $tokenStorage, - RouterInterface $router + RouterInterface $router, + Session $session, ) { $this->requestStack = $requestStack; $this->translator = $translator; $this->viewCombination = $viewCombination; $this->tokenStorage = $tokenStorage; $this->router = $router; + $this->session = $session; } /** @@ -123,31 +142,28 @@ public function __invoke(MenuEvent $event): void $this->addBackendCss(); - $userRights = $this->extractUserRights($user); - $isAdmin = \in_array('ROLE_ADMIN', $user->getRoleNames(), true); + $isAdmin = in_array('ROLE_ADMIN', $user->getRoleNames(), true); - $metaModelsNode = $tree->getChild('metamodels'); - if (null !== $metaModelsNode && ($isAdmin || isset($userRights['support_metamodels']))) { - $node = $factory - ->createItem('support_screen') - ->setUri($this->router->generate('metamodels.support_screen')) - ->setLabel($this->translator->trans('MOD.support_metamodels.0', [], 'contao_modules')) - ->setLinkAttribute('title', $this->translator->trans('MOD.support_metamodels.1', [], 'contao_modules')) - ->setLinkAttribute('class', 'support_screen') - ->setCurrent('metamodels.support_screen' === $request->attributes->get('_route')); + $metaModelsNode = $this->getRootNode($tree, $factory); - $metaModelsNode->addChild($node); + $names = array_map(static fn(ItemInterface $item): string => $item->getName(), $metaModelsNode->getChildren()); + + // Show MetaModels config only for Admins. + if ($isAdmin) { + $metaModelsNode->addChild($configNode = $this->buildConfigNode($factory, $request)); + array_unshift($names, $configNode->getName()); } - $locale = $request->getLocale(); - foreach ($this->viewCombination->getStandalone() as $metaModelName => $screen) { - $moduleName = 'metamodel_' . $metaModelName; - if (!$isAdmin && !isset($userRights[$moduleName])) { - continue; - } + $metaModelsNode->reorderChildren($names); + + $currentMetaModel = ''; + if ($request->attributes->get('_route') === 'metamodels.metamodel') { + $currentMetaModel = (string) (($request->attributes->get('_route_params', []))['tableName'] ?? ''); + } - $sectionNode = $tree->getChild($screen['meta']['backendsection']); - if (null === $sectionNode) { + foreach ($this->viewCombination->getStandalone() as $metaModelName => $screen) { + if (null === $sectionNode = $this->getSectionNode($factory, $tree, $screen['meta']['backendsection'])) { + // Rien ne vas plus. continue; } @@ -155,70 +171,232 @@ public function __invoke(MenuEvent $event): void $node = $factory ->createItem($item) - ->setUri($this->router->generate('contao_backend', ['do' => $item])) - ->setLabel($this->extractLanguageValue($screen['label'], $locale)) - ->setLinkAttribute('title', $this->extractLanguageValue($screen['description'], $locale)) + ->setUri($this->router->generate('metamodels.metamodel', ['tableName' => $metaModelName])) + ->setLabel('inputscreen.' . $screen['meta']['id'] . '.menu.label') + ->setExtra('translation_domain', $metaModelName) + ->setLinkAttribute( + 'title', + $this->translator->trans( + 'inputscreen.' . $screen['meta']['id'] . '.menu.description', + [], + $metaModelName + ) + ) ->setLinkAttribute('class', $item) - ->setCurrent( - ($request->attributes->get('_route') === 'contao_backend') && ($request->query->get('do') === $item) - ); + ->setCurrent($currentMetaModel === $metaModelName); $sectionNode->addChild($node); } + + if ($isAdmin) { + $node = $factory + ->createItem('support_screen') + ->setUri($this->router->generate('metamodels.support_screen')) + ->setLabel('menu.label') + ->setExtra('translation_domain', 'metamodels_support') + ->setLinkAttribute('title', $this->translator->trans('menu.description', [], 'metamodels_support')) + ->setLinkAttribute('class', 'support_screen') + ->setCurrent('metamodels.support_screen' === $request->attributes->get('_route')); + + $metaModelsNode->addChild($node); + } } /** - * Extract the permissions from the Contao backend user. + * Add the CSS files for the backend. * - * @param TokenInterface $token The token. + * @return void * - * @return array + * @SuppressWarnings(PHPMD.Superglobals) + * @SuppressWarnings(PHPMD.CamelCaseVariableName) */ - private function extractUserRights(TokenInterface $token): array + private function addBackendCss(): void { - $beUser = $token->getUser(); - if (!($beUser instanceof BackendUser)) { - return []; - } + // BE group icon. + $GLOBALS['TL_CSS']['metamodels'] = 'bundles/metamodelscore/css/be_logo_svg.css'; + } - $allowedModules = $beUser->modules; - switch (true) { - case \is_string($allowedModules): - $allowedModules = StringUtil::deserialize($allowedModules, true); - break; - case null === $allowedModules: - $allowedModules = []; - break; - default: + /** + * Get root node. + * + * @param ItemInterface $tree The tree. + * @param FactoryInterface $factory The factory. + * + * @return ItemInterface + */ + private function getRootNode(ItemInterface $tree, FactoryInterface $factory): ItemInterface + { + $names = + $this->getChildNamesFromTree($tree); + $insertPos = (int) array_search('accounts', $names, true) + 1; + $metaModelsNode = $tree->getChild('metamodels'); + if (null === $metaModelsNode) { + $metaModelsNode = $factory->createItem('metamodels'); + $tree->addChild($metaModelsNode); } - return \array_flip($allowedModules); + $metaModelsNode + ->setLabel('menuGroup.metamodels.label') + ->setExtra('translation_domain', 'metamodels_navigation'); + + $this->updateCollapsedState($metaModelsNode); + + // Resort if already existing. + $names = array_values(array_filter($names, static fn(string $name): bool => 'metamodels' !== $name)); + + array_splice($names, $insertPos, 0, 'metamodels'); + $tree->reorderChildren($names); + + return $metaModelsNode; } /** - * Extract the language value. + * Generate build config. * - * @param string[] $values The values. - * @param string $locale The current locale. + * @param FactoryInterface $factory The factory. + * @param Request $request The request. * - * @return string + * @return ItemInterface */ - private function extractLanguageValue(array $values, string $locale): string + private function buildConfigNode(FactoryInterface $factory, Request $request): ItemInterface { - return \html_entity_decode(($values[$locale] ?? $values[''])); + $configNode = $factory->createItem('metamodels'); + + $configNode + ->setUri($this->router->generate('metamodels.configuration')) + ->setLabel('menu.metamodels.label') + ->setExtra('translation_domain', 'metamodels_navigation') + ->setLinkAttribute('title', $this->translator->trans('menu.metamodels.title', [], 'metamodels_navigation')) + ->setLinkAttribute('class', 'metamodel_config') + ->setCurrent('metamodels.configuration' === $request->attributes->get('_route')); + + return $configNode; } /** - * Add the CSS files for the backend. + * Update collapsed state of navigation groups. + * + * @param ItemInterface $metaModelsNode * * @return void + */ + private function updateCollapsedState(ItemInterface $metaModelsNode): void + { + $nodeName = $metaModelsNode->getName(); + $sessionBag = $this->session->getBag('contao_backend'); + $status = ($sessionBag instanceof AttributeBagInterface) ? $sessionBag->get('backend_modules') : []; + $isCollapsed = ($status[$nodeName] ?? 1) < 1; + $path = $this->router->generate('contao_backend'); + + $metaModelsNode + ->setLinkAttribute('class', 'group-' . $nodeName) + ->setLinkAttribute( + 'onclick', + "return AjaxRequest.toggleNavigation(this, '" . $nodeName . "', '" . $path . "')" + ) + ->setLinkAttribute('aria-controls', $nodeName) + ->setChildrenAttribute('id', $nodeName) + ->setLinkAttribute( + 'title', + $this->translator->trans('MSC.' . ($isCollapsed ? 'expand' : 'collapse') . 'Node', [], 'contao_default') + ) + ->setLinkAttribute('aria-expanded', $isCollapsed ? 'false' : 'true'); + + if ($isCollapsed) { + $metaModelsNode->setAttribute('class', 'collapsed'); + } + + $request = $this->requestStack->getCurrentRequest(); + if (null === $request) { + return; + } + + $uri = $this->router->generate( + 'contao_backend', + [ + 'do' => $request->query->get('do'), + 'mtg' => $nodeName, + 'ref' => $request->attributes->get('_contao_referer_id') + ] + ); + + $metaModelsNode->setUri($uri); + } + + /** + * Get section node. + * + * @param FactoryInterface $factory The factory. + * @param ItemInterface $tree The item interface. + * @param string $backendSection The backend section. + * + * @return ItemInterface|null * * @SuppressWarnings(PHPMD.Superglobals) - * @SuppressWarnings(PHPMD.CamelCaseVariableName) */ - private function addBackendCss(): void + private function getSectionNode( + FactoryInterface $factory, + ItemInterface $tree, + string $backendSection + ): ?ItemInterface { + if (null !== $sectionNode = $tree->getChild($backendSection)) { + return $sectionNode; + } + + // Somehow it disappeared - try to generate it via BE_MOD. + if (!array_key_exists($backendSection, $GLOBALS['BE_MOD'])) { + return null; + } + $navigation = array_keys($GLOBALS['BE_MOD']); + // Keep child names before adding the new child. + $namesInMenu = $this->getChildNamesFromTree($tree); + $sectionNode = $factory->createItem($backendSection); + $tree->addChild($sectionNode); + $sectionNode + ->setLabel($this->getLabelForSection($backendSection)) + ->setExtra('translation_domain', false); + + $this->updateCollapsedState($sectionNode); + + // Search the position in the already existing menu by starting at offset in BE_MOD and walking up to the start. + $start = (int) array_search($backendSection, $navigation, true); + while (0 <= --$start) { + /** @psalm-suppress InvalidArrayOffset */ + if (in_array($navigation[$start], $namesInMenu, true)) { + array_splice($namesInMenu, $start + 1, 0, [$backendSection]); + break; + } + } + // If we did not find a position in existing menu, append at the end. + if (!in_array($backendSection, $namesInMenu)) { + $namesInMenu[] = $backendSection; + } + $tree->reorderChildren($namesInMenu); + + return $sectionNode; + } + + /** + * @param ItemInterface $tree + * + * @return list + */ + private function getChildNamesFromTree(ItemInterface $tree): array { - // BE group icon. - $GLOBALS['TL_CSS']['metamodels'] = 'bundles/metamodelscore/css/be_logo_svg.css'; + return array_values( + array_map(static fn(ItemInterface $item): string => $item->getName(), $tree->getChildren()) + ); + } + + /** @SuppressWarnings(PHPMD.Superglobals) */ + public function getLabelForSection(string $backendSection): string + { + /** @var null|list|string $langValue */ + $langValue = $GLOBALS['TL_LANG']['MOD'][$backendSection] ?? null; + if (is_array($langValue)) { + return $langValue[0] ?? $backendSection; + } + + return $langValue ?? $backendSection; } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbMetaModelListener.php b/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbMetaModelListener.php index 5cf1c42e7..a996ab0d7 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbMetaModelListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbMetaModelListener.php @@ -51,7 +51,7 @@ protected function wantToHandle(GetBreadcrumbEvent $event) protected function getBreadcrumbElements(EnvironmentInterface $environment, BreadcrumbStore $elements) { $elements->push( - 'contao/main.php?do=metamodels', + 'contao/metamodels', 'tl_metamodel', 'bundles/metamodelscore/images/backend/logo.png' ); diff --git a/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbStore.php b/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbStore.php index 1bc98a253..2e73cab3e 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbStore.php +++ b/src/CoreBundle/EventListener/DcGeneral/Breadcrumb/BreadcrumbStore.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2022 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -25,6 +25,11 @@ use MetaModels\CoreBundle\Assets\IconBuilder; use Symfony\Contracts\Translation\TranslatorInterface; +use function array_key_exists; +use function str_replace; +use function str_starts_with; +use function ucfirst; + /** * The breadcrumb store. */ @@ -35,35 +40,35 @@ class BreadcrumbStore * * @var array */ - private $elements = []; + private array $elements = []; /** * The icon builder. * * @var IconBuilder */ - private $iconBuilder; + private IconBuilder $iconBuilder; /** * The translator. * * @var TranslatorInterface */ - private $translator; + private TranslatorInterface $translator; /** * List of "current" ids. * * @var string[] */ - private $idList = []; + private array $idList = []; /** * The current URI. * * @var string */ - private $uri; + private string $uri; /** * Create a new instance. @@ -145,19 +150,19 @@ public function getUri(): string } /** - * Get for a table the human readable name or a fallback. + * Get for a table the human-readable name or a fallback. * * @param string $table Name of table. * - * @return string The human readable name. + * @return string The human-readable name. */ public function getLabel($table): string { - if (strpos($table, 'tl_') !== 0) { + if (!str_starts_with($table, 'tl_')) { return $table; } $shortTable = str_replace('tl_', '', $table); - $label = $this->translator->trans('BRD.' . $shortTable, [], 'contao_default'); + $label = $this->translator->trans($shortTable, [], 'metamodels_navigation'); if ($label === $shortTable) { $shortTable = str_replace('tl_metamodel_', '', $table); return ucfirst($shortTable) . ' %s'; diff --git a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/CommandBuilder.php b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/CommandBuilder.php index e17c44f60..8dbf8db1d 100644 --- a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/CommandBuilder.php +++ b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/CommandBuilder.php @@ -33,7 +33,6 @@ use MetaModels\CoreBundle\Assets\IconBuilder; use MetaModels\DcGeneral\DataDefinition\IMetaModelDataDefinition; use MetaModels\DcGeneral\Events\MetaModel\BuildMetaModelOperationsEvent; -use MetaModels\Helper\LocaleUtil; use MetaModels\IFactory; use MetaModels\IMetaModel; use MetaModels\ViewCombination\ViewCombination; @@ -138,14 +137,14 @@ protected function build(IMetaModelDataDefinition $container) ); } - $this->container = $container; + $this->container = $container; $inputScreen = $this->viewCombination->getScreen($container->getName()); if (null === $inputScreen) { return; } $this->addEditMultipleCommand($view); $this->parseModelOperations($view); - $this->container = null; + $this->container = null; if ($this->dispatcher->hasListeners(BuildMetaModelOperationsEvent::NAME)) { // @codingStandardsIgnoreStart @@ -180,9 +179,9 @@ private function addEditMultipleCommand(Contao2BackendViewDefinitionInterface $v $commands = $view->getGlobalCommands(); $command = new SelectCommand(); $command - ->setName('all') - ->setLabel('MSC.all.0') - ->setDescription('MSC.all.1'); + ->setName('editAll') + ->setLabel('editAll.label') + ->setDescription('editAll.description'); $parameters = $command->getParameters(); $parameters['act'] = 'select'; @@ -214,10 +213,8 @@ private function parseModelOperations(Contao2BackendViewDefinitionInterface $vie ['act' => 'delete'], 'delete.svg', [ - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $this->translator->trans('MSC.deleteConfirm', [], 'contao_default') - ) + 'attributes' => + 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ] ); $this->createCommand($collection, 'show', ['act' => 'show'], 'show.svg'); @@ -235,18 +232,14 @@ private function parseModelOperations(Contao2BackendViewDefinitionInterface $vie // Check if we have some children. foreach ($this->viewCombination->getChildrenOf($this->container->getName()) as $tableName => $screen) { - $metaModel = $this->factory->getMetaModel($tableName); - assert($metaModel instanceof IMetaModel); - $caption = $this->getChildModelCaption($metaModel, $screen); - $this->createCommand( $collection, 'edit_' . $tableName, ['table' => $tableName], $this->iconBuilder->getBackendIcon($screen['meta']['backendicon']), [ - 'label' => $caption[0], - 'description' => $caption[1], + 'label' => 'metamodel_edit_as_child.' . $tableName . '.label', + 'description' => 'metamodel_edit_as_child.' . $tableName . '.description', 'idparam' => 'pid' ] ); @@ -254,7 +247,7 @@ private function parseModelOperations(Contao2BackendViewDefinitionInterface $vie } /** - * Build a command into the the command collection. + * Build a command into the command collection. * * @param CommandCollectionInterface $collection The command collection. * @param string $operationName The operation name. @@ -280,14 +273,14 @@ private function createCommand( } if (!$command->getLabel()) { - $command->setLabel($operationName . '.0'); + $command->setLabel($operationName . '.label'); if (isset($extraValues['label'])) { $command->setLabel($extraValues['label']); } } if (!$command->getDescription()) { - $command->setDescription($operationName . '.1'); + $command->setDescription($operationName . '.description'); if (isset($extraValues['description'])) { $command->setDescription($extraValues['description']); } @@ -335,38 +328,4 @@ private function getCommandInstance(CommandCollectionInterface $collection, stri return $command; } - - /** - * Create the caption text for the child model. - * - * @param IMetaModel $metaModel The child model. - * @param array $screen The input screen. - * - * @return array - * - * @SuppressWarnings(PHPMD.Superglobals) - * @SuppressWarnings(PHPMD.CamelCaseVariableName) - */ - private function getChildModelCaption(IMetaModel $metaModel, array $screen): array - { - $caption = [ - '', - \sprintf( - $GLOBALS['TL_LANG']['MSC']['metamodel_edit_as_child']['label'], - $metaModel->getName() - ) - ]; - - foreach ($screen['label'] as $langCode => $label) { - // @deprecated usage of TL_LANGUAGE - remove for Contao 5.0. - if (!empty($label) && $langCode === LocaleUtil::formatAsLocale($GLOBALS['TL_LANGUAGE'])) { - $caption = [ - $screen['description'][$langCode], - $label - ]; - } - } - - return $caption; - } } diff --git a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/Contao2BackendViewDefinitionBuilder.php b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/Contao2BackendViewDefinitionBuilder.php index 2619ce470..b233a41ef 100644 --- a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/Contao2BackendViewDefinitionBuilder.php +++ b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/Contao2BackendViewDefinitionBuilder.php @@ -184,9 +184,13 @@ private function parseListing(): void { assert($this->definition instanceof Contao2BackendViewDefinitionInterface); assert($this->metaModel instanceof IMetaModel); - assert(\is_array($this->inputScreen)); + if (null === $this->inputScreen) { + return; + } + $listing = $this->definition->getListingConfig(); + if (null === $listing->getRootLabel()) { $listing->setRootLabel($this->metaModel->get('name')); } diff --git a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PaletteBuilder.php b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PaletteBuilder.php index 51cbf7de8..5c1593083 100644 --- a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PaletteBuilder.php +++ b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PaletteBuilder.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -112,8 +112,9 @@ protected function build(IMetaModelDataDefinition $container) ->setName('default') ->setCondition(new DefaultPaletteCondition()); + $prefix = 'inputscreen.' . $inputScreen['meta']['id'] . '.'; foreach ($inputScreen['legends'] as $legendName => $legendInfo) { - $legend = new Legend($legendName); + $legend = new Legend($prefix . $legendName); $legend->setInitialVisibility(!$legendInfo['hide']); $palette->addLegend($legend); @@ -191,10 +192,7 @@ private function createProperty( $chain = new PropertyConditionChain(); $paletteProperty->setVisibleCondition($chain); $chain->addCondition( - new BooleanCondition( - !((isset($extra['doNotShow']) && $extra['doNotShow']) - || (isset($extra['hideInput']) && $extra['hideInput'])) - ) + new BooleanCondition(!(bool) ($extra['doNotShow'] ?? false) || !(bool) ($extra['hideInput'] ?? false)) ); if (null !== $condition) { diff --git a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PropertyDefinitionBuilder.php b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PropertyDefinitionBuilder.php index 507b820a3..e18983089 100644 --- a/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PropertyDefinitionBuilder.php +++ b/src/CoreBundle/EventListener/DcGeneral/DefinitionBuilder/PropertyDefinitionBuilder.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -151,8 +151,8 @@ private function buildProperty( array $propInfo ): void { $property = $this->getOrCreateProperty($definition, $attribute->getColName()); - $this->setLabel($property, $propInfo, $attribute); - $this->setDescription($property, $propInfo); + $this->setLabel($property); + $this->setDescription($property); $this->setDefaultValue($property, $propInfo); $this->setExcluded($property, $propInfo); $this->setSearchable($property, $propInfo); @@ -188,47 +188,30 @@ private function getOrCreateProperty(PropertiesDefinitionInterface $definition, * Set the label in the property. * * @param PropertyInterface $property The property definition. - * @param array $propInfo The property info array. - * @param IAttribute $attribute The attribute. * * @return void */ - private function setLabel(PropertyInterface $property, array $propInfo, IAttribute $attribute): void + private function setLabel(PropertyInterface $property): void { if ($property->getLabel()) { return; } - if (!isset($propInfo['label'])) { - $property->setLabel($attribute->getName()); - - return; - } - $lang = $propInfo['label']; - if (\is_array($lang)) { - $property->setLabel(reset($lang)); - $property->setDescription(next($lang)); - - return; - } - - $property->setLabel($lang); + $property->setLabel($property->getName() . '.label'); } /** * Set the description in the property. * * @param PropertyInterface $property The property definition. - * @param array $propInfo The property info array. * * @return void */ - private function setDescription(PropertyInterface $property, array $propInfo): void + private function setDescription(PropertyInterface $property): void { - if ($property->getDescription() || !isset($propInfo['description'])) { + if ($property->getDescription()) { return; } - - $property->setDescription($propInfo['description']); + $property->setDescription($property->getName() . '.description'); } /** diff --git a/src/CoreBundle/EventListener/DcGeneral/EnvironmentPopulator/TranslatorPopulator.php b/src/CoreBundle/EventListener/DcGeneral/EnvironmentPopulator/TranslatorPopulator.php index 776b7663e..d25e151b7 100644 --- a/src/CoreBundle/EventListener/DcGeneral/EnvironmentPopulator/TranslatorPopulator.php +++ b/src/CoreBundle/EventListener/DcGeneral/EnvironmentPopulator/TranslatorPopulator.php @@ -21,15 +21,16 @@ namespace MetaModels\CoreBundle\EventListener\DcGeneral\EnvironmentPopulator; -use ContaoCommunityAlliance\Contao\Bindings\ContaoEvents; -use ContaoCommunityAlliance\Contao\Bindings\Events\System\LoadLanguageFileEvent; +use Contao\System; use ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface; use ContaoCommunityAlliance\DcGeneral\EnvironmentInterface; use ContaoCommunityAlliance\Translator\StaticTranslator; +use ContaoCommunityAlliance\Translator\SymfonyTranslatorBridge; use ContaoCommunityAlliance\Translator\TranslatorChain; use ContaoCommunityAlliance\Translator\TranslatorInterface; use MetaModels\Helper\LocaleUtil; use MetaModels\ViewCombination\ViewCombination; +use Symfony\Contracts\Translation\TranslatorInterface as SymfonyTranslator; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** @@ -39,30 +40,18 @@ class TranslatorPopulator { use MetaModelPopulatorTrait; - /** - * The event dispatcher. - * - * @var EventDispatcherInterface - */ - private EventDispatcherInterface $dispatcher; - - /** - * The view combination. - * - * @var ViewCombination - */ - private ViewCombination $viewCombination; - /** * Create a new instance. * * @param EventDispatcherInterface $dispatcher The event dispatcher. * @param ViewCombination $viewCombination The view combination. + * @param SymfonyTranslator $translator The translator. */ - public function __construct(EventDispatcherInterface $dispatcher, ViewCombination $viewCombination) - { - $this->dispatcher = $dispatcher; - $this->viewCombination = $viewCombination; + public function __construct( + private EventDispatcherInterface $dispatcher, + private ViewCombination $viewCombination, + private SymfonyTranslator $translator + ) { } /** @@ -87,23 +76,11 @@ protected function populate(EnvironmentInterface $environment) } else { $translatorChain = $translator; } + $translatorChain->add(new SymfonyTranslatorBridge($this->translator)); $translatorChain->add($translator = new StaticTranslator()); - - // Map the tl_metamodel_item domain over to this domain. - $this->dispatcher->dispatch( - new LoadLanguageFileEvent('tl_metamodel_item'), - ContaoEvents::SYSTEM_LOAD_LANGUAGE_FILE - ); - $dataDefinition = $environment->getDataDefinition(); assert($dataDefinition instanceof ContainerInterface); - $definitionName = $dataDefinition->getName(); - $this->mapTranslations( - $GLOBALS['TL_LANG']['tl_metamodel_item'], - $definitionName, - $translator - ); if (null === $inputScreen = $this->viewCombination->getScreen($definitionName)) { return; diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeRendererListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeRendererListener.php index b47145107..5e57b2e0f 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeRendererListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeRendererListener.php @@ -64,9 +64,9 @@ public function modelToLabel(ModelToLabelEvent $event) ' ) ->setArgs([ - $translator->translate('error_unknown_attribute.0', 'tl_metamodel_attribute'), + $translator->translate('error_unknown_attribute.label', 'tl_metamodel_attribute'), $type, - $translator->translate('error_unknown_attribute.1', 'tl_metamodel_attribute', [$type]), + $translator->translate('error_unknown_attribute.description', 'tl_metamodel_attribute', [$type]), ]); return; diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeSchemaManagerHintListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeSchemaManagerHintListener.php index fc2921b34..ff56056dd 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeSchemaManagerHintListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/AttributeSchemaManagerHintListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,7 +12,7 @@ * * @package MetaModels/core * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -70,12 +70,6 @@ public function handle(PreEditModelEvent $event): void return; } - Message::addInfo( - $this->translator->trans( - 'tl_metamodel_attribute.hint_schema_manager', - [], - 'contao_tl_metamodel_attribute' - ) - ); + Message::addInfo($this->translator->trans('hint_schema_manager', [], 'tl_metamodel_attribute')); } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/ColNameValidationListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/ColNameValidationListener.php index 5d3f3d274..6d673daf2 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/ColNameValidationListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/ColNameValidationListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -85,14 +85,15 @@ public function handle(EncodePropertyValueFromWidgetEvent $event): void $this->tableManipulator->checkColumnName($columnName); } catch (InvalidColumnNameException $exception) { throw new \RuntimeException( - \sprintf( - $translator->translate( - 'ERR.' . ($this->tableManipulator->isSystemColumn($columnName) - ? 'systemColumn' - : 'invalidColumnName') - ), - $columnName, - $metaModel->getTableName() + $translator->translate( + 'ERR.' . ($this->tableManipulator->isSystemColumn($columnName) + ? 'systemColumn' + : 'invalidColumnName'), + 'tl_metamodel_attribute', + [ + '%col_name%' => $columnName, + '%table_name%' => $metaModel->getTableName() + ] ), 0, $exception @@ -102,10 +103,13 @@ public function handle(EncodePropertyValueFromWidgetEvent $event): void $colNames = \array_keys($metaModel->getAttributes()); if (\in_array($columnName, $colNames)) { throw new \RuntimeException( - \sprintf( - $translator->translate('ERR.columnExists'), - $columnName, - $metaModel->getTableName() + $translator->translate( + 'ERR.columnExists', + 'tl_metamodel_attribute', + [ + '%col_name%' => $columnName, + '%table_name%' => $metaModel->getTableName() + ] ) ); } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/NameAndDescriptionListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/NameAndDescriptionListener.php index 79b79e2b4..caadfddda 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/NameAndDescriptionListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/Attribute/NameAndDescriptionListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2022 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,7 @@ * @author Sven Baumann * @author Stefan Heimes * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -32,6 +32,9 @@ use MetaModels\IFactory; use Symfony\Contracts\Translation\TranslatorInterface; +use function in_array; +use function unserialize; + /** * This class provides the attribute type names. */ @@ -42,7 +45,7 @@ class NameAndDescriptionListener extends BaseListener * * @var TranslatorInterface */ - private $translator; + private TranslatorInterface $translator; /** * Create a new instance. @@ -71,7 +74,7 @@ public function __construct( */ public function decodeValue(DecodePropertyValueForWidgetEvent $event) { - if (!($this->wantToHandle($event) && \in_array($event->getProperty(), ['name', 'description']))) { + if (!($this->wantToHandle($event) && in_array($event->getProperty(), ['name', 'description']))) { return; } @@ -90,7 +93,7 @@ public function decodeValue(DecodePropertyValueForWidgetEvent $event) */ public function encodeValue(EncodePropertyValueFromWidgetEvent $event) { - if (!($this->wantToHandle($event) && \in_array($event->getProperty(), ['name', 'description']))) { + if (!($this->wantToHandle($event) && in_array($event->getProperty(), ['name', 'description']))) { return; } $metaModel = $this->getMetaModelByModelPid($event->getModel()); @@ -108,7 +111,7 @@ public function encodeValue(EncodePropertyValueFromWidgetEvent $event) */ public function buildWidget(BuildWidgetEvent $event) { - if (!($this->wantToHandle($event) && \in_array($event->getProperty()->getName(), ['name', 'description']))) { + if (!($this->wantToHandle($event) && in_array($event->getProperty()->getName(), ['name', 'description']))) { return; } @@ -118,8 +121,8 @@ public function buildWidget(BuildWidgetEvent $event) $event->getEnvironment(), $event->getProperty(), $metaModel, - $this->translator->trans('tl_metamodel_attribute.name_langcode', [], 'contao_tl_metamodel_attribute'), - $this->translator->trans('tl_metamodel_attribute.name_value', [], 'contao_tl_metamodel_attribute'), + 'name_langcode', + 'name_value', false, StringUtil::deserialize($event->getModel()->getProperty($event->getProperty()->getName()), true) ); diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/Dca/BackendSectionOptionListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/Dca/BackendSectionOptionListener.php index c6f8a60c9..b3fc1af91 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/Dca/BackendSectionOptionListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/Dca/BackendSectionOptionListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,21 +14,36 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ namespace MetaModels\CoreBundle\EventListener\DcGeneral\Table\Dca; +use Contao\Controller; +use Contao\CoreBundle\Framework\ContaoFramework; +use Contao\CoreBundle\Menu\BackendMenuBuilder; use ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetPropertyOptionsEvent; use ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface; +use Knp\Menu\ItemInterface; +use Symfony\Contracts\Translation\TranslatorInterface; + +use function array_diff; +use function array_keys; /** * This provides the backend section options. */ class BackendSectionOptionListener { + public function __construct( + private BackendMenuBuilder $builder, + private TranslatorInterface $translator, + private ContaoFramework $framework, + ) { + } + /** * Retrieve a list of all backend sections, like "content", "system" etc. * @@ -51,6 +66,26 @@ public function handle(GetPropertyOptionsEvent $event) return; } - $event->setOptions(\array_keys($GLOBALS['BE_MOD'])); + $options = []; + foreach ($this->getMenu()->getChildren() as $option) { + $label = $option->getLabel(); + if (false !== $domain = $option->getExtra('translation_domain')) { + $label = $this->translator->trans($label, $option->getExtra('translation_params') ?? [], $domain); + } + + $options[$option->getName()] = $label; + } + + $event->setOptions($options); + } + + private function getMenu(): ItemInterface + { + // Work around legacy Contao code - Menu builder loads via global lang array instead of translator. + /** @psalm-suppress InternalMethod - Class ContaoFramework is internal, not the getAdapter() method. */ + $contaoController = $this->framework->getAdapter(Controller::class); + $contaoController->loadLanguageFile('modules'); + + return $this->builder->buildMainMenu(); } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/Dca/RenderModeHintListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/Dca/RenderModeHintListener.php index e2f5a8d41..74358c1b7 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/Dca/RenderModeHintListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/Dca/RenderModeHintListener.php @@ -75,11 +75,7 @@ public function handle(BuildWidgetEvent $event) if ('hierarchical' === $model->getProperty('rendermode')) { Message::addInfo( - $this->translator->trans( - 'tl_metamodel_dca.hint_rendermode_hierarchical', - [], - 'contao_tl_metamodel_dca' - ) + $this->translator->trans('hint_rendermode_hierarchical', [], 'tl_metamodel_dca') ); } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableMandatoryListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableMandatoryListener.php index d71ef9133..2dded529e 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableMandatoryListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableMandatoryListener.php @@ -92,11 +92,7 @@ public function handle(BuildWidgetEvent $event) if ($attribute->get('isunique')) { Message::addInfo( - $this->translator->trans( - 'tl_metamodel_dcasetting.mandatory_for_unique_attr', - [], - 'contao_tl_metamodel_dcasetting' - ) + $this->translator->trans('mandatory_for_unique_attr', [], 'tl_metamodel_dcasetting') ); $extra = $event->getProperty()->getExtra(); diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableReadOnlyListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableReadOnlyListener.php index 0bb5568dd..78228858d 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableReadOnlyListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/DisableReadOnlyListener.php @@ -93,11 +93,7 @@ public function handle(BuildWidgetEvent $event) if ($attribute->get('force_alias')) { Message::addInfo( - $this->translator->trans( - 'tl_metamodel_dcasetting.readonly_for_force_alias', - [], - 'contao_tl_metamodel_dcasetting' - ) + $this->translator->trans('readonly_for_force_alias', [], 'tl_metamodel_dcasetting') ); $extra = $event->getProperty()->getExtra(); diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php index 488551d61..4dcb4aa8c 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/EditMaskSubHeadlineListener.php @@ -114,7 +114,7 @@ public function __invoke(GetEditMaskSubHeadlineEvent $event): void // Translate language key and add headline part. $subHeadline = - $this->translator->trans('tl_metamodel_item.editRecord', [0 => $headlineAdd], 'contao_tl_metamodel_item'); + $this->translator->trans('editRecord', ['%item%' => $headlineAdd], $metaModelName); $event->setHeadline($subHeadline); } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/ModelToLabelListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/ModelToLabelListener.php index 8aea94cfd..16e7e87ba 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/ModelToLabelListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/ModelToLabelListener.php @@ -160,7 +160,7 @@ private function drawAttribute(ModelToLabelEvent $event) $name, // unique attributes are automatically mandatory. (bool) $model->getProperty('mandatory') || $isUnique - ? ' [' . $this->trans('mandatory.0') . ']' + ? ' [' . $this->trans('mandatory.label') . ']' : '', $model->getProperty('tl_class') ? \sprintf('[%s]', $model->getProperty('tl_class')) : '' ]); @@ -197,7 +197,7 @@ private function drawLegend(ModelToLabelEvent $event)
%s%s
') ->setArgs([ $model->getProperty('published') ? 'published' : 'unpublished', - $this->trans('dcatypes.legend'), + $this->translator->trans('dcatypes.legend', [], 'tl_metamodel_dcasetting'), $legend, $model->getProperty('legendhide') ? ':hide' : '' ]); @@ -212,6 +212,6 @@ private function drawLegend(ModelToLabelEvent $event) */ private function trans($key) { - return $this->translator->trans('tl_metamodel_dcasetting.' . $key, [], 'contao_tl_metamodel_dcasetting'); + return $this->translator->trans($key, [], 'tl_metamodel_dcasetting'); } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/SetVisibilityConditionIconListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/SetVisibilityConditionIconListener.php index 21f1a8c6c..b9374b923 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/SetVisibilityConditionIconListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSetting/SetVisibilityConditionIconListener.php @@ -27,7 +27,6 @@ use ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface; use Contao\Image; use Contao\StringUtil; -use MetaModels\IMetaModel; use Symfony\Component\EventDispatcher\EventDispatcherInterface; /** @@ -82,9 +81,9 @@ public function handle(GetOperationButtonEvent $event): void $command->getName(), $event->getHref() ?? '', StringUtil::specialchars( - \sprintf($command->getDescription(), $model->getID()) + \sprintf($event->getTitle(), $model->getID()) ), - $this->renderImageAsHtml($event, $icon, $command->getLabel()) + $this->renderImageAsHtml($event, $icon, $event->getLabel()) ); $event->setHtml($button); diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/ModelToLabelListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/ModelToLabelListener.php index 913f3840e..0d3cf22f8 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/ModelToLabelListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/ModelToLabelListener.php @@ -93,28 +93,28 @@ public function handle(ModelToLabelEvent $event) $type = $model->getProperty('type'); $parameterValue = (\is_array($model->getProperty('value')) ? \implode(', ', $model->getProperty('value')) - : $model->getProperty('value')); - - $name = $this->translator->trans( - 'tl_metamodel_dcasetting_condition.conditionnames.' . $type, - [], - 'contao_tl_metamodel_dcasetting_condition' + : $model->getProperty('value') ); + $name = $this->translator->trans('conditionnames.' . $type, [], 'tl_metamodel_dcasetting_condition'); + + $params = [ + '%icon%' => $this->iconBuilder->getBackendIconImageTag( + 'bundles/metamodelscore/images/icons/filter_default.png', + $name, + '', + 'bundles/metamodelscore/images/icons/filter_default.png' + ), + '%name%' => $name, + '%attribute%' => $attribute ? $attribute->getName() : '' . $model->getProperty('attr_id'), + '%value%' => $parameterValue, + '%comment%' => '' !== ($comment = $model->getProperty('comment')) ? '
' . $comment : '', + ]; + /** @psalm-suppress InvalidArgument */ $event - ->setLabel($this->getLabelText($type)) - ->setArgs([ - $this->iconBuilder->getBackendIconImageTag( - 'bundles/metamodelscore/images/icons/filter_default.png', - $name, - '', - 'bundles/metamodelscore/images/icons/filter_default.png' - ), - $name, - $attribute ? $attribute->getName() : '' . $model->getProperty('attr_id'), - $parameterValue - ]); + ->setLabel($this->getLabelText($type, $params)) + ->setArgs(array_values($params)); } /** @@ -136,25 +136,18 @@ protected function wantToHandle(AbstractEnvironmentAwareEvent $event) /** * Retrieve the label text for a condition setting or the default one. * - * @param string $type The type of the element. + * @param string $type The type of the element. + * @param array $params The params. * * @return string */ - private function getLabelText($type) + private function getLabelText(string $type, array $params): string { - $label = $this->translator->trans( - 'tl_metamodel_dcasetting_condition.typedesc.' . $type, - [], - 'contao_tl_metamodel_dcasetting_condition' - ); + $label = $this->translator->trans('typedesc.' . $type, $params, 'tl_metamodel_dcasetting_condition'); - if ($label === 'tl_metamodel_dcasetting_condition.typedesc.' . $type) { - $label = $this->translator->trans( - 'tl_metamodel_dcasetting_condition.typedesc._default_', - [], - 'contao_tl_metamodel_dcasetting_condition' - ); - if ($label === 'tl_metamodel_dcasetting_condition.typedesc._default_') { + if ($label === 'typedesc.' . $type) { + $label = $this->translator->trans('typedesc._default_', $params, 'tl_metamodel_dcasetting_condition'); + if ($label === 'typedesc._default_') { return $type; } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/TypeOptionsListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/TypeOptionsListener.php index caf51b690..d8baa556c 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/TypeOptionsListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSettingCondition/TypeOptionsListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2022 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -39,7 +39,7 @@ class TypeOptionsListener extends AbstractConditionFactoryUsingListener * * @var TranslatorInterface */ - private $translator; + private TranslatorInterface $translator; /** * Create a new instance. @@ -79,11 +79,8 @@ public function handle(GetPropertyOptionsEvent $event) $options = []; foreach ($this->conditionFactory->getTypeNames() as $condition) { - $options[$condition] = $this->translator->trans( - 'tl_metamodel_dcasetting_condition.conditionnames.' . $condition, - [], - 'contao_tl_metamodel_dcasetting_condition' - ); + $options[$condition] = + $this->translator->trans('conditionnames.' . $condition, [], 'tl_metamodel_dcasetting_condition'); } $event->setOptions($options); diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSortGroup/ModelToLabelListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSortGroup/ModelToLabelListener.php index ecee9d311..4c771d4b6 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/DcaSortGroup/ModelToLabelListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DcaSortGroup/ModelToLabelListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2022 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -76,7 +76,7 @@ public function handle(ModelToLabelEvent $event) sprintf( '%s [%s]', $event->getLabel(), - $this->translator->trans('MSC.fallback', [], 'contao_default') + $this->translator->trans('fallback', [], 'metamodels_default') ) ); } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/DeleteOperationButtonListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/DeleteOperationButtonListener.php new file mode 100755 index 000000000..e72766218 --- /dev/null +++ b/src/CoreBundle/EventListener/DcGeneral/Table/DeleteOperationButtonListener.php @@ -0,0 +1,122 @@ + + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. + * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later + * @filesource + */ + +namespace MetaModels\CoreBundle\EventListener\DcGeneral\Table; + +use ContaoCommunityAlliance\DcGeneral\Contao\RequestScopeDeterminator; +use ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Event\GetOperationButtonEvent; +use ContaoCommunityAlliance\DcGeneral\Data\ModelInterface; +use ContaoCommunityAlliance\DcGeneral\DataDefinition\ContainerInterface; +use ContaoCommunityAlliance\DcGeneral\DataDefinition\Definition\View\CommandInterface; +use ContaoCommunityAlliance\DcGeneral\Event\AbstractEnvironmentAwareEvent; +use Symfony\Contracts\Translation\TranslatorInterface; + +use function assert; +use function in_array; +use function str_starts_with; + +/** + * This provides the attribute name options. + */ +class DeleteOperationButtonListener +{ + public function __construct( + private readonly RequestScopeDeterminator $scopeDeterminator, + private readonly TranslatorInterface $translator + ) { + } + + /** + * Update the delete button attributes for MetaModels tables. + * + * @param GetOperationButtonEvent $event The event. + * + * @return void + */ + public function handle(GetOperationButtonEvent $event) + { + if (!$this->wantToHandle($event)) { + return; + } + + $model = $event->getModel(); + assert($model instanceof ModelInterface); + + $attributes = $event->getAttributes(); + + + $dataDefinition = $event->getEnvironment()->getDataDefinition(); + assert($dataDefinition instanceof ContainerInterface); + + $event->setAttributes( + 'data-msg-confirm="' . $this->translator->trans( + 'delete.confirm', + [ + '%id%' => $model->getID() + ], + $dataDefinition->getName() + ) . '" ' + . $attributes + ); + } + + /** + * Test if the event is for the correct table and in backend scope. + * + * @param AbstractEnvironmentAwareEvent $event The event to test. + * + * @return bool + */ + protected function wantToHandle(AbstractEnvironmentAwareEvent $event) + { + /** @var GetOperationButtonEvent $event */ + $command = $event->getCommand(); + assert($command instanceof CommandInterface); + + if ('delete' !== $command->getName()) { + return false; + } + + if (!$this->scopeDeterminator->currentScopeIsBackend()) { + return false; + } + + $dataDefinition = $event->getEnvironment()->getDataDefinition(); + assert($dataDefinition instanceof ContainerInterface); + + return str_starts_with($dataDefinition->getName(), 'mm_') + || in_array( + $dataDefinition->getName(), + [ + 'tl_metamodel', + 'tl_metamodel_attribute', + 'tl_metamodel_dca', + 'tl_metamodel_dca_sortgroup', + 'tl_metamodel_dcasetting', + 'tl_metamodel_dcasetting_condition', + 'tl_metamodel_filter', + 'tl_metamodel_filtersetting', + 'tl_metamodel_rendersetting', + 'tl_metamodel_rendersettings', + 'tl_metamodel_searchable_pages', + ] + ); + } +} diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/FilterSetting/AbstractFilterSettingTypeRenderer.php b/src/CoreBundle/EventListener/DcGeneral/Table/FilterSetting/AbstractFilterSettingTypeRenderer.php index fe7897979..8c9451abd 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/FilterSetting/AbstractFilterSettingTypeRenderer.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/FilterSetting/AbstractFilterSettingTypeRenderer.php @@ -152,11 +152,13 @@ abstract protected function getTypes(); protected function getLabelComment(ModelInterface $model, TranslatorInterface $translator) { if ($model->getProperty('comment')) { - return \sprintf( - $translator->translate('typedesc._comment_', 'tl_metamodel_filtersetting'), - StringUtil::specialchars($model->getProperty('comment')) + return $translator->translate( + 'typedesc._comment_', + 'tl_metamodel_filtersetting', + ['%comment%' => StringUtil::specialchars($model->getProperty('comment'))] ); } + return ''; } @@ -262,16 +264,21 @@ protected function getLabelParametersWithAttributeAndUrlParam( return [ $this->getLabelImage($model), $this->getLabelText($translator, $model), - \sprintf( - $translator->translate('typedesc._attribute_', 'tl_metamodel_filtersetting'), - $attributeColumnName, - $attributeName + $translator->translate( + 'typedesc._attribute_', + 'tl_metamodel_filtersetting', + ['%colName%' => $attributeColumnName, '%name%' => $attributeName], ), $this->getLabelComment($model, $translator), - \sprintf( - $translator->translate('typedesc._url_', 'tl_metamodel_filtersetting'), - ($model->getProperty('urlparam') ? $model->getProperty('urlparam') : $attributeColumnName) - ) + $translator->translate( + 'typedesc._url_', + 'tl_metamodel_filtersetting', + [ + '%urlparam%' => ($model->getProperty('urlparam') + ? $model->getProperty('urlparam') + : $attributeColumnName) + ] + ), ]; } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelSchemaManagerHintListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelSchemaManagerHintListener.php index 4131e8f3c..9b6cfd17f 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelSchemaManagerHintListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelSchemaManagerHintListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,7 +12,7 @@ * * @package MetaModels/core * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -61,12 +61,6 @@ public function handle(PreEditModelEvent $event): void return; } - Message::addInfo( - $this->translator->trans( - 'tl_metamodel.hint_schema_manager', - [], - 'contao_tl_metamodel' - ) - ); + Message::addInfo($this->translator->trans('hint_schema_manager', [], 'tl_metamodel')); } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelToLabelListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelToLabelListener.php index 91411b630..33bd8edaa 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelToLabelListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/ModelToLabelListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -81,8 +81,7 @@ public function handle(ModelToLabelEvent $event): void $model = $event->getModel(); $tableName = $model->getProperty('tableName'); - $count = '?'; - $transId = 'tl_metamodel.itemFormatCount.0'; + $count = -1; if (!empty($tableName) && $this->connection->createSchemaManager()->tablesExist([$tableName])) { $count = $this->connection ->createQueryBuilder() @@ -90,17 +89,6 @@ public function handle(ModelToLabelEvent $event): void ->from($tableName, 't') ->executeQuery() ->fetchOne(); - - switch ($count) { - case 0: - $transId = 'tl_metamodel.itemFormatCount.0'; - break; - case 1: - $transId = 'tl_metamodel.itemFormatCount.1'; - break; - default: - $transId = 'tl_metamodel.itemFormatCount.2:'; - } } // Keep the previous label. @@ -119,7 +107,7 @@ public function handle(ModelToLabelEvent $event): void $image, $label, $tableName, - $this->translator->trans($transId, [$count], 'contao_tl_metamodel') + $this->translator->trans('itemFormatCount.label', ['%count%' => $count], 'tl_metamodel') ]); } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/TableNamePrefixingListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/TableNamePrefixingListener.php index 75c5d3c00..e0027934f 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/TableNamePrefixingListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/MetaModel/TableNamePrefixingListener.php @@ -87,8 +87,11 @@ public function handle(EncodePropertyValueFromWidgetEvent $event): void // See #49 (We can no longer find the correct issue number... :(). $tableName = \strtolower($event->getValue()); + $translator = $event->getEnvironment()->getTranslator(); + assert($translator instanceof TranslatorInterface); + if ('' === $tableName) { - throw new \RuntimeException('Table name not given'); + throw new \RuntimeException($translator->translate('ERR.tableNameNotGiven', 'tl_metamodel')); } // Force mm_ prefix. @@ -96,9 +99,6 @@ public function handle(EncodePropertyValueFromWidgetEvent $event): void $tableName = 'mm_' . $tableName; } - $translator = $event->getEnvironment()->getTranslator(); - assert($translator instanceof TranslatorInterface); - // New model, ensure the table does not exist. if (!$event->getModel()->getId()) { $this->checkTableName($tableName, $translator); @@ -123,14 +123,16 @@ private function checkTableName(string $tableName, TranslatorInterface $translat $this->tableManipulator->checkTablename($tableName); } catch (InvalidTableNameException $exception) { throw new \RuntimeException( - \sprintf($translator->translate('ERR.invalidTableName'), $tableName), + $translator->translate('ERR.invalidTableName', 'tl_metamodel', ['%table_name%' => $tableName]), $exception->getCode(), $exception ); } $model = $this->factory->getMetaModel($tableName); if (null !== $model) { - throw new \RuntimeException(\sprintf($translator->translate('ERR.tableExists'), $tableName)); + throw new \RuntimeException( + $translator->translate('ERR.tableExists', 'tl_metamodel', ['%table_name%' => $tableName]) + ); } } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSetting/ModelToLabelListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSetting/ModelToLabelListener.php index 11a5bc032..850215805 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSetting/ModelToLabelListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSetting/ModelToLabelListener.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2022 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -40,21 +40,21 @@ class ModelToLabelListener extends AbstractListener * * @var IAttributeFactory */ - private $attributeFactory; + private IAttributeFactory $attributeFactory; /** * The icon builder. * * @var IconBuilder */ - private $iconBuilder; + private IconBuilder $iconBuilder; /** * The translator. * * @var TranslatorInterface */ - private $translator; + private TranslatorInterface $translator; /** * Create a new instance. @@ -110,7 +110,7 @@ public function handle(ModelToLabelEvent $event) $name = $attribute->getName(); $colName = $attribute->getColName(); } else { - $type = $this->trans('error_unknown_id', [$model->getProperty('attr_id')]); + $type = $this->trans('error_unknown_id', ['%id%' => $model->getProperty('attr_id')]); $image = $this->iconBuilder->getBackendIconImageTag('bundles/metamodelscore/images/icons/fields.png'); $variant = ''; $name = $this->trans('error_unknown_attribute'); @@ -137,17 +137,12 @@ public function handle(ModelToLabelEvent $event) * Translate a key. * * @param string $key The key to translate. - * * @param array $params The parameters. * * @return string */ - private function trans($key, $params = []) + private function trans(string $key, array $params = []): string { - return $this->translator->trans( - 'tl_metamodel_rendersettings.' . $key, - $params, - 'contao_tl_metamodel_rendersettings' - ); + return $this->translator->trans($key, $params, 'tl_metamodel_rendersettings'); } } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php index dfe0708c3..0efaac7be 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/JumpToListener.php @@ -178,18 +178,23 @@ public function buildWidget(BuildWidgetEvent $event) /** @psalm-suppress DeprecatedMethod */ if ($metaModel->isTranslated()) { + /** @psalm-suppress DeprecatedMethod */ + $fallback = $metaModel->getFallbackLanguage(); + $arrLanguages = []; + $rowClasses = []; /** @psalm-suppress DeprecatedMethod */ foreach ((array) $metaModel->getAvailableLanguages() as $strLangCode) { $arrLanguages[$strLangCode] = $this->translator ->trans('LNG.' . $strLangCode, [], 'contao_languages'); + $rowClasses[] = ($strLangCode === $fallback) ? 'fallback_language' : 'normal_language'; } - asort($arrLanguages); $extra['minCount'] = \count($arrLanguages); $extra['maxCount'] = \count($arrLanguages); - $extra['columnFields']['langcode']['options'] = $arrLanguages; + $extra['columnFields']['langcode']['options'] = $arrLanguages; + $extra['columnFields']['langcode']['eval']['rowClasses'] = $rowClasses; } else { $extra['minCount'] = 1; $extra['maxCount'] = 1; @@ -197,9 +202,9 @@ public function buildWidget(BuildWidgetEvent $event) $extra['columnFields']['langcode']['options'] = [ 'xx' => $this->translator ->trans( - 'tl_metamodel_rendersettings.jumpTo_allLanguages', + 'jumpTo_allLanguages', [], - 'contao_tl_metamodel_rendersettings' + 'tl_metamodel_rendersettings' ) ]; } diff --git a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/LanguageCodeWizardListener.php b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/LanguageCodeWizardListener.php index 04ca987f5..c9db4b37b 100644 --- a/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/LanguageCodeWizardListener.php +++ b/src/CoreBundle/EventListener/DcGeneral/Table/RenderSettings/LanguageCodeWizardListener.php @@ -92,7 +92,7 @@ public function pagePicker(ManipulateWidgetEvent $event) $urlEvent = new GenerateHtmlEvent( 'pickpage.svg', - $translator->translate('MSC.pagepicker'), + $translator->translate('pagePicker', 'dc-general'), 'style="vertical-middle:top;cursor:pointer"' ); @@ -106,7 +106,7 @@ public function pagePicker(ManipulateWidgetEvent $event) ->set('name', $event->getWidget()->name) ->set('popupUrl', $pickerUrl) ->set('html', ' ' . (string) $urlEvent->getHtml()) - ->set('label', $event->getProperty()->getLabel()[1]) + ->set('label', $translator->translate($event->getProperty()->getLabel(), $dataDefinition->getName())) ->set('id', $event->getWidget()->id); $event->getWidget()->wizard = $template->parse(); diff --git a/src/CoreBundle/EventListener/UserListener.php b/src/CoreBundle/EventListener/UserListener.php index 61970ad3a..a180ca03e 100644 --- a/src/CoreBundle/EventListener/UserListener.php +++ b/src/CoreBundle/EventListener/UserListener.php @@ -119,6 +119,7 @@ public function onKernelRequest(RequestEvent $event) */ private function buildBackendModules(&$localMenu) { + return; foreach ($this->viewCombination->getStandalone() as $metaModelName => $screen) { $section = $screen['meta']['backendsection']; if (!isset($localMenu[$section])) { diff --git a/src/CoreBundle/MetaModelsCoreBundle.php b/src/CoreBundle/MetaModelsCoreBundle.php index 6a1bb7069..2f2619730 100644 --- a/src/CoreBundle/MetaModelsCoreBundle.php +++ b/src/CoreBundle/MetaModelsCoreBundle.php @@ -25,6 +25,7 @@ use MetaModels\CoreBundle\DependencyInjection\CompilerPass\CollectFactoriesPass; use MetaModels\CoreBundle\DependencyInjection\CompilerPass\CollectSchemaGeneratorsPass; use MetaModels\CoreBundle\DependencyInjection\CompilerPass\CollectSchemaManagersPass; +use MetaModels\CoreBundle\DependencyInjection\CompilerPass\PrepareTranslatorPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; @@ -44,5 +45,6 @@ public function build(ContainerBuilder $container): void $container->addCompilerPass(new CollectSchemaGeneratorsPass()); $container->addCompilerPass(new CollectSchemaManagersPass()); $container->addCompilerPass(new CollectDoctrineSchemaGeneratorsPass()); + $container->addCompilerPass(new PrepareTranslatorPass()); } } diff --git a/src/CoreBundle/Resources/config/dc-general/environment-populator.yml b/src/CoreBundle/Resources/config/dc-general/environment-populator.yml index 41a1cf2bb..bcf4016b5 100644 --- a/src/CoreBundle/Resources/config/dc-general/environment-populator.yml +++ b/src/CoreBundle/Resources/config/dc-general/environment-populator.yml @@ -32,6 +32,7 @@ services: arguments: - "@event_dispatcher" - "@metamodels.view_combination" + - "@translator" tags: - name: kernel.event_listener event: dc-general.factory.populate-environment diff --git a/src/CoreBundle/Resources/config/dc-general/listener.yml b/src/CoreBundle/Resources/config/dc-general/listener.yml index b9a3f4dea..b8f349f08 100644 --- a/src/CoreBundle/Resources/config/dc-general/listener.yml +++ b/src/CoreBundle/Resources/config/dc-general/listener.yml @@ -48,3 +48,12 @@ services: - name: kernel.event_listener event: dc-general.view.contao2backend.get-paste-root-button method: handleRoot + + MetaModels\CoreBundle\EventListener\DcGeneral\Table\DeleteOperationButtonListener: + arguments: + - "@cca.dc-general.scope-matcher" + - "@translator" + tags: + - name: kernel.event_listener + event: dc-general.view.contao2backend.get-operation-button + method: handle diff --git a/src/CoreBundle/Resources/config/dc-general/table/tl_dca.yml b/src/CoreBundle/Resources/config/dc-general/table/tl_dca.yml index 3f40d2fec..bb5a08dce 100644 --- a/src/CoreBundle/Resources/config/dc-general/table/tl_dca.yml +++ b/src/CoreBundle/Resources/config/dc-general/table/tl_dca.yml @@ -1,6 +1,10 @@ services: metamodels.dc_general.table.tl_metamodel_dca.backend_section_options: class: MetaModels\CoreBundle\EventListener\DcGeneral\Table\Dca\BackendSectionOptionListener + arguments: + - '@contao.menu.backend_builder' + - '@translator' + - '@contao.framework' tags: - name: kernel.event_listener event: dc-general.view.contao2backend.get-property-options diff --git a/src/CoreBundle/Resources/config/hooks.yml b/src/CoreBundle/Resources/config/hooks.yml index 3f92b9c1a..684bc41e2 100644 --- a/src/CoreBundle/Resources/config/hooks.yml +++ b/src/CoreBundle/Resources/config/hooks.yml @@ -19,6 +19,7 @@ services: - '@database_connection' - '@metamodels.template_list' - '@request_stack' + - '@translator' public: true MetaModels\CoreBundle\Contao\Hooks\ModuleCallback: @@ -30,6 +31,7 @@ services: - '@database_connection' - '@metamodels.template_list' - '@request_stack' + - '@translator' public: true MetaModels\CoreBundle\EventListener\GetSearchablePagesListener: diff --git a/src/CoreBundle/Resources/config/listeners.yml b/src/CoreBundle/Resources/config/listeners.yml index ded769c9f..d5959e8e7 100644 --- a/src/CoreBundle/Resources/config/listeners.yml +++ b/src/CoreBundle/Resources/config/listeners.yml @@ -81,6 +81,7 @@ services: - '@metamodels.view_combination' - '@security.token_storage' - '@router' + - '@session' tags: - { name: kernel.event_listener } diff --git a/src/CoreBundle/Resources/config/routing.yml b/src/CoreBundle/Resources/config/routing.yml index 296521506..e786c10b8 100644 --- a/src/CoreBundle/Resources/config/routing.yml +++ b/src/CoreBundle/Resources/config/routing.yml @@ -9,3 +9,19 @@ metamodels.support_screen: metamodels.rendersetting.add_all: path: /contao/metamodels/rendersetting/add-all/{metaModel}/{renderSetting} defaults: { _controller: metamodels.controller.rendersetting.add_all, _scope: backend, _token_check: true } + +metamodels.configuration: + path: /contao/metamodels + defaults: + _controller: MetaModels\CoreBundle\Controller\Backend\ConfigurationController + _scope: backend + _dcg_referer_update: true + _token_check: true + +metamodels.metamodel: + path: /contao/metamodel/{tableName} + defaults: + _controller: MetaModels\CoreBundle\Controller\Backend\MetaModelController + _scope: backend + _dcg_referer_update: true + _token_check: true diff --git a/src/CoreBundle/Resources/config/services.yml b/src/CoreBundle/Resources/config/services.yml index 6062f0181..25ca2647c 100644 --- a/src/CoreBundle/Resources/config/services.yml +++ b/src/CoreBundle/Resources/config/services.yml @@ -1,6 +1,10 @@ parameters: metamodels.managed-schema-type-names: [] services: + _defaults: + bind: + $translator: '@cca.translator.contao_translator' + MetaModels\IFactory: '@metamodels.factory' MetaModels\Filter\Setting\IFilterSettingFactory: '@metamodels.filter_setting_factory' MetaModels\Render\Setting\IRenderSettingFactory: '@metamodels.render_setting_factory' @@ -74,6 +78,7 @@ services: - "@database_connection" - "%contao.resources_paths%" - "%kernel.project_dir%" + - "@translator" metamodels.contao_input: class: Contao\Input @@ -142,6 +147,14 @@ services: parent: metamodels.controller.abstract.add_all tags: ['controller.service_arguments'] + MetaModels\CoreBundle\Controller\Backend\ConfigurationController: + tags: ['controller.service_arguments'] + + MetaModels\CoreBundle\Controller\Backend\MetaModelController: + arguments: + - '@contao.menu.backend_builder' + tags: ['controller.service_arguments'] + metamodels.controller.support_screen: class: MetaModels\CoreBundle\Controller\Backend\SupportMetaModelsController arguments: @@ -285,10 +298,20 @@ services: - "@contao.image.picture_factory" - "@session" + MetaModels\CoreBundle\Translator\MetaModelTranslatorConfigurator: + arguments: + $factory: '@metamodels.factory' + $cache: '@metamodels.cache_internal' + MetaModels\CoreBundle\Translator\Translator: decorates: 'contao.translation.translator' arguments: - '@MetaModels\CoreBundle\Translator\Translator.inner' MetaModels\CoreBundle\Translator\MetaModelTranslationLoader: + arguments: + $baseTranslator: '@contao.translation.translator' + $factory: '@metamodels.factory' + $viewCombination: '@metamodels.view_combination' + $builder: '@metamodels.view_combination.input_screen_information_builder' tags: [ { name: translation.loader, alias: 'metamodels' } ] diff --git a/src/CoreBundle/Resources/contao/config/config.php b/src/CoreBundle/Resources/contao/config/config.php index 268f55429..53f711b94 100644 --- a/src/CoreBundle/Resources/contao/config/config.php +++ b/src/CoreBundle/Resources/contao/config/config.php @@ -26,46 +26,10 @@ * @filesource */ -// Preserve values by extensions but insert as first entry after 'system'. -$arrOld = isset($GLOBALS['BE_MOD']['metamodels']) ? $GLOBALS['BE_MOD']['metamodels'] : array(); -unset($GLOBALS['BE_MOD']['metamodels']); -\Contao\ArrayUtil::arrayInsert( - $GLOBALS['BE_MOD'], - (array_search('accounts', array_keys($GLOBALS['BE_MOD'])) + 1), - array - ( - 'metamodels' => array_replace_recursive( - array - ( - 'metamodels' => array - ( - 'tables' => array - ( - 'tl_metamodel', - 'tl_metamodel_attribute', - 'tl_metamodel_filter', - 'tl_metamodel_filtersetting', - 'tl_metamodel_rendersettings', - 'tl_metamodel_rendersetting', - 'tl_metamodel_dca_sortgroup', - 'tl_metamodel_dca', - 'tl_metamodel_dcasetting', - 'tl_metamodel_dca_combine', - 'tl_metamodel_dcasetting_condition', - 'tl_metamodel_searchable_pages' - ), - 'icon' => 'bundles/metamodelscore/images/backend/logo.png', - 'callback' => 'MetaModels\BackendIntegration\Module' - ) - ), - // Append all previous data here. - $arrOld - ) - ) -); +$container = \Contao\System::getContainer(); // @deprecated Use the config parameter metamodels.system_columns instead. -$GLOBALS['METAMODELS_SYSTEM_COLUMNS'] = \Contao\System::getContainer()->getParameter('metamodels.system_columns'); +$GLOBALS['METAMODELS_SYSTEM_COLUMNS'] = $container->getParameter('metamodels.system_columns'); // Front-end modules. $GLOBALS['FE_MOD']['metamodels']['metamodels_frontendfilter'] = 'MetaModels\FrontendIntegration\Module\Filter'; @@ -86,10 +50,10 @@ array('MetaModels\FrontendIntegration\FrontendFilter', 'generateClearAll'); // Add cache only if dir defined in container (and therefore we are using the cache). -if ($cacheDir = \Contao\System::getContainer()->getParameter('metamodels.cache_dir')) { +if ($cacheDir = $container->getParameter('metamodels.cache_dir')) { // We need to translate the cache dir - otherwise the backend view is distorted. See \Contao\PurgeData::run(). $GLOBALS['TL_PURGE']['folders']['metamodels']['affected'] = [str_replace( - \Contao\System::getContainer()->getParameter('kernel.cache_dir') . '/', + $container->getParameter('kernel.cache_dir') . '/', '%s/', $cacheDir )]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_content.php b/src/CoreBundle/Resources/contao/dca/tl_content.php old mode 100644 new mode 100755 diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel.php index 99ffe2c3f..5a1b0921f 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ * @author Richard Henkenjohann * @author Ingolf Steinhardt * @author Cliff Parnitzky - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -314,72 +314,80 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['editheader'], - 'href' => 'act=edit', - 'icon' => 'edit.svg', + 'label' => 'editheader.label', + 'description' => 'editheader.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg', ], 'cut' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['cut'], - 'href' => 'act=paste&mode=cut', - 'icon' => 'cut.svg' + 'label' => 'cut.label', + 'description' => 'cut.description', + 'href' => 'act=paste&mode=cut', + 'icon' => 'cut.svg' ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'fields' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['fields'], - 'href' => 'table=tl_metamodel_attribute', - 'icon' => 'bundles/metamodelscore/images/icons/fields.png', - 'idparam' => 'pid' + 'label' => 'fields.label', + 'description' => 'fields.description', + 'href' => 'table=tl_metamodel_attribute', + 'icon' => 'bundles/metamodelscore/images/icons/fields.png', + 'idparam' => 'pid' ], 'rendersettings' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['rendersettings'], - 'href' => 'table=tl_metamodel_rendersettings', - 'icon' => 'bundles/metamodelscore/images/icons/rendersettings.png', - 'idparam' => 'pid' + 'label' => 'rendersettings.label', + 'description' => 'rendersettings.description', + 'href' => 'table=tl_metamodel_rendersettings', + 'icon' => 'bundles/metamodelscore/images/icons/rendersettings.png', + 'idparam' => 'pid' ], 'dca' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['dca'], - 'href' => 'table=tl_metamodel_dca', - 'icon' => 'bundles/metamodelscore/images/icons/dca.png', - 'idparam' => 'pid' + 'label' => 'dca.label', + 'description' => 'dca.description', + 'href' => 'table=tl_metamodel_dca', + 'icon' => 'bundles/metamodelscore/images/icons/dca.png', + 'idparam' => 'pid' ], 'searchable_pages' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['searchable_pages'], - 'href' => 'table=tl_metamodel_searchable_pages', - 'icon' => 'bundles/metamodelscore/images/icons/searchable_pages.png', - 'idparam' => 'pid' + 'label' => 'searchable_pages.label', + 'description' => 'searchable_pages.description', + 'href' => 'table=tl_metamodel_searchable_pages', + 'icon' => 'bundles/metamodelscore/images/icons/searchable_pages.png', + 'idparam' => 'pid' ], 'filter' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['filter'], - 'href' => 'table=tl_metamodel_filter', - 'icon' => 'bundles/metamodelscore/images/icons/filter.png', - 'idparam' => 'pid' + 'label' => 'filter.label', + 'description' => 'filter.description', + 'href' => 'table=tl_metamodel_filter', + 'icon' => 'bundles/metamodelscore/images/icons/filter.png', + 'idparam' => 'pid' ], 'dca_combine' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['dca_combine'], - 'href' => 'table=tl_metamodel_dca_combine&act=edit', - 'icon' => 'bundles/metamodelscore/images/icons/dca_combine.png', - 'idparam' => 'pid' + 'label' => 'dca_combine.label', + 'description' => 'dca_combine.description', + 'href' => 'table=tl_metamodel_dca_combine&act=edit', + 'icon' => 'bundles/metamodelscore/images/icons/dca_combine.png', + 'idparam' => 'pid' ], ] ], @@ -407,41 +415,46 @@ ], 'fields' => [ 'id' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['id'], - 'sql' => 'int(10) unsigned NOT NULL auto_increment' + 'label' => 'id.label', + 'description' => 'id.description', + 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'tstamp' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['tstamp'], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'tstamp.label', + 'description' => 'tstamp.description', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['sorting'], - 'sorting' => true, - 'flag' => 11, - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'sorting.label', + 'description' => 'sorting.description', + 'sorting' => true, + 'flag' => 11, + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'name' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['name'], - 'sorting' => true, - 'flag' => 3, - 'length' => 1, - 'exclude' => true, - 'inputType' => 'text', - 'search' => true, - 'eval' => [ + 'label' => 'name.label', + 'description' => 'name.description', + 'sorting' => true, + 'flag' => 3, + 'length' => 1, + 'exclude' => true, + 'inputType' => 'text', + 'search' => true, + 'eval' => [ 'mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'tableName' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['tableName'], - 'sorting' => true, - 'exclude' => true, - 'inputType' => 'text', - 'search' => true, - 'eval' => [ + 'label' => 'tableName.label', + 'description' => 'tableName.description', + 'sorting' => true, + 'exclude' => true, + 'inputType' => 'text', + 'search' => true, + 'eval' => [ 'mandatory' => true, 'maxlength' => 64, 'doNotCopy' => true, @@ -449,65 +462,72 @@ // Hide at overrideAll. 'doNotOverrideMultiple' => true ], - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''" ], 'translated' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['translated'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'translated.label', + 'description' => 'translated.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'clr w50 cbx m12', 'submitOnChange' => true ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'languages' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['languages'], - 'exclude' => true, - 'inputType' => 'multiColumnWizard', - 'eval' => + 'label' => 'languages.label', + 'description' => 'languages.description', + 'exclude' => true, + 'inputType' => 'multiColumnWizard', + 'eval' => [ - 'tl_class' => 'clr w50', - 'columnFields' => [ + 'useTranslator' => true, + 'tl_class' => 'clr w50', + 'columnFields' => [ 'langcode' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['languages_langcode'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'languages_langcode.label', + 'description' => 'languages_langcode.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'style' => 'width:100%;', 'chosen' => 'true' ], ], 'isfallback' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['languages_isfallback'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'languages_isfallback.label', + 'description' => 'languages_isfallback.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'style' => 'width:100%;', ], ], ], ], - 'sql' => 'text NULL' + 'sql' => 'text NULL' ], 'varsupport' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['varsupport'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'varsupport.label', + 'description' => 'varsupport.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'clr w50' ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'localeterritorysupport' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel']['localeterritorysupport'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'localeterritorysupport.label', + 'description' => 'localeterritorysupport.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', 'submitOnChange' => true ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], ], ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_attribute.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_attribute.php index a75add074..729e8fb08 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_attribute.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_attribute.php @@ -175,37 +175,39 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ] ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg' + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg' ], 'cut' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['cut'], - 'href' => 'act=paste&mode=cut', - 'icon' => 'cut.svg', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'cut.label', + 'description' => 'cut.description', + 'href' => 'act=paste&mode=cut', + 'icon' => 'cut.svg', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_attribute']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], ] ], @@ -228,8 +230,6 @@ 'isvariant', 'isunique' ], - 'metamodeloverview' => [], - 'backenddisplay' => [], ], // Default palette for MetaModelAttributeSimple derived types. // WARNING: even though it is empty, we have to keep it as otherwise @@ -249,27 +249,28 @@ // Fields. 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', 'sorting' => true, 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'type' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['type'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'type.label', + 'description' => 'type.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'includeBlankOption' => true, 'doNotSaveEmpty' => true, 'alwaysSave' => true, @@ -278,60 +279,65 @@ 'tl_class' => 'w50', 'chosen' => true ], - 'filter' => true, - 'search' => true, - 'sql' => "varchar(64) NOT NULL default ''" + 'filter' => true, + 'search' => true, + 'sql' => "varchar(64) NOT NULL default ''" ], 'name' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['name'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'name.label', + 'description' => 'name.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'clr' ], - 'search' => true, - 'sql' => 'text NULL' + 'search' => true, + 'sql' => 'text NULL' ], 'description' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['description'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'description.label', + 'description' => 'description.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'clr' ], - 'sql' => 'text NULL' + 'sql' => 'text NULL' ], // AVOID: doNotCopy => true, as child records won't be copied when copy metamodel. 'colname' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['colname'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'colname.label', + 'description' => 'colname.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'mandatory' => true, 'maxlength' => 64, 'tl_class' => 'w50', // Hide at overrideAll. 'doNotOverrideMultiple' => true ], - 'search' => true, - 'sql' => "varchar(64) NOT NULL default ''" + 'search' => true, + 'sql' => "varchar(64) NOT NULL default ''" ], 'isvariant' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['isvariant'], - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'isvariant.label', + 'description' => 'isvariant.description', + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12' ], - 'filter' => true, - 'sql' => "char(1) NOT NULL default ''" + 'filter' => true, + 'sql' => "char(1) NOT NULL default ''" ], 'isunique' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_attribute']['isunique'], - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'isunique.label', + 'description' => 'isunique.description', + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12' ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca.php index e212c9a16..f8da7c337 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -21,7 +21,7 @@ * @author Richard Henkenjohann * @author Ingolf Steinhardt * @author Cliff Parnitzky - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -98,7 +98,6 @@ ], ], ], - [ 'from' => 'tl_metamodel_dca', 'to' => 'tl_metamodel_dcasetting', @@ -132,48 +131,52 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg', + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg', ], 'copy' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['copy'], - 'href' => 'act=copy', - 'icon' => 'copy.svg', + 'label' => 'copy.label', + 'description' => 'copy.description', + 'href' => 'act=copy', + 'icon' => 'copy.svg', ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_dca']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'groupsort_settings' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['groupsort_settings'], - 'href' => 'table=tl_metamodel_dca_sortgroup', - 'icon' => 'bundles/metamodelscore/images/icons/dca_groupsortsettings.png', - 'idparam' => 'pid' + 'label' => 'groupsort_settings.label', + 'description' => 'groupsort_settings.description', + 'href' => 'table=tl_metamodel_dca_sortgroup', + 'icon' => 'bundles/metamodelscore/images/icons/dca_groupsortsettings.png', + 'idparam' => 'pid' ], 'settings' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['settings'], - 'href' => 'table=tl_metamodel_dcasetting', - 'icon' => 'bundles/metamodelscore/images/icons/dca_setting.png', - 'idparam' => 'pid' + 'label' => 'settings.label', + 'description' => 'settings.description', + 'href' => 'table=tl_metamodel_dcasetting', + 'icon' => 'bundles/metamodelscore/images/icons/dca_setting.png', + 'idparam' => 'pid' ], ] ], @@ -223,141 +226,156 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'name' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['name'], - 'exclude' => true, - 'search' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'name.label', + 'description' => 'name.description', + 'exclude' => true, + 'search' => true, + 'inputType' => 'text', + 'eval' => [ 'mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'rendertype' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendertype'], - 'inputType' => 'select', - 'default' => 'standalone', - 'reference' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendertypes'], - 'eval' => [ + 'label' => 'rendertype.label', + 'description' => 'rendertype.description', + 'inputType' => 'select', + 'default' => 'standalone', + 'reference' => [ + 'standalone' => 'rendertypes.standalone', + 'ctable' => 'rendertypes.ctable', + ], + 'eval' => [ 'tl_class' => 'w50', 'submitOnChange' => true, 'includeBlankOption' => true ], - 'sql' => "varchar(10) NOT NULL default ''" + 'sql' => "varchar(10) NOT NULL default ''" ], 'ptable' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['ptable'], - 'inputType' => 'select', - 'eval' => [ + 'label' => 'ptable.label', + 'description' => 'ptable.description', + 'inputType' => 'select', + 'eval' => [ 'tl_class' => 'w50', 'includeBlankOption' => true, 'chosen' => true ], - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''" ], 'rendermode' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendermode'], - 'inputType' => 'select', - 'default' => 'flat', - 'eval' => [ + 'label' => 'rendermode.label', + 'description' => 'rendermode.description', + 'inputType' => 'select', + 'default' => 'flat', + 'eval' => [ 'tl_class' => 'w50', 'submitOnChange' => true ], - 'sql' => "varchar(12) NOT NULL default ''" + 'sql' => "varchar(12) NOT NULL default ''" ], 'showColumns' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['showColumns'], - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'showColumns.label', + 'description' => 'showColumns.description', + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 m12 cbx' ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'backendsection' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendsection'], - 'exclude' => true, - 'inputType' => 'select', - 'default' => 'metamodels', - 'reference' => &$GLOBALS['TL_LANG']['MOD'], - 'eval' => + 'label' => 'backendsection.label', + 'description' => 'backendsection.description', + 'exclude' => true, + 'inputType' => 'select', + 'default' => 'metamodels', + 'eval' => [ 'includeBlankOption' => true, 'valign' => 'top', 'chosen' => true, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'backendicon' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendicon'], - 'exclude' => true, - 'inputType' => 'fileTree', - 'eval' => [ + 'label' => 'backendicon.label', + 'description' => 'backendicon.description', + 'exclude' => true, + 'inputType' => 'fileTree', + 'eval' => [ 'fieldType' => 'radio', 'files' => true, 'filesOnly' => true, 'extensions' => 'jpg,jpeg,gif,png,tif,tiff,svg', 'tl_class' => 'clr' ], - 'sql' => 'blob NULL' + 'sql' => 'blob NULL' ], 'backendcaption' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendcaption'], - 'exclude' => true, - 'inputType' => 'multiColumnWizard', - 'eval' => [ - 'tl_class' => 'clr', - 'columnFields' => [ + 'label' => 'backendcaption.label', + 'description' => 'backendcaption.description', + 'exclude' => true, + 'inputType' => 'multiColumnWizard', + 'eval' => [ + 'useTranslator' => true, + 'tl_class' => 'clr', + 'columnFields' => [ 'langcode' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_langcode'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => $this->getLanguages(), - 'eval' => [ + 'label' => 'becap_langcode.label', + 'description' => 'becap_langcode.description', + 'exclude' => true, + 'inputType' => 'select', + 'options' => $this->getLanguages(), + 'eval' => [ 'tl_class' => '', 'style' => 'width:400px', 'chosen' => 'true' ] ], 'label' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_label'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'becap_label.label', + 'description' => 'becap_label.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'style' => 'width:100%', ] ], 'description' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_description'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'becap_description.label', + 'description' => 'becap_description.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'style' => 'width:100%', ] ], ], ], - 'sql' => 'text NULL' + 'sql' => 'text NULL' ], 'panelLayout' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['panelLayout'], + 'label' => 'panelLayout.label', + 'description' => 'panelLayout.description', 'exclude' => true, 'inputType' => 'text', 'default' => 'limit', @@ -370,40 +388,44 @@ 'sql' => 'blob NULL' ], 'iseditable' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['iseditable'], - 'inputType' => 'checkbox', - 'default' => 1, - 'eval' => [ + 'label' => 'iseditable.label', + 'description' => 'iseditable.description', + 'inputType' => 'checkbox', + 'default' => 1, + 'eval' => [ 'tl_class' => 'w50 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'iscreatable' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['iscreatable'], - 'inputType' => 'checkbox', - 'default' => 1, - 'eval' => [ + 'label' => 'iscreatable.label', + 'description' => 'iscreatable.description', + 'inputType' => 'checkbox', + 'default' => 1, + 'eval' => [ 'tl_class' => 'w50 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'isdeleteable' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['isdeleteable'], - 'inputType' => 'checkbox', - 'default' => 1, - 'eval' => [ + 'label' => 'isdeleteable.label', + 'description' => 'isdeleteable.description', + 'inputType' => 'checkbox', + 'default' => 1, + 'eval' => [ 'tl_class' => 'clr w50 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'subheadline' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca']['subheadline'], - 'inputType' => 'text', - 'eval' => [ + 'label' => 'subheadline.label', + 'description' => 'subheadline.description', + 'inputType' => 'text', + 'eval' => [ 'maxlength' => 255, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_combine.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_combine.php index ca4cac19c..8af295dbd 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_combine.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_combine.php @@ -39,7 +39,7 @@ ] ], 'dca_config' => [ - 'data_provider' => [ + 'data_provider' => [ 'default' => [ 'class' => 'ContaoCommunityAlliance\DcGeneral\Data\TableRowsAsRecordsDataProvider', 'source' => 'tl_metamodel_dca_combine', @@ -49,15 +49,15 @@ ], 'childCondition' => [ [ - 'from' => 'tl_metamodel', - 'to' => 'tl_metamodel_dca_combine', - 'setOn' => [ + 'from' => 'tl_metamodel', + 'to' => 'tl_metamodel_dca_combine', + 'setOn' => [ [ 'to_field' => 'pid', 'from_field' => 'id', ], ], - 'filter' => [ + 'filter' => [ [ 'local' => 'pid', 'remote' => 'id', @@ -75,28 +75,30 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', - 'sql' => 'int(10) unsigned NOT NULL auto_increment' + 'label' => 'id.label', + 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'pid.label', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'sorting.label', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'tstamp.label', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'rows' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['dca_combiner'], - 'exclude' => true, - 'inputType' => 'multiColumnWizard', - 'eval' => [ - 'tl_class' => 'dca_combine', - 'columnFields' => [ + 'label' => 'dca_combiner.label', + 'description' => 'dca_combiner.description', + 'exclude' => true, + 'inputType' => 'multiColumnWizard', + 'eval' => [ + 'useTranslator' => true, + 'tl_class' => 'dca_combine', + 'columnFields' => [ 'id' => [ 'label' => null, 'exclude' => true, @@ -107,10 +109,11 @@ ] ], 'fe_group' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['fe_group'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'fe_group.label', + 'description' => 'fe_group.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'includeBlankOption' => true, 'blankOptionLabel' => '*', 'style' => 'width:100%', @@ -118,10 +121,11 @@ ], ], 'be_group' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['be_group'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'be_group.label', + 'description' => 'be_group.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'includeBlankOption' => true, 'blankOptionLabel' => '*', 'style' => 'width:100%', @@ -129,21 +133,23 @@ ], ], 'view_id' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['view_id'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => + 'label' => 'view_id.label', + 'description' => 'view_id.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ - 'includeBlankOption' => true, - 'style' => 'width:100%', - 'chosen' => 'true' + 'includeBlankOption' => true, + 'style' => 'width:100%', + 'chosen' => 'true' ], ], 'dca_id' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['dca_id'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => + 'label' => 'dca_id.label', + 'description' => 'dca_id.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'includeBlankOption' => true, 'style' => 'width:100%', @@ -154,18 +160,22 @@ ], ], 'fe_group' => [ + 'label' => 'fe_group.label', // keep signed as anonymous are -1 - 'sql' => "int(10) NOT NULL default '0'" + 'sql' => "int(10) NOT NULL default '0'" ], 'be_group' => [ + 'label' => 'be_group.label', // keep signed as admins are -1 - 'sql' => "int(10) NOT NULL default '0'" + 'sql' => "int(10) NOT NULL default '0'" ], 'view_id' => [ - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'view_id.label', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'dca_id' => [ - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'dca_id.label', + 'sql' => "int(10) unsigned NOT NULL default '0'" ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_sortgroup.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_sortgroup.php index a62c732c3..12972a234 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_sortgroup.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dca_sortgroup.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -17,7 +17,7 @@ * @author Richard Henkenjohann * @author Ingolf Steinhardt * @author Cliff Parnitzky - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -105,39 +105,42 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg', + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg', ], 'copy' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['copy'], - 'href' => 'act=copy', - 'icon' => 'copy.svg', + 'label' => 'copy.label', + 'description' => 'copy.description', + 'href' => 'act=copy', + 'icon' => 'copy.svg', ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'toggle' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['toggle'], + 'label' => 'toggle.label', + 'description' => 'toggle.description', 'icon' => 'visible.svg', 'toggleProperty' => 'published' ] @@ -179,109 +182,130 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], + 'published' => [ + 'label' => 'published.label', + 'default' => 1, + 'sql' => "char(1) NOT NULL default '1'" + ], 'name' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['name'], - 'exclude' => true, - 'search' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'name.label', + 'description' => 'name.description', + 'exclude' => true, + 'search' => true, + 'inputType' => 'text', + 'eval' => [ 'mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'isdefault' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['isdefault'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'isdefault.label', + 'description' => 'isdefault.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 m12 cbx', 'fallback' => true ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'ismanualsort' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['ismanualsort'], - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'ismanualsort.label', + 'description' => 'ismanualsort.description', + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx', 'submitOnChange' => true ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'rendersort' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersort'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => ['asc', 'desc'], - 'eval' => [ + 'label' => 'rendersort.label', + 'description' => 'rendersort.description', + 'exclude' => true, + 'inputType' => 'select', + 'options' => ['asc', 'desc'], + 'eval' => [ 'tl_class' => 'w50', ], - 'reference' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersortdirections'], - 'sql' => "varchar(10) NOT NULL default 'asc'" + 'reference' => [ + 'asc' => 'rendersortdirections.asc', + 'desc' => 'rendersortdirections.desc', + ], + 'sql' => "varchar(10) NOT NULL default 'asc'" ], 'rendersortattr' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersortattr'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'rendersortattr.label', + 'description' => 'rendersortattr.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'tl_class' => 'w50 clr', 'chosen' => true ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'rendergrouptype' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptype'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => ['none', 'char', 'digit', 'day', 'weekday', 'week', 'month', 'year'], - 'default' => 'none', - 'eval' => [ + 'label' => 'rendergrouptype.label', + 'description' => 'rendergrouptype.description', + 'exclude' => true, + 'inputType' => 'select', + 'options' => ['none', 'char', 'digit', 'day', 'weekday', 'week', 'month', 'year'], + 'default' => 'none', + 'eval' => [ 'tl_class' => 'w50 clr', 'submitOnChange' => true ], - 'reference' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes'], - 'sql' => "varchar(10) NOT NULL default 'none'" + 'reference' => [ + 'none' => 'rendergrouptypes.none', + 'char' => 'rendergrouptypes.char', + 'digit' => 'rendergrouptypes.digit', + 'day' => 'rendergrouptypes.day', + 'weekday' => 'rendergrouptypes.weekday', + 'week' => 'rendergrouptypes.week', + 'month' => 'rendergrouptypes.month', + 'year' => 'rendergrouptypes.year', + ], + 'sql' => "varchar(10) NOT NULL default 'none'" ], 'rendergroupattr' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergroupattr'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'rendergroupattr.label', + 'description' => 'rendergroupattr.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'tl_class' => 'w50', 'chosen' => true ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'rendergrouplen' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouplen'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'rendergrouplen.label', + 'description' => 'rendergrouplen.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'w50', 'rgxp' => 'digit' ], - 'sql' => "int(10) unsigned NOT NULL default '1'" - ], - 'published' => [ - 'default' => 1, - 'sql' => "char(1) NOT NULL default '1'" + 'sql' => "int(10) unsigned NOT NULL default '1'" ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting.php index 54d654468..1b3375841 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting.php @@ -138,52 +138,57 @@ ], 'global_operations' => [ 'addall' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addall'], - 'class' => 'header_add_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'addall.label', + 'description' => 'addall.description', + 'class' => 'header_add_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg' + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg' ], 'cut' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['cut'], - 'href' => 'act=paste&mode=cut', - 'icon' => 'cut.svg' + 'label' => 'cut.label', + 'description' => 'cut.description', + 'href' => 'act=paste&mode=cut', + 'icon' => 'cut.svg' ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'toggle' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['toggle'], + 'label' => 'toggle.label', + 'description' => 'toggle.description', 'icon' => 'visible.svg', 'toggleProperty' => 'published', ], 'conditions' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['conditions'], - 'href' => 'table=tl_metamodel_dcasetting_condition', - 'icon' => 'bundles/metamodelscore/images/icons/dca_condition.png', - 'idparam' => 'pid' + 'label' => 'conditions.label', + 'description' => 'conditions.description', + 'href' => 'table=tl_metamodel_dcasetting_condition', + 'icon' => 'bundles/metamodelscore/images/icons/dca_condition.png', + 'idparam' => 'pid' ], ] ], @@ -246,43 +251,49 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'published' => [ + 'label' => 'published.label', 'default' => 1, 'sql' => "char(1) NOT NULL default '1'" ], 'dcatype' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['dcatype'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => ['attribute', 'legend'], - 'reference' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['dcatypes'], - 'eval' => [ + 'label' => 'dcatype.label', + 'description' => 'dcatype.description', + 'exclude' => true, + 'inputType' => 'select', + 'options' => ['attribute', 'legend'], + 'reference' => [ + 'legend' => 'dcatypes.legend', + 'attribute' => 'dcatypes.attribute', + ], + 'eval' => [ 'tl_class' => 'w50', 'includeBlankOption' => true, 'submitOnChange' => true, ], - 'sql' => "varchar(10) NOT NULL default ''" + 'sql' => "varchar(10) NOT NULL default ''" ], 'attr_id' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['attr_id'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'attr_id.label', + 'description' => 'attr_id.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'tl_class' => 'w50', 'doNotSaveEmpty' => true, 'alwaysSave' => true, @@ -290,10 +301,11 @@ 'mandatory' => true, 'submitOnChange' => true, ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tl_class' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['tl_class'], + 'label' => 'tl_class.label', + 'description' => 'tl_class.description', 'exclude' => true, 'inputType' => 'text', 'default' => 'w50', @@ -305,185 +317,208 @@ 'sql' => ['type' => 'string', 'length' => 64, 'default' => 'w50'] ], 'be_template' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['be_template'], - 'exclude' => true, - 'inputType' => 'select', - 'sql' => 'varchar(255) NOT NULL default \'\'', - 'eval' => [ + 'label' => 'be_template.label', + 'description' => 'be_template.description', + 'exclude' => true, + 'inputType' => 'select', + 'sql' => 'varchar(255) NOT NULL default \'\'', + 'eval' => [ 'includeBlankOption' => true, 'tl_class' => 'clr w50', 'chosen' => 'true' ] ], 'legendhide' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['legendhide'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'legendhide.label', + 'description' => 'legendhide.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12' ], - 'sql' => "varchar(5) NOT NULL default ''" + 'sql' => "varchar(5) NOT NULL default ''" ], 'legendtitle' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['legendtitle'], - 'exclude' => true, - 'eval' => [ + 'label' => 'legendtitle.label', + 'description' => 'legendtitle.description', + 'exclude' => true, + 'eval' => [ 'tl_class' => 'clr' ], - 'sql' => 'text NULL' + 'sql' => 'text NULL' ], 'mandatory' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['mandatory'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'mandatory.label', + 'description' => 'mandatory.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'alwaysSave' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['alwaysSave'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'alwaysSave.label', + 'description' => 'alwaysSave.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'filterable' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['filterable'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'filterable.label', + 'description' => 'filterable.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'searchable' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['searchable'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'searchable.label', + 'description' => 'searchable.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'chosen' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['chosen'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'chosen.label', + 'description' => 'chosen.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12' ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'allowHtml' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['allowHtml'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => + 'label' => 'allowHtml.label', + 'description' => 'allowHtml.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'preserveTags' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['preserveTags'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'preserveTags.label', + 'description' => 'preserveTags.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'decodeEntities' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['decodeEntities'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'decodeEntities.label', + 'description' => 'decodeEntities.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'rte' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rte'], - 'exclude' => true, - 'inputType' => 'select', - 'default' => 'tinyMCE', - 'eval' => [ + 'label' => 'rte.label', + 'description' => 'rte.description', + 'exclude' => true, + 'inputType' => 'select', + 'default' => 'tinyMCE', + 'eval' => [ 'tl_class' => 'w50', 'includeBlankOption' => true, ], - 'sql' => "varchar(64) NOT NULL default 'tinyMCE'" + 'sql' => "varchar(64) NOT NULL default 'tinyMCE'" ], 'rows' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rows'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => + 'label' => 'rows.label', + 'description' => 'rows.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'w50', 'rgxp' => 'digit' ], - 'sql' => "int(10) NOT NULL default '0'" + 'sql' => "int(10) NOT NULL default '0'" ], 'cols' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['cols'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'cols.label', + 'description' => 'cols.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'w50', 'rgxp' => 'digit' ], - 'sql' => "int(10) NOT NULL default '0'" + 'sql' => "int(10) NOT NULL default '0'" ], 'trailingSlash' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => [0, 1, 2], - 'default' => 2, - 'reference' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options'], - 'eval' => [ + 'label' => 'trailingSlash.label', + 'description' => 'trailingSlash.description', + 'exclude' => true, + 'inputType' => 'select', + 'options' => [0, 1, 2], + 'default' => 2, + 'reference' => [ + '0' => 'trailingSlash_options.0', + '1' => 'trailingSlash_options.1', + '2' => 'trailingSlash_options.2', + ], + 'eval' => [ 'tl_class' => 'clr w50', ], - 'sql' => "char(1) NOT NULL default '2'" + 'sql' => "char(1) NOT NULL default '2'" ], 'spaceToUnderscore' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['spaceToUnderscore'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'spaceToUnderscore.label', + 'description' => 'spaceToUnderscore.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'includeBlankOption' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['includeBlankOption'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'default' => '1', - 'eval' => [ + 'label' => 'includeBlankOption.label', + 'description' => 'includeBlankOption.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'default' => '1', + 'eval' => [ 'tl_class' => 'clr w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default '1'" + 'sql' => "char(1) NOT NULL default '1'" ], 'submitOnChange' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['submitOnChange'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'submitOnChange.label', + 'description' => 'submitOnChange.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'clr w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'readonly' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly'], - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'readonly.label', + 'description' => 'readonly.description', + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx m12', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting_condition.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting_condition.php index ba57b1c59..b0f6c31ce 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting_condition.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_dcasetting_condition.php @@ -27,7 +27,8 @@ $GLOBALS['TL_DCA']['tl_metamodel_dcasetting_condition'] = [ 'config' => [ 'dataContainer' => General::class, - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['list_label'], + 'label' => 'list_label.label', + 'description' => 'list_label.description', 'switchToEdit' => false, 'enableVersioning' => false, 'sql' => [ @@ -154,45 +155,49 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ] ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg' + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg' ], 'copy' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['copy'], - 'href' => 'act=copy', - 'icon' => 'copy.svg' + 'label' => 'copy.label', + 'description' => 'copy.description', + 'href' => 'act=copy', + 'icon' => 'copy.svg' ], 'cut' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['cut'], - 'href' => 'act=paste&mode=cut', - 'icon' => 'cut.svg', - 'attributes' => 'onclick="Backend.getScrollOffset()"', + 'label' => 'cut.label', + 'description' => 'cut.description', + 'href' => 'act=paste&mode=cut', + 'icon' => 'cut.svg', + 'attributes' => 'onclick="Backend.getScrollOffset()"', ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'toggle' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['toggle'], + 'label' => 'toggle.label', + 'description' => 'toggle.description', 'icon' => 'visible.svg', 'toggleProperty' => 'enabled', ] @@ -235,29 +240,31 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'settingId' => [ // Keep this empty but keep it here! // needed for act=copy in DC_Table, as otherwise the fid value will not be copied. - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['fid'], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'fid.label', + 'description' => 'fid.description', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'type' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['type'], + 'label' => 'type.label', + 'description' => 'type.description', 'exclude' => true, 'inputType' => 'select', 'eval' => [ @@ -274,30 +281,33 @@ 'sql' => "varchar(255) NOT NULL default ''" ], 'enabled' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['enabled'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'default' => 1, - 'eval' => [ + 'label' => 'enabled.label', + 'description' => 'enabled.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'default' => 1, + 'eval' => [ 'alwaysSave' => true, 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'comment' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['comment'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'comment.label', + 'description' => 'comment.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'clr long' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'attr_id' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['attr_id'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'attr_id.label', + 'description' => 'attr_id.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'doNotSaveEmpty' => true, 'alwaysSave' => true, 'submitOnChange' => true, @@ -306,19 +316,20 @@ 'tl_class' => 'w50', 'chosen' => true ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'value' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['value'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'value.label', + 'description' => 'value.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'alwaysSave' => true, 'includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true ], - 'sql' => 'blob NULL' + 'sql' => 'blob NULL' ], ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_filter.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_filter.php index 4583933bf..9161a567b 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_filter.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_filter.php @@ -27,7 +27,7 @@ use ContaoCommunityAlliance\DcGeneral\DC\General; $GLOBALS['TL_DCA']['tl_metamodel_filter'] = [ - 'config' => [ + 'config' => [ 'dataContainer' => General::class, 'switchToEdit' => false, 'enableVersioning' => false, @@ -38,8 +38,7 @@ ], ], ], - - 'dca_config' => [ + 'dca_config' => [ 'data_provider' => [ 'default' => [ 'source' => 'tl_metamodel_filter' @@ -97,9 +96,8 @@ ], ], ], - - 'list' => [ - 'sorting' => [ + 'list' => [ + 'sorting' => [ 'mode' => 4, 'fields' => [ 'name' @@ -110,52 +108,50 @@ ], 'flag' => 1, ], - - 'label' => [ + 'label' => [ 'fields' => [ 'name' ], 'format' => '%s' ], - 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ] ], - - 'operations' => [ + 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filter']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg' + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg' ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filter']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_filter']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filter']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'settings' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filter']['settings'], - 'href' => 'table=tl_metamodel_filtersetting', - 'idparam' => 'pid', - 'icon' => 'bundles/metamodelscore/images/icons/filter_setting.png', + 'label' => 'settings.label', + 'description' => 'settings.description', + 'href' => 'table=tl_metamodel_filtersetting', + 'idparam' => 'pid', + 'icon' => 'bundles/metamodelscore/images/icons/filter_setting.png', ], ] ], - 'metapalettes' => [ 'default' => [ 'title' => [ @@ -163,30 +159,30 @@ ] ], ], - - 'fields' => [ + 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'name' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filter']['name'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'name.label', + 'description' => 'name.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_filtersetting.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_filtersetting.php index 411c92156..9fa4e1d74 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_filtersetting.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_filtersetting.php @@ -30,7 +30,8 @@ $GLOBALS['TL_DCA']['tl_metamodel_filtersetting'] = [ 'config' => [ 'dataContainer' => General::class, - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['list_label'], + 'label' => 'list_label.label', + 'description' => 'list_label.description', 'switchToEdit' => false, 'enableVersioning' => false, 'sql' => [ @@ -146,45 +147,49 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ] ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg' + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg' ], 'copy' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['copy'], - 'href' => 'act=copy', - 'icon' => 'copy.svg' + 'label' => 'copy.label', + 'description' => 'copy.description', + 'href' => 'act=copy', + 'icon' => 'copy.svg' ], 'cut' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['cut'], - 'href' => 'act=paste&mode=cut', - 'icon' => 'cut.svg', - 'attributes' => 'onclick="Backend.getScrollOffset()"', + 'label' => 'cut.label', + 'description' => 'cut.description', + 'href' => 'act=paste&mode=cut', + 'icon' => 'cut.svg', + 'attributes' => 'onclick="Backend.getScrollOffset()"', ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'toggle' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['toggle'], + 'label' => 'toggle.label', + 'description' => 'toggle.description', 'icon' => 'visible.svg', 'toggleProperty' => 'enabled', ] @@ -255,33 +260,35 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', 'sorting' => true, 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'fid' => [ // Keep this empty but keep it here! // needed for act=copy in DC_Table, as otherwise the fid value will not be copied. - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['fid'], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'fid.label', + 'description' => 'fid.description', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'type' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['type'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'type.label', + 'description' => 'type.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'doNotSaveEmpty' => true, 'alwaysSave' => true, 'submitOnChange' => true, @@ -290,31 +297,34 @@ 'tl_class' => 'w50', 'chosen' => true ], - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''" ], 'enabled' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['enabled'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'default' => 1, - 'eval' => [ + 'label' => 'enabled.label', + 'description' => 'enabled.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'default' => 1, + 'eval' => [ 'alwaysSave' => true, 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'comment' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['comment'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => ['tl_class' => 'clr long'], - 'sql' => "varchar(255) NOT NULL default ''" + 'label' => 'comment.label', + 'description' => 'comment.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => ['tl_class' => 'clr long'], + 'sql' => "varchar(255) NOT NULL default ''" ], 'attr_id' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['attr_id'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'attr_id.label', + 'description' => 'attr_id.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'doNotSaveEmpty' => true, 'alwaysSave' => true, 'submitOnChange' => true, @@ -323,60 +333,66 @@ 'tl_class' => 'w50', 'chosen' => true ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'all_langs' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['all_langs'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'all_langs.label', + 'description' => 'all_langs.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'alwaysSave' => true, 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'items' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['items'], - 'exclude' => true, - 'inputType' => 'textarea', - 'eval' => [ + 'label' => 'items.label', + 'description' => 'items.description', + 'exclude' => true, + 'inputType' => 'textarea', + 'eval' => [ 'doNotSaveEmpty' => true, 'alwaysSave' => true, 'mandatory' => true, ], - 'sql' => 'text NULL' + 'sql' => 'text NULL' ], 'urlparam' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['urlparam'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'urlparam.label', + 'description' => 'urlparam.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'w50', ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'predef_param' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['predef_param'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'predef_param.label', + 'description' => 'predef_param.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'alwaysSave' => true, 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'fe_widget' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['fe_widget'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'fe_widget.label', + 'description' => 'fe_widget.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'alwaysSave' => true, 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'customsql' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['customsql'], + 'label' => 'customsql.label', + 'description' => 'customsql.description', 'exclude' => true, 'inputType' => 'textarea', 'default' => 'SELECT id FROM {{table}} @@ -393,145 +409,162 @@ 'sql' => 'text NULL' ], 'allow_empty' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['allow_empty'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'allow_empty.label', + 'description' => 'allow_empty.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'alwaysSave' => true, 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'stop_after_match' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['stop_after_match'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'stop_after_match.label', + 'description' => 'stop_after_match.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'alwaysSave' => true, 'tl_class' => 'w50 cbx', ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'label' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['label'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'label.label', + 'description' => 'label.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'clr w50', ], - 'sql' => 'blob NULL' + 'sql' => 'blob NULL' ], 'template' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['template'], - 'default' => 'mm_filteritem_default', - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'template.label', + 'description' => 'template.description', + 'default' => 'mm_filteritem_default', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'tl_class' => 'w50', 'chosen' => true ], - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''" ], 'blankoption' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['blankoption'], - 'exclude' => true, - 'default' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'blankoption.label', + 'description' => 'blankoption.description', + 'exclude' => true, + 'default' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'clr w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default '1'" + 'sql' => "char(1) NOT NULL default '1'" ], 'onlyused' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['onlyused'], - 'exclude' => true, - 'default' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'onlyused.label', + 'description' => 'onlyused.description', + 'exclude' => true, + 'default' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 m12 cbx', 'submitOnChange' => true, ], - 'sql' => "char(1) NOT NULL default '0'" + 'sql' => "char(1) NOT NULL default '1'" ], 'onlypossible' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['onlypossible'], - 'exclude' => true, - 'default' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'onlypossible.label', + 'description' => 'onlypossible.description', + 'exclude' => true, + 'default' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default '0'" + 'sql' => "char(1) NOT NULL default '1'" ], 'skipfilteroptions' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['skipfilteroptions'], - 'exclude' => true, - 'default' => false, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'skipfilteroptions.label', + 'description' => 'skipfilteroptions.description', + 'exclude' => true, + 'default' => false, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default '0'" + 'sql' => "char(1) NOT NULL default ''" ], 'defaultid' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['defaultid'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'defaultid.label', + 'description' => 'defaultid.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'tl_class' => 'clr w50', 'includeBlankOption' => true ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'hide_label' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['hide_label'], - 'exclude' => true, - 'default' => false, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'hide_label.label', + 'description' => 'hide_label.description', + 'exclude' => true, + 'default' => false, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default '0'" + 'sql' => "char(1) NOT NULL default '0'" ], 'label_as_blankoption' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['label_as_blankoption'], - 'exclude' => true, - 'default' => false, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'label_as_blankoption.label', + 'description' => 'label_as_blankoption.description', + 'exclude' => true, + 'default' => false, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 m12 cbx', ], - 'sql' => "char(1) NOT NULL default '0'" + 'sql' => "char(1) NOT NULL default '0'" ], 'apply_sorting' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['apply_sorting'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => ['natsort_asc', 'natsort_desc'], - 'reference' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['sorting_directions'], - 'eval' => [ + 'label' => 'apply_sorting.label', + 'description' => 'apply_sorting.description', + 'exclude' => true, + 'inputType' => 'select', + 'options' => ['natsort_asc', 'natsort_desc'], + 'reference' => [ + 'natsort_asc' => 'sorting_directions.natsort_asc', + 'natsort_desc' => 'sorting_directions.natsort_desc', + ], + 'eval' => [ 'tl_class' => 'w50', 'includeBlankOption' => true ], - 'sql' => ['type' => 'string', 'length' => '24', 'notnull' => false, 'default' => ''] + 'sql' => ['type' => 'string', 'length' => '24', 'notnull' => false, 'default' => ''] ], 'cssID' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['cssID'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'cssID.label', + 'description' => 'cssID.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'multiple' => true, 'size' => 2, 'tl_class' => 'clr w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'placeholder' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['placeholder'], - 'exclude' => true, - 'inputType' => 'text', - 'sql' => 'varchar(255) NOT NULL default \'\'', - 'eval' => ['tl_class' => 'w50'] + 'label' => 'placeholder.label', + 'description' => 'placeholder.description', + 'exclude' => true, + 'inputType' => 'text', + 'sql' => 'varchar(255) NOT NULL default \'\'', + 'eval' => ['tl_class' => 'w50'] ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_item.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_item.php index 8354e1e4b..d59a381c3 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_item.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_item.php @@ -47,7 +47,6 @@ 'tstamp' ], ], - 'label' => [ 'fields' => [ ], @@ -56,16 +55,16 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersetting.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersetting.php index 1aa22e2ea..250f6df22 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersetting.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersetting.php @@ -121,43 +121,47 @@ ], 'global_operations' => [ 'addall' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall'], - 'class' => 'header_add_all rendersetting_add_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'addall.label', + 'description' => 'addall.description', + 'class' => 'header_add_all rendersetting_add_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ] ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg' + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg' ], 'cut' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['cut'], - 'icon' => 'cut.svg' + 'label' => 'cut.label', + 'description' => 'cut.description', + 'icon' => 'cut.svg' ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'toggle' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle'], + 'label' => 'toggle.label', + 'description' => 'toggle.description', 'icon' => 'visible.svg', 'toggleProperty' => 'enabled', ] @@ -180,26 +184,27 @@ // Fields. 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'sorting' => [ - 'label' => 'sorting.0', + 'label' => 'sorting.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'attr_id' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'attr_id.label', + 'description' => 'attr_id.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'doNotSaveEmpty' => true, 'alwaysSave' => true, 'submitOnChange' => true, @@ -208,32 +213,36 @@ 'chosen' => true, 'tl_class' => 'w50' ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'template' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'template.label', + 'description' => 'template.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'tl_class' => 'w50', 'chosen' => true, 'includeBlankOption' => true, ], - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''" ], 'additional_class' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['additional_class'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'additional_class.label', + 'description' => 'additional_class.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'tl_class' => 'w50', 'maxlength' => 64, ], - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''" ], 'enabled' => [ - 'default' => 1, - 'sql' => "char(1) NOT NULL default ''" + 'label' => 'enabled.label', + 'description' => 'enabled.description', + 'default' => 1, + 'sql' => "char(1) NOT NULL default ''" ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersettings.php index 3b4618a4b..636114838 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersettings.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_rendersettings.php @@ -124,43 +124,46 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ] ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg' + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg' ], 'copy' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['copy'], - 'href' => 'act=copy', - 'icon' => 'copy.svg' + 'label' => 'copy.label', + 'description' => 'copy.description', + 'href' => 'act=copy', + 'icon' => 'copy.svg' ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'settings' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['settings'], - 'href' => 'table=tl_metamodel_rendersetting', - 'icon' => 'bundles/metamodelscore/images/icons/rendersetting.png', - 'idparam' => 'pid' + 'label' => 'settings.label', + 'description' => 'settings.description', + 'href' => 'table=tl_metamodel_rendersetting', + 'icon' => 'bundles/metamodelscore/images/icons/rendersetting.png', + 'idparam' => 'pid' ], ] ], @@ -189,109 +192,122 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', - 'sql' => 'int(10) unsigned NOT NULL auto_increment' + 'label' => 'id.label', + 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'pid.label', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'label' => 'tstamp.label', + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'name' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['name'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'name.label', + 'description' => 'name.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'hideEmptyValues' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['hideEmptyValues'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'hideEmptyValues.label', + 'description' => 'hideEmptyValues.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx' ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'hideLabels' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['hideLabels'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'hideLabels.label', + 'description' => 'hideLabels.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'tl_class' => 'w50 cbx' ], - 'sql' => "char(1) NOT NULL default ''" + 'sql' => "char(1) NOT NULL default ''" ], 'template' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['template'], - 'default' => 'metamodel_prerendered', - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'template.label', + 'description' => 'template.description', + 'default' => 'metamodel_prerendered', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'includeBlankOption' => true, 'tl_class' => 'w50', 'mandatory' => true, 'chosen' => true ], - 'sql' => "varchar(64) NOT NULL default ''" + 'sql' => "varchar(64) NOT NULL default ''" ], 'format' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['format'], - 'exclude' => true, - 'inputType' => 'select', - 'options' => [ + 'label' => 'format.label', + 'description' => 'format.description', + 'exclude' => true, + 'inputType' => 'select', + 'options' => [ 'html5', 'text' ], - 'reference' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['formatOptions'], - 'eval' => [ + 'reference' => [ + 'html5' => 'formatOptions.html5', + 'text' => 'formatOptions.text', + ], + 'eval' => [ 'includeBlankOption' => true, 'tl_class' => 'w50', 'chosen' => true ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'jumpTo' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo'], + 'label' => 'jumpTo.label', + 'description' => 'jumpTo.description', 'exclude' => true, 'minCount' => 1, 'maxCount' => 1, 'disableSorting' => '1', 'inputType' => 'multiColumnWizard', 'eval' => [ - 'dragAndDrop' => false, - 'hideButtons' => true, - 'style' => 'width:100%;', - 'tl_class' => 'clr clx', - 'columnFields' => [ + 'useTranslator' => true, + 'dragAndDrop' => false, + 'hideButtons' => true, + 'style' => 'width:100%;', + 'tl_class' => 'clr clx', + 'columnFields' => [ 'langcode' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_language'], - 'exclude' => true, - 'inputType' => 'justtextoption', - 'eval' => [ + 'label' => 'jumpTo_language.label', + 'description' => 'jumpTo_language.description', + 'exclude' => true, + 'inputType' => 'justtextoption', + 'eval' => [ 'valign' => 'center' ] ], 'value' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_page'], - 'exclude' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'jumpTo_page.label', + 'description' => 'jumpTo_page.description', + 'exclude' => true, + 'inputType' => 'text', + 'eval' => [ 'style' => 'width:90%;' ] ], 'filter' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_filter'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'jumpTo_filter.label', + 'description' => 'jumpTo_filter.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'style' => 'width:100%;', 'includeBlankOption' => true, 'chosen' => true @@ -302,64 +318,72 @@ 'sql' => 'blob NULL' ], 'additionalCss' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['additionalCss'], - 'exclude' => true, - 'inputType' => 'multiColumnWizard', - 'eval' => [ - 'style' => 'width:100%;', - 'tl_class' => 'w50', - 'columnFields' => [ + 'label' => 'additionalCss.label', + 'description' => 'additionalCss.description', + 'exclude' => true, + 'inputType' => 'multiColumnWizard', + 'eval' => [ + 'useTranslator' => true, + 'style' => 'width:100%;', + 'tl_class' => 'w50', + 'columnFields' => [ 'file' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['file'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'file.label', + 'description' => 'file.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'style' => 'width:100%;', 'chosen' => true, 'includeBlankOption' => true ] ], 'published' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['publish'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'publish.label', + 'description' => 'publish.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'style' => 'width:40px;' ] ], ] ], - 'sql' => 'blob NULL' + 'sql' => 'blob NULL' ], 'additionalJs' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['additionalJs'], - 'exclude' => true, - 'inputType' => 'multiColumnWizard', - 'eval' => [ - 'style' => 'width:100%;', - 'tl_class' => 'w50', - 'columnFields' => [ + 'label' => 'additionalJs.label', + 'description' => 'additionalJs.description', + 'exclude' => true, + 'inputType' => 'multiColumnWizard', + 'eval' => [ + 'useTranslator' => true, + 'style' => 'width:100%;', + 'tl_class' => 'w50', + 'columnFields' => [ 'file' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['file'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'file.label', + 'description' => 'file.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'style' => 'width:100%;', 'chosen' => true, 'includeBlankOption' => true ] ], 'published' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['publish'], - 'exclude' => true, - 'inputType' => 'checkbox', - 'eval' => [ + 'label' => 'publish.label', + 'description' => 'publish.description', + 'exclude' => true, + 'inputType' => 'checkbox', + 'eval' => [ 'style' => 'width:40px;' ] ], ] ], - 'sql' => 'blob NULL' + 'sql' => 'blob NULL' ], ], ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_metamodel_searchable_pages.php b/src/CoreBundle/Resources/contao/dca/tl_metamodel_searchable_pages.php index d4a5ea3d9..1124a2683 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_metamodel_searchable_pages.php +++ b/src/CoreBundle/Resources/contao/dca/tl_metamodel_searchable_pages.php @@ -87,39 +87,42 @@ ], 'global_operations' => [ 'all' => [ - 'label' => &$GLOBALS['TL_LANG']['MSC']['all'], - 'href' => 'act=select', - 'class' => 'header_edit_all', - 'attributes' => 'onclick="Backend.getScrollOffset();"' + 'label' => 'all.label', + 'description' => 'all.description', + 'href' => 'act=select', + 'class' => 'header_edit_all', + 'attributes' => 'onclick="Backend.getScrollOffset();"' ], ], 'operations' => [ 'edit' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['edit'], - 'href' => 'act=edit', - 'icon' => 'edit.svg', + 'label' => 'edit.label', + 'description' => 'edit.description', + 'href' => 'act=edit', + 'icon' => 'edit.svg', ], 'copy' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['copy'], - 'href' => 'act=copy', - 'icon' => 'copy.svg', + 'label' => 'copy.label', + 'description' => 'copy.description', + 'href' => 'act=copy', + 'icon' => 'copy.svg', ], 'delete' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['delete'], - 'href' => 'act=delete', - 'icon' => 'delete.svg', - 'attributes' => sprintf( - 'onclick="if (!confirm(\'%s\')) return false; Backend.getScrollOffset();"', - $GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['deleteConfirm'] ?? '' - ) + 'label' => 'delete.label', + 'description' => 'delete.description', + 'href' => 'act=delete', + 'icon' => 'delete.svg', + 'attributes' => 'onclick="if (!confirm(this.dataset.msgConfirm)) return false; Backend.getScrollOffset();"', ], 'show' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['show'], - 'href' => 'act=show', - 'icon' => 'show.svg' + 'label' => 'show.label', + 'description' => 'show.description', + 'href' => 'act=show', + 'icon' => 'show.svg' ], 'toggle' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['toggle'], + 'label' => 'toggle.label', + 'description' => 'toggle.description', 'icon' => 'visible.svg', 'toggleProperty' => 'published' ] @@ -139,71 +142,78 @@ ], 'fields' => [ 'id' => [ - 'label' => 'id.0', + 'label' => 'id.label', 'sql' => 'int(10) unsigned NOT NULL auto_increment' ], 'pid' => [ - 'label' => 'pid.0', + 'label' => 'pid.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'tstamp' => [ - 'label' => 'tstamp.0', + 'label' => 'tstamp.label', 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'name' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['name'], - 'exclude' => true, - 'search' => true, - 'inputType' => 'text', - 'eval' => [ + 'label' => 'name.label', + 'description' => 'name.description', + 'exclude' => true, + 'search' => true, + 'inputType' => 'text', + 'eval' => [ 'mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50' ], - 'sql' => "varchar(255) NOT NULL default ''" + 'sql' => "varchar(255) NOT NULL default ''" ], 'filter' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['filter'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'filter.label', + 'description' => 'filter.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'includeBlankOption' => true, 'chosen' => true, 'submitOnChange' => true, 'tl_class' => 'clr w50', ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'filterparams' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['filterparams'], - 'exclude' => true, - 'inputType' => 'mm_subdca', - 'eval' => [ + 'label' => 'filterparams.label', + 'description' => 'filterparams.description', + 'exclude' => true, + 'inputType' => 'mm_subdca', + 'eval' => [ 'tl_class' => 'clr m12', 'flagfields' => [ 'use_get' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['filterparams'], - 'inputType' => 'checkbox' + 'label' => 'filterparams.label', + 'description' => 'filterparams.description', + 'inputType' => 'checkbox' ], ], ], - 'sql' => 'longblob NULL' + 'sql' => 'longblob NULL' ], 'rendersetting' => [ - 'label' => &$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['rendersetting'], - 'exclude' => true, - 'inputType' => 'select', - 'eval' => [ + 'label' => 'rendersetting.label', + 'description' => 'rendersetting.description', + 'exclude' => true, + 'inputType' => 'select', + 'eval' => [ 'includeBlankOption' => true, 'mandatory' => true, 'chosen' => true, 'tl_class' => 'w50', ], - 'sql' => "int(10) unsigned NOT NULL default '0'" + 'sql' => "int(10) unsigned NOT NULL default '0'" ], 'published' => [ - 'default' => 1, - 'sql' => "char(1) NOT NULL default '1'" + 'label' => 'published.label', + 'description' => 'published.description', + 'default' => 1, + 'sql' => "char(1) NOT NULL default '1'" ] ] ]; diff --git a/src/CoreBundle/Resources/contao/dca/tl_module.php b/src/CoreBundle/Resources/contao/dca/tl_module.php old mode 100644 new mode 100755 diff --git a/src/CoreBundle/Resources/contao/dca/tl_user_group.php b/src/CoreBundle/Resources/contao/dca/tl_user_group.php index 8e9b389f6..6f29615da 100644 --- a/src/CoreBundle/Resources/contao/dca/tl_user_group.php +++ b/src/CoreBundle/Resources/contao/dca/tl_user_group.php @@ -17,7 +17,18 @@ * @filesource */ -use MetaModels\CoreBundle\Contao\Hooks\FixupUserGroupModules; +use ContaoCommunityAlliance\DcGeneral\Contao\Callback\Callbacks; -$GLOBALS['TL_DCA']['tl_user_group']['fields']['modules']['options_callback'] = - [FixupUserGroupModules::class, 'fixupModules']; +$prefCallback = $GLOBALS['TL_DCA']['tl_user_group']['fields']['alexf']['options_callback'] ?? null; +// Filter all MetaModels tables from user group permissions - only Admins MUST edit MetaModels. +$GLOBALS['TL_DCA']['tl_user_group']['fields']['alexf']['options_callback'] = +static function () use ($prefCallback): array { + $options = (null === $prefCallback) ? [] : Callbacks::call($prefCallback); + foreach (\array_keys($options) as $tableName) { + if (str_starts_with($tableName, 'tl_metamodel')) { + unset($options[$tableName]); + } + } + + return $options; +}; diff --git a/src/CoreBundle/Resources/contao/languages/da/default.php b/src/CoreBundle/Resources/contao/languages/da/default.php deleted file mode 100644 index 76e07c5f2..000000000 --- a/src/CoreBundle/Resources/contao/languages/da/default.php +++ /dev/null @@ -1,80 +0,0 @@ -Hilfe-Website finden Sie als Leitfaden zu MetaModels das Handbuch, alle Support-Kanäle, Videos und unseren Newsletter-Service.


Direkter Link zum MetaModels Handbuch...'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['main_headline'] = 'Bitte unterstützen Sie uns!'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['main_text'] = 'Als Entwickler dieses Projektes erhalten wir keine Vergütung für unsere Arbeit. Ein Großteil unserer wertvollen Zeit widmen wir dem MetaModels-Projekt. Jede Spende an das MetaModels-Projekt würde es uns ermöglichen, während unserer regulären Arbeitszeit an dem Projekt zu arbeiten, was die Entwicklung erheblich beschleunigen würde. Deshalb bitten wir um eine Unterstützung für das MetaModels-Projekt.

Wir garantieren, dass Spendengelder nur für dieses Projekt ausgegeben werden. Sollten Sie spezielle Wünsche oder Anforderungen haben, können Sie gerne ein Mitglied unseres Teamsanfragen, das Ihnen gerne weiterhilft.


Ein großes Dankeschön an alle bestehenden Supporter und Sponsoren. Bitte beachten Sie unsere Spendenseite. Ein solches umfangreiches Open Source Projekt konnten wir ohne die Unterstützung der Community nicht realisieren.

Mehr Infos'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['other_donations'] = 'Für Spenden besuchen Sie auch unsere Fundraisings oder beachten Sie Spenden für das Handbuch.'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['purpose'] = 'Verwendungszweck'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_filter']['0'] = 'Fi'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_filter']['1'] = 'Filtern'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_name']['0'] = 'MM'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_name']['1'] = 'MetaModel'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting']['0'] = 'Rs'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting']['1'] = 'Render-Einstellung'; -$GLOBALS['TL_LANG']['MSC']['noItemsMsg'] = 'Ihre Suche lieferte keine passenden Ergebnisse.'; -$GLOBALS['TL_LANG']['MSC']['no_theme'] = 'Globaler Gültigkeitsbereich '; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['filter']['0'] = 'Filtersets'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['limit']['0'] = 'Limitierung'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['search']['0'] = 'Suche'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['sort']['0'] = 'Sortierung'; -$GLOBALS['TL_LANG']['MSC']['random'] = 'Zufällig'; -$GLOBALS['TL_LANG']['MSC']['template_in_theme'] = '%s (%s)'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clr']['0'] = 'clr'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clr']['1'] = 'Hebt alle Floats auf.'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clx']['0'] = 'clx'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clx']['1'] = 'Entfernt die Voreinstellung "overflow:hidden". Bitte gemeinsam mit "clr" verwenden.'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['long']['0'] = 'long'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['long']['1'] = 'Sorgt dafür, dass das Eingabefeld zwei Spalten umfasst.'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['m12']['0'] = 'm12'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['m12']['1'] = 'Fügt dem Element einen oberen Abstand von 12 Pixeln hinzu (z.B. für einzelne Checkboxen).'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50']['0'] = 'w50'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50']['1'] = 'Setzt die Feldbreite auf 50% und floatet das Element (float:left).'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50x']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50x']['1'] = 'Entfernt die Voreinstellung für eine feste Höhe. Bitte gemeinsam mit "w50" verwenden.'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['wizard']['0'] = 'wizard'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['wizard']['1'] = 'Verkürzt das Eingabefeld, damit genug Platz für den Wizard (z.B. einen Date Picker) ist.'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_add'] = '+'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_remove'] = '-'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['clear_all'] = 'Alle Filter zurücksetzen'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['do_not_filter'] = 'Nicht filtern'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['no_combinations'] = '(Keine passenden Kombinationen gefunden.)'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['select_all'] = 'Alles auswählen'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit'] = 'Filtern'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/explain.php b/src/CoreBundle/Resources/contao/languages/de/explain.php deleted file mode 100644 index 2862d23d5..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/explain.php +++ /dev/null @@ -1,102 +0,0 @@ - - Es ist erforderlich, dass diese Abfrage mindestens eine Spalte mit dem Namen "id" zurückgibt.
- Es ist nicht möglich, Berechnungen aus dem SQL an die Liste zu übergeben.
- Die Deklaration der Spaltennamen sollte mit dem Tabellenalias als Präfix eingegeben werden, z.B. t.name.'; -$GLOBALS['TL_LANG']['XPL']['customsql']['1']['0'] = 'Beispiel 1
Einfache Abfrage'; -$GLOBALS['TL_LANG']['XPL']['customsql']['1']['1'] = '
SELECT t.id FROM mm_mymetamodel AS t WHERE t.page_id=1
- Damit werden alle IDs aus der Tabelle mm_mymetamodel ausgewählt, mit page_id=1 - '; -$GLOBALS['TL_LANG']['XPL']['customsql']['2']['0'] = 'Beispiel 2
Tabellennamen einsetzen'; -$GLOBALS['TL_LANG']['XPL']['customsql']['2']['1'] = '
SELECT t.id FROM {{table}} AS t WHERE t.page_id=1
- Dies ist lediglich dasselbe wie in Beispiel 1, aber der Tabellenname des aktuellen MetaModel - (z.B.: das mm_mymetamodel von oben) wird in die Abfrage eingefügt.'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['0'] = 'Inserttags'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['1'] = 'Insert-Tags werden unterstützt. Bitte beachten, dass nicht alle Tags für alle Ausgaben verfügbar sein können. Falls eine Filtereinstellung wie zum Beispiel {{page::id}} benutzt wird, dann ist der Insert-Tag nur für einen Seitenaufruf im Frontend und nicht für einen RRS-Feed verfügbar.'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['0'] = 'Sichere Inserttags'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['1'] = 'Sichere Insert-Tags funktionieren wie normale Insert-Tags. Allerdings werden die Werte in der Abfrage escaped.
Eine unbedachte Nutzung kann daher zu unerwarteten Ergebnissen führen.
Die Notation für sichere Insert-Tags ist wie folgt:
{{secure::page::id}}
'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['0'] = 'Parameterquellen'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['1'] = 'Parameterquellen sind nach diesem Muster aufgebaut:
{{param::[source]?[query string]}}
Eine Quelle kann bestehen aus
  • get - HTTP GET Query-String
  • post - HTTP POST Feldern
  • session - einem beliebigen Feld aus der Contao-Session
  • filter - einen beliebigen ausgeführten Filterparameter (um Filterparameter zwischen Filtereinstellungen zu teilen).
Der Abfragestring wird wie ein normaler HTTP-Query-String als "name=wert"-Paar aufgebaut kann mit dem Zeichen & kombiniert werden und muss mindestens das Feld \'name\' enthalten. Einer oder mehrere der folgenden optionalen Schlüsselwörter können zusätzlich benutzt werden;
  • default - der zu benutzende Standardwert falls kein anderer zur Verfügung steht
  • aggregate - entweder "list" oder "set"
  • key - auf 1 setzen um den Schlüssel eines Array auszulesen (benötigt "aggregate").
  • recursive - auf 1 setzen um Arrays rekursiv auszulesen (benötigt "aggregate").
'; -$GLOBALS['TL_LANG']['XPL']['customsql']['6']['0'] = 'Beispiel 3
-Komplexe Filter, Parameter und Quellen nutzen'; -$GLOBALS['TL_LANG']['XPL']['customsql']['6']['1'] = '
SELECT t.id
-    FROM {{table}} AS t
-    WHERE t.catname={{param::get?name=category&default=defaultcat}}
-

- Dies ist dasselbe wie in Beispiel 2, aber jetzt verwenden wir einen Parameter aus dem "query"-String. -

-

- bei der Beispiel-URL wie diese: "http://example.org/list/category/demo.html"
- wäre das Query: "SELECT t.id FROM mm_demo AS t WHERE t.catname=\'demo\'" -

-

- Ist die URL: "http://example.org/list.html",
- wäre das Query: "SELECT t.id FROM mm_demo AS t WHERE t.catname=\'defaultcat\'" -

- '; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['0']['0'] = 'Panel-Optionen'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['0']['1'] = 'Fügen Sie eine oder mehrere Panel-Optionen hinzu und trennen Sie diese mit einem Komma (= Freiraum) oder Semikolon (= neue Zeile), z. B. "filter;search;sort,limit".'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['1']['0'] = 'Panel-Optionen zum Kopieren'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['1']['1'] = 'filter;search;sort,limit'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['2']['0'] = 'Filtern'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['2']['1'] = 'Zeige Filter in der Listendarstellung'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['3']['0'] = 'Suche'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['3']['1'] = 'Zeige Suche in der Listendarstellung'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['4']['0'] = 'Sortierung'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['4']['1'] = 'Zeige Sortierung in der Listendarstellung'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['5']['0'] = 'Limit'; -$GLOBALS['TL_LANG']['XPL']['dca_panellayout']['5']['1'] = 'Zeige Limit in der Listendarstellung'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['0']['0'] = 'Eigenschaftswert ist gleich ...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['0']['1'] = 'Die Bedingung ist erfüllt, wenn der Attributwert gleich dem festgelegten Wert ist. Als Attribute können diejenigen mit Einfachauswahl wie z.B. Select oder Checkbox ausgewählt werden.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['1']['0'] = 'Eigenschaftswert beinhaltet ...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['1']['1'] = 'Die Bedingung ist erfüllt, wenn ein beliebiger Attributwert gleich dem jeweils festgelegten Wert ist (Schnittmenge bzw. ODER). Als Attribute können diejenigen mit Mehrfachauswahl wie z.B. Tags ausgewählt werden.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['2']['0'] = 'Eigenschaft ist sichtbar ...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['2']['1'] = 'Die Bedingung ist erfüllt, wenn alle Bedingungen für ein ausgewähltes Attribut erfüllt sind. Mit anderen Worten, das Attribut ist sichtbar, und nur dann, wenn das ausgewählte (oder "referenzierte") Attribut auch sichtbar ist. Mit diesem Bedingungstyp erspart man sich das Duplizieren von erstellten Ansichtsbedingungen eines Attributs.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['0'] = 'ODER'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['1'] = 'Eine beliebige Bedingung muss erfüllt sein.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['4']['0'] = 'UND'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['4']['1'] = 'Alle Bedingungen müssen erfüllt sein.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['5']['0'] = 'NICHT'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['5']['1'] = 'Kehrt das Ergebnis einer vorgegebenen Bedingung um.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['0']['0'] = 'Die CSS-Klasse für das Eingabewidget setzen'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['0']['1'] = 'Legen Sie eine oder mehrere der folgenden CSS-Klassen fest, um das Layout des Widgets wie "clr w50" zu definieren.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['1']['0'] = 'CSS-Klassen zum Kopieren'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['1']['1'] = 'clr clx w50 w50x m12 wizard long'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['0'] = 'clr'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['1'] = 'Hebt alle Floats auf.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['0'] = 'clx'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['1'] = 'Entfernt die Voreinstellung "overflow:hidden". Bitte gemeinsam mit "clr" verwenden.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['0'] = 'w50'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['1'] = 'Setzt die Feldbreite auf 50% und floated links (float:left).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['1'] = 'Entfernt die Voreinstellung für eine feste Höhe. Bitte gemeinsam mit "w50" verwenden.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['0'] = 'm12'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['1'] = 'Fügt dem Element einen oberen Abstand von 12 Pixeln hinzu (z.B. für einzelne Checkboxen).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['0'] = 'wizard'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['1'] = 'Verkürzt das Eingabefeld, damit genug Platz für den Wizard (z.B. einen Date Picker) ist.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['8']['0'] = 'long'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['8']['1'] = 'Setzt das Feld auf 100% Breite.'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/modules.php b/src/CoreBundle/Resources/contao/languages/de/modules.php deleted file mode 100644 index dfd63cf1a..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/modules.php +++ /dev/null @@ -1,25 +0,0 @@ -/orderDir/.html\' oder per GET-Parameter überschrieben werden.'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_sort_param_type']['0'] = 'URL-Typ für Parameter'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_sort_param_type']['1'] = 'Bitte wählen Sie den Typ der URL Parameter als Slug (key/value) oder GET (key=value).'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_sortby']['0'] = 'Sortieren nach'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_sortby']['1'] = 'Bitte wählen Sie eine Reihenfolge für die Sortierung aus.'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_sortby_direction']['0'] = 'Sortierreihenfolge'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_sortby_direction']['1'] = 'In aufsteigender oder absteigender Reihenfolge'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_use_limit']['0'] = 'Offset und Limit für die Auflistung verwenden'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_use_limit']['1'] = 'Auswählen, falls Sie die Anzahl anzuzeigender Items begrenzen möchten. Diese Einstellung ist beipielsweise nützlich, wenn Sie nur die ersten 500 Items anzeigen möchten, oder falls Sie alle Items anzeigen und dabei die ersten 10 überspringen wollen. Eine voreingestellte Paginierung bleibt dabei erhalten.'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_use_parameters']['0'] = 'Parameter aktivieren'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_use_parameters']['1'] = 'Sie können die Parameterliste aktivieren, um Ihre eigenen Parameter einzustellen.'; -$GLOBALS['TL_LANG']['tl_content']['mm_config_legend'] = 'MetaModel-Einstellungen'; -$GLOBALS['TL_LANG']['tl_content']['mm_filter_legend'] = 'MetaModel-Filter'; -$GLOBALS['TL_LANG']['tl_content']['mm_meta_legend'] = 'Suchmaschinen-Optimierung'; -$GLOBALS['TL_LANG']['tl_content']['mm_pagination_legend'] = 'MetaModel Paginierung'; -$GLOBALS['TL_LANG']['tl_content']['mm_parameters_legend'] = 'Parameter-Einstellungen'; -$GLOBALS['TL_LANG']['tl_content']['mm_rendering_legend'] = 'MetaModel Render-Einstellung'; -$GLOBALS['TL_LANG']['tl_content']['mm_sorting_legend'] = 'MetaModel Sortierung'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/tl_form_field.php b/src/CoreBundle/Resources/contao/languages/de/tl_form_field.php deleted file mode 100644 index 504f575ee..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/tl_form_field.php +++ /dev/null @@ -1,28 +0,0 @@ -Hinweis: Diese Option wird automatisch gesetzt, wenn in der Attributkonfiguration "Eindeutige Werte" ausgewählt wurde.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['mandatory_for_unique_attr'] = 'Eindeutige (unique) Attribute sind automatisch Pflichtfelder (Einstellung nicht änderbar).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_langcode'] = 'Sprache'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_value'] = 'Legenden-Titel'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['new']['0'] = 'Neu'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['new']['1'] = 'Neue Einstellung erstellen.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['overview_legend'] = 'Filtern und Suchen in der Backend-Liste'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pasteafter']['0'] = 'Neue Einstellung oben anlegen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pasteafter']['1'] = 'Neue Einstellung nach Element ID %s anlegen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pastenew']['0'] = 'Neue Einstellung oben anlegen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pastenew']['1'] = 'Neues Einstellung nach dem Element ID %s anlegen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['presentation_legend'] = 'Anzeigeoptionen des Widgets'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['preserveTags']['0'] = 'Alle HTML-Tags nicht encodieren'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['preserveTags']['1'] = 'Falls angewählt, werden keine HTML-Tags encodiert.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly']['0'] = 'Nur lesen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly']['1'] = 'Wenn aktiviert, erlaubt das Feld nur das Lesen und kann nicht geändert werden.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly_for_force_alias'] = 'Attribute mit "Neuerstellung erzwingen" sind automatisch "nur lesend" (Einstellung nicht änderbar).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rows']['0'] = 'Zeilen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rows']['1'] = 'Anzahl der Zeilen, die für longtext / table Widget verwendet werden.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rte']['0'] = 'Richtext-Editor aktivieren'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rte']['1'] = 'Wählen Sie eine Voreinstellung für den Richtext-Editor aus, die für dieses Feld benutzt werden soll (falls vorhanden).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['searchable']['0'] = 'Suchbar'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['searchable']['1'] = 'Auswählen, falls dieses Attribut für die Suche im Backend zur Verfügung stehen soll.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['show']['0'] = 'Einstellungsdetails'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['show']['1'] = 'Zeige Details der Einstellung ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['spaceToUnderscore']['0'] = 'Leerzeichen durch Unterstriche ersetzen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['spaceToUnderscore']['1'] = 'Falls diese Option angewählt ist, werden Leerzeichen durch Unterstriche ersetzt.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['submitOnChange']['0'] = 'Absenden bei Änderungen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['submitOnChange']['1'] = 'Wenn aktiv, wird das Formular bei Änderungen eines Feldwertes abgesendet.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['template']['0'] = 'Angepasstes Template für die Ausgabe'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['template']['1'] = 'Wählen Sie das Template aus, das für das gewählte Attribut verwendet werden soll. Gültige Dateinamen für das Template beginnen mit "mm_<typ>", wobei <typ> für den Typ steht.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['title_legend'] = 'Typ'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['tl_class']['0'] = 'Backend-Klasse'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['tl_class']['1'] = 'Hier können Sie eine oder mehrere Backend-Klassen festlegen.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['toggle']['0'] = 'Wechseln'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['toggle']['1'] = 'Umschaltung des Status der Einstellung ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash']['0'] = 'Führende \'/\' bearbeiten'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash']['1'] = 'Hier können Sie angeben, wie führende \'/\' behandelt werden sollen.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['0'] = 'Schrägstrich beim Speichern entfernen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['1'] = 'Schrägstrich beim Speichern hinzufügen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['2'] = 'Nichts tun'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dcasetting_condition.php b/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dcasetting_condition.php deleted file mode 100644 index 633915bcd..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_dcasetting_condition.php +++ /dev/null @@ -1,70 +0,0 @@ -%s
für Attribut %s (Parameter: %s)'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionand'] = '%s %s
alle Bedingungen müssen erfüllt sein.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionnot'] = '%s %s
kehrt das Ergebnis der vorgegebenen Bedingung um.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionor'] = '%s %s
eine beliebige Bedingung muss erfüllt sein.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['value']['0'] = 'Wert'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['value']['1'] = 'Bitte wählen Sie einen eigenen Wert aus.'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_filter.php b/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_filter.php deleted file mode 100644 index ba1f4e4ab..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_filter.php +++ /dev/null @@ -1,35 +0,0 @@ -[%s, "%s"]'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['_comment_'] = '
%s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['_default_'] = '%1$s %2$s%3$s%5$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['_url_'] = ' (URL: %s)'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['conditionand'] = '%1$s %2$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['conditionor'] = '%1$s %2$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['fefilter'] = '%1$s %2$s %3$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['simplelookup'] = '%1$s %2$s%3$s%5$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['conditionand'] = 'UND-Bedingung (AND)'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['conditionor'] = 'ODER-Bedingung (OR)'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['customsql'] = 'Eigenes SQL'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['idlist'] = 'Vordefinierter Satz von Items'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['simplelookup'] = 'Einfache Abfrage'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['urlparam']['0'] = 'URL-Parameter'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['urlparam']['1'] = 'Geben Sie den URL-Parameter an, der dem ausgewählten Attribut zugeordnet werden soll. Der "auto_item"-Parameter kann ebenfalls verwendet werden. Diese Einstellung ist nützlich um Aliase zu verwenden.'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_item.php b/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_item.php deleted file mode 100644 index 0e4bb78e4..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_item.php +++ /dev/null @@ -1,52 +0,0 @@ -%s [%s]'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_activate'] = 'Hinzugefügte Attribute aktivieren.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_addsuccess'] = 'Das Attribut "%s" [%s] wurde der Render-Einstellung hinzugefügt.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_alreadycontained'] = 'Das Attribut "%s" [%s] ist bereits in der Render-Einstellung vorhanden.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_willadd'] = 'Fügt das Attribut "%s" [%s] den Render-Einstellung hinzu.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['0'] = 'Alle hinzufügen'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['1'] = 'Alle Attribute der Render-Einstellung hinzufügen.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['additional_class']['0'] = 'Eigene CSS-Klasse'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['additional_class']['1'] = 'Eingabe einer CSS-Klasse, wenn diese mit dem Attribut ausgegeben werden soll.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['advanced_legend'] = 'Erweitern'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['0'] = 'Attribut'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['1'] = 'Attribut, auf das sich diese Einstellung bezieht.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['copy']['0'] = 'Render-Einstellung kopieren'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['copy']['1'] = 'Kopieren Sie die Render-Einstellung ID %s.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['cut']['0'] = 'Render-Einstellung ausschneiden'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['cut']['1'] = 'Ausschneiden der Render-Einstellung ID %s.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['delete']['0'] = 'Render-Einstellung löschen'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['delete']['1'] = 'Löschen Sie die Render-Einstellung ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['0'] = 'Einstellung bearbeiten'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['1'] = 'Render-Einstellung ID %s bearbeiten.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['0'] = 'Neu'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['1'] = 'Neue Einstellung erstellen.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['pastenew']['0'] = 'Neue Einstellung oben erstellen'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['pastenew']['1'] = 'Neues Einstellung nach Render-Einstellung ID %s anlegen'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['show']['0'] = 'Details der Render-Einstellung'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['show']['1'] = 'Anzeige Details der Render-Einstellung ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['0'] = 'Angepasstes Template für die Ausgabe'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['1'] = 'Wählen Sie das Template aus, das für das gewählte Attribut verwendet werden soll. Gültige Dateinamen für das Template beginnen mit "mm_<typ>", wobei <typ> für den Typ steht.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['title_legend'] = 'Typ'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle']['0'] = 'Wechseln'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle']['1'] = 'Umschaltung des Status für die Render-Einstellung ID %s.'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_rendersettings.php deleted file mode 100644 index bba6b80ea..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/tl_metamodel_rendersettings.php +++ /dev/null @@ -1,75 +0,0 @@ -/orderDir/.html\' oder per GET-Parameter überschrieben werden.'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_sort_param_type']['0'] = 'URL-Typ für Parameter'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_sort_param_type']['1'] = 'Bitte geben Sie den Typ der URL-Parameter als Slug (key/value) oder GET (key=value) an.'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_sortby']['0'] = 'Sortieren nach'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_sortby']['1'] = 'Bitte wählen Sie eine Reihenfolge für die Sortierung aus.'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_sortby_direction']['0'] = 'Sortierreihenfolge'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_sortby_direction']['1'] = 'In aufsteigender oder absteigender Reihenfolge'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_use_limit']['0'] = 'Offset und Limit für die Auflistung verwenden'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_use_limit']['1'] = 'Auswählen, falls Sie die Anzahl anzuzeigender Datensätze begrenzen möchten. Diese Einstellung ist beispielsweise nützlich, wenn Sie nur die ersten 500 Datensätze anzeigen möchten, oder falls Sie alle Datensätze anzeigen und dabei die ersten 10 überspringen wollen. Eine voreingestellte Paginierung bleibt dabei erhalten.'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_use_parameters']['0'] = 'Parameter aktivieren'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_use_parameters']['1'] = 'Sie können die Parameterliste aktivieren, um Ihre eigenen Parameter einzustellen.'; -$GLOBALS['TL_LANG']['tl_module']['mm_config_legend'] = 'MetaModel-Einstellungen'; -$GLOBALS['TL_LANG']['tl_module']['mm_filter_legend'] = 'MetaModel-Filter'; -$GLOBALS['TL_LANG']['tl_module']['mm_meta_legend'] = 'Suchmaschinen-Optimierung'; -$GLOBALS['TL_LANG']['tl_module']['mm_pagination_legend'] = 'MetaModel Paginierung'; -$GLOBALS['TL_LANG']['tl_module']['mm_parameters_legend'] = 'Parameter-Einstellungen'; -$GLOBALS['TL_LANG']['tl_module']['mm_rendering_legend'] = 'MetaModel Render-Einstellung'; -$GLOBALS['TL_LANG']['tl_module']['mm_sorting_legend'] = 'MetaModel Sortierung'; - diff --git a/src/CoreBundle/Resources/contao/languages/de/tl_syncCto_database.php b/src/CoreBundle/Resources/contao/languages/de/tl_syncCto_database.php deleted file mode 100644 index ef6246bd8..000000000 --- a/src/CoreBundle/Resources/contao/languages/de/tl_syncCto_database.php +++ /dev/null @@ -1,23 +0,0 @@ -απλό ερώτημα '; -$GLOBALS['TL_LANG']['XPL']['customsql']['2']['0'] = 'Παραδειγμα 2
εισαγωγη ονοματος ταμπελας'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['0'] = 'Εισαγωγη ετικετων'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['0'] = 'Ασφαλης εισαγωγη ετικετων'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['0'] = 'Πηγες παραμετρων
'; -$GLOBALS['TL_LANG']['XPL']['customsql']['6']['0'] = 'Παραδειγμα 3
χρησιμοποιηση φιλτρων των παραμετρων πηγων'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['0'] = 'OR'; - diff --git a/src/CoreBundle/Resources/contao/languages/el/modules.php b/src/CoreBundle/Resources/contao/languages/el/modules.php deleted file mode 100644 index 437f62dae..000000000 --- a/src/CoreBundle/Resources/contao/languages/el/modules.php +++ /dev/null @@ -1,26 +0,0 @@ -%s [%s]'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['0'] = 'Προσθηκη ολων'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['1'] = ' -Προσθέστε όλα τα χαρακτηριστικά για να καταστήσει τη ρύθμιση '; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['advanced_legend'] = 'Προσαρμογη'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['0'] = ' Χαρακτηριστικο'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['1'] = 'Χαρακτηριστικό που η ρύθμιση αυτή το αφορά.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['0'] = 'Επεξεργασια ρυθμισης'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['0'] = 'Νεος τυπος'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['1'] = 'Δημιουργια νεας ρυθμισης'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['0'] = 'Προσαρμοσμένο πρότυπο που θα χρησιμοποιηθεί για την παραγωγή '; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['1'] = 'Επιλέξτε το πρότυπο που πρέπει να χρησιμοποιηθεί για την επιλεγμένη ιδιότητα. Ισχύει για αρχεία προτύπων αρχίζουν με "mm_<type>" όπου το όνομα του τύπου τίθεται για <type>'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['title_legend'] = 'Τυπος'; - diff --git a/src/CoreBundle/Resources/contao/languages/el/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/languages/el/tl_metamodel_rendersettings.php deleted file mode 100644 index 0160600de..000000000 --- a/src/CoreBundle/Resources/contao/languages/el/tl_metamodel_rendersettings.php +++ /dev/null @@ -1,64 +0,0 @@ - * @author David Molineus * @author Sven Baumann - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ -$GLOBALS['TL_LANG']['CTE']['metamodels'] = 'MetaModel elements'; -$GLOBALS['TL_LANG']['CTE']['metamodel_content'][0] = 'MetaModel list'; -$GLOBALS['TL_LANG']['CTE']['metamodel_content'][1] = +$GLOBALS['TL_LANG']['CTE']['metamodels'] = 'MetaModels elements'; +$GLOBALS['TL_LANG']['CTE']['metamodel_content'][0] = 'MetaModels list'; +$GLOBALS['TL_LANG']['CTE']['metamodel_content'][1] = 'Adds a list of MetaModel items to the article.'; -$GLOBALS['TL_LANG']['CTE']['metamodels_frontendfilter'][0] = 'MetaModel frontend filter'; -$GLOBALS['TL_LANG']['CTE']['metamodels_frontendfilter'][1] = +$GLOBALS['TL_LANG']['CTE']['metamodels_frontendfilter'][0] = 'MetaModels frontend filter'; +$GLOBALS['TL_LANG']['CTE']['metamodels_frontendfilter'][1] = 'Adds a frontend filter for a MetaModel.'; -$GLOBALS['TL_LANG']['CTE']['metamodels_frontendclearall'][0] = 'MetaModel clear all'; -$GLOBALS['TL_LANG']['CTE']['metamodels_frontendclearall'][1] = +$GLOBALS['TL_LANG']['CTE']['metamodels_frontendclearall'][0] = 'MetaModels clear all'; +$GLOBALS['TL_LANG']['CTE']['metamodels_frontendclearall'][1] = 'Adds a clear all for all frontend filter.'; -$GLOBALS['TL_LANG']['MSC']['metamodel_filtersetting']['editRecord'] = - 'Edit filter setting %%s for filter "%s" in MetaModel "%s"'; -$GLOBALS['TL_LANG']['MSC']['metamodel_filtersetting']['label'] = 'Filter "%s" in MetaModel "%s"'; -$GLOBALS['TL_LANG']['MSC']['metamodel_rendersetting']['editRecord'] = - 'Edit attribute setting %%s for render setting "%s" in MetaModel "%s"'; -$GLOBALS['TL_LANG']['MSC']['metamodel_rendersetting']['label'] = - 'Render setting "%s" in MetaModel "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel'] = 'MetaModels'; -$GLOBALS['TL_LANG']['BRD']['metamodel_attribute'] = 'Attributes of "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_rendersettings'] = 'All render setting of "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_rendersetting'] = 'Render settings in "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_dca_sortgroup'] = 'Sorting and grouping in "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_dca'] = 'All input screens of "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_dcasetting'] = 'Input screens in "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_dca_combine'] = - 'Input screen and render setting combination for "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_dcasetting_condition'] = - 'Visibility conditions for attribute "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_filter'] = 'All filter of "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_filtersetting'] = 'Filter settings in "%s"'; -$GLOBALS['TL_LANG']['BRD']['metamodel_searchable_pages'] = 'All indexes of "%s"'; -$GLOBALS['TL_LANG']['MSC']['metamodel_edit_as_child']['label'] = 'Edit "%s" for item %%s'; -$GLOBALS['TL_LANG']['MSC']['metamodels_sorting'] = 'Sorting'; -$GLOBALS['TL_LANG']['MSC']['random'] = 'Random'; -$GLOBALS['TL_LANG']['MSC']['template_in_theme'] = '%s (%s)'; -$GLOBALS['TL_LANG']['MSC']['no_theme'] = 'global scope'; -$GLOBALS['TL_LANG']['MSC']['noItemsMsg'] = - 'There are no items matching your search.'; -$GLOBALS['TL_LANG']['MSC']['details'] = 'Details'; -$GLOBALS['TL_LANG']['MSC']['field_label'] = '%s:'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50'][0] = 'w50'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50'][1] = - 'Set the field width to 50% and float it (float:left).'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50x'][0] = 'w50x'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50x'][1] = - 'Remove only the annoying fixed height, please use it together with "w50".'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clr'][0] = 'clr'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clr'][1] = 'Clear all floats.'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clx'][0] = 'clx'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clx'][1] = - 'Remove only the annoying overflow hidden, please use it together with "clr".'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['m12'][0] = 'm12'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['m12'][1] = - 'Add a 12 pixel top margin to the element (used for single checkboxes).'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['wizard'][0] = 'wizard'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['wizard'][1] = - 'Shorten the input field so there is enough room for the wizard button (e.g. date picker fields).'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['long'][0] = 'long'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['long'][1] = - 'Make the text input field span two columns.'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['search'][0] = 'Search'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['search'][1] = ''; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['sort'][0] = 'Sort'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['sort'][1] = ''; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['filter'][0] = 'Filter'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['filter'][1] = ''; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['limit'][0] = 'Limit'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['limit'][1] = ''; -$GLOBALS['TL_LANG']['ERR']['no_attribute_extension'] = - 'Please install at least one attribute extension! MetaModels without attributes do not make sense.'; -$GLOBALS['TL_LANG']['ERR']['activate_extension'] = - 'Please activate the required extension "%s" (%s)'; -$GLOBALS['TL_LANG']['ERR']['install_extension'] = - 'Please install the required extension "%s" (%s)'; -$GLOBALS['TL_LANG']['ERR']['columnExists'] = - 'There is already an attribute with the given column name.'; -$GLOBALS['TL_LANG']['ERR']['no_palette'] = - 'Attempt to access the MetaModel "%s" without input screen for current user %s.'; -$GLOBALS['TL_LANG']['ERR']['no_view'] = - 'Attempt to access the MetaModel "%s" without view for user %s.'; -$GLOBALS['TL_LANG']['ERR']['invalidTableName'] = 'The table name "%s" is invalid.'; -$GLOBALS['TL_LANG']['ERR']['invalidColumnName'] = - 'The column name "%s" is invalid.'; -$GLOBALS['TL_LANG']['ERR']['systemColumn'] = - 'The column name "%s" is reserved for system use.'; -$GLOBALS['TL_LANG']['ERR']['tableDoesNotExist'] = 'Table "%s" does not exist.'; -$GLOBALS['TL_LANG']['ERR']['tableExists'] = 'Table "%s" already exists.'; -$GLOBALS['TL_LANG']['ERR']['columnDoesNotExist'] = - 'Column "%s" does not exist on table "%s".'; -$GLOBALS['TL_LANG']['ERR']['columnExists'] = - 'Column "%s" already exists on table "%s".'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit'] = 'Filter'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['do_not_filter'] = 'No filtering'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['select_all'] = 'Select all'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['clear_all'] = 'Clear all filter'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_add'] = '+'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_remove'] = '-'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['no_combinations'] = + +$GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit'] = 'Filter'; +$GLOBALS['TL_LANG']['metamodels_frontendfilter']['do_not_filter'] = 'No filtering'; +$GLOBALS['TL_LANG']['metamodels_frontendfilter']['select_all'] = 'Select all'; +$GLOBALS['TL_LANG']['metamodels_frontendfilter']['clear_all'] = 'Clear all filter'; +$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_add'] = '+'; +$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_remove'] = '-'; +$GLOBALS['TL_LANG']['metamodels_frontendfilter']['no_combinations'] = ' (No matching combinations found.)'; -$GLOBALS['TL_LANG']['MSC']['metamodel_filtersettings_parameter']['simplelookup'][0] = 'Filter value for attribute "%s"'; -$GLOBALS['TL_LANG']['MSC']['metamodel_filtersettings_parameter']['simplelookup'][1] = ''; -$GLOBALS['TL_LANG']['MSC']['orderMetaModelListByAscending'] = - 'Sort by %s in ascending order'; -$GLOBALS['TL_LANG']['MSC']['orderMetaModelListByDescending'] = - 'Sort by %s in descending order'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['main_headline'] = 'We are calling for your help!'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['purpose'] = 'Purpose'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['other_donations'] = - 'For donations check also our - - fundraisings or consider - - donating for the manual.'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['contributor_headline'] = - 'Thanks to these users for tickets, suggestions and translations'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_name'][0] = 'MM'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_name'][1] = 'MetaModel'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_filter'][0] = 'Fi'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_filter'][1] = 'Filter'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting'][0] = 'Rs'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting'][1] = 'Rendersetting'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['contributor_link'] = 'See contributors at github...'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['main_text'] = - 'As the developers of this project, we receive no compensation for our work. - Much of our valuable time is freely given to the MetaModels project. Any - donations towards the MetaModels project would allow us to work on the - project during our working hours, speeding up development significantly. -

We guarantee to spend any donations only on this project. - If you have any specific requirements or features requests, you are free - to hire a member from our team, who will gladly - help you.

A big thanks to all our existing supporters and - sponsors. Please consider joining our list of sponsors. We could not - create such a popular open source project without the support of the - community.

More informations'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['help_headline'] = - 'Help for your MetaModels projects'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['help_text'] = - 'On our help - website as guide to MetaModels you can find the manual, all support - channels, videos tutorials and our newsletter service.

- - Direct link to the MetaModels manual...'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['id'] = 'ID'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['pid'] = 'PID'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['sorting'] = 'Sorting'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['tstamp'] = 'Timestamp'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['vargroup'] = 'Vargroup'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['varbase'] = 'Varbase'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['meta'] = 'Metafields'; -$GLOBALS['TL_LANG']['METAMODELS_SYSTEM_COLUMNS']['attributes'] = 'Attributes'; diff --git a/src/CoreBundle/Resources/contao/languages/en/explain.php b/src/CoreBundle/Resources/contao/languages/en/explain.php old mode 100644 new mode 100755 diff --git a/src/CoreBundle/Resources/contao/languages/en/modules.php b/src/CoreBundle/Resources/contao/languages/en/modules.php old mode 100644 new mode 100755 index 7f8c7fcbe..38e3500c7 --- a/src/CoreBundle/Resources/contao/languages/en/modules.php +++ b/src/CoreBundle/Resources/contao/languages/en/modules.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2018 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -14,7 +14,8 @@ * @subpackage Core * @author Christian Schiffler * @author Sven Baumann - * @copyright 2012-2018 The MetaModels team. + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -22,11 +23,6 @@ /** * Back end modules */ -$GLOBALS['TL_LANG']['MOD']['metamodels'][0] = 'MetaModels'; -$GLOBALS['TL_LANG']['MOD']['metamodels'][1] = - 'The MetaModels extension allows you to create own data models.'; -$GLOBALS['TL_LANG']['MOD']['support_metamodels'][0] = 'Support MetaModels'; -$GLOBALS['TL_LANG']['MOD']['support_metamodels'][1] = 'Support information for the MetaModels extension.'; $GLOBALS['TL_LANG']['FMD']['metamodels'][0] = 'MetaModels'; $GLOBALS['TL_LANG']['FMD']['metamodels'][1] = 'The MetaModels extension allows you to create own data models.'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_content.php b/src/CoreBundle/Resources/contao/languages/en/tl_content.php old mode 100644 new mode 100755 index d0c553bde..5ca272516 --- a/src/CoreBundle/Resources/contao/languages/en/tl_content.php +++ b/src/CoreBundle/Resources/contao/languages/en/tl_content.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,7 @@ * @author Christian Schiffler * @author Ingolf Steinhardt * @author Sven Baumann - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -42,7 +42,7 @@ 'Please specify the offset value (i.e. 10 to skip the first 10 items).'; $GLOBALS['TL_LANG']['tl_content']['metamodel_limit'][0] = 'Maximum number of items'; $GLOBALS['TL_LANG']['tl_content']['metamodel_limit'][1] = - 'Please enter the maximum number of items. Enter 0 to show all items and therefore disable the pagination.'; + 'Please enter the maximum number of items - enter 0 to show all items.'; $GLOBALS['TL_LANG']['tl_content']['metamodel_sortby'][0] = 'Order by'; $GLOBALS['TL_LANG']['tl_content']['metamodel_sortby'][1] = 'Please choose the sort order.'; @@ -87,9 +87,9 @@ $GLOBALS['TL_LANG']['tl_content']['metamodel_page_param_type'][0] = 'URL-Type for pagination'; $GLOBALS['TL_LANG']['tl_content']['metamodel_page_param_type'][1] = 'Please specify the type of URL parameters als slug (key/value) or GET (key=value).'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_maxpaginationlinks'][0] = +$GLOBALS['TL_LANG']['tl_content']['metamodel_maxpaginationlinks'][0] = 'Maximum number of pagination links'; -$GLOBALS['TL_LANG']['tl_content']['metamodel_maxpaginationlinks'][1] = +$GLOBALS['TL_LANG']['tl_content']['metamodel_maxpaginationlinks'][1] = 'Please enter the maximum number pagination links. Enter 0 to show the default value from Contao e.g. 7.'; $GLOBALS['TL_LANG']['tl_content']['metamodel_pagination'][0] = 'Custom template to use for pagination'; @@ -116,7 +116,7 @@ $GLOBALS['TL_LANG']['tl_content']['metamodel_fef_id'][1] = 'Set ID as own postfix for "FORM_SUBMIT" value e.g. to use redirect and another filter -' . ' in which case the value must be the same. '; -$GLOBALS['TL_LANG']['tl_content']['metamodel_fef_urlfragment'][0] = 'URL fragment'; +$GLOBALS['TL_LANG']['tl_content']['metamodel_fef_urlfragment'][0] = 'URL fragment'; $GLOBALS['TL_LANG']['tl_content']['metamodel_fef_urlfragment'][1] = 'Add URL fragment to jump to anchor or id.'; $GLOBALS['TL_LANG']['tl_content']['metamodel_fef_params'][0] = 'Attributes'; @@ -154,11 +154,3 @@ $GLOBALS['TL_LANG']['tl_content']['metamodel_meta_description'][0] = 'Meta Description'; $GLOBALS['TL_LANG']['tl_content']['metamodel_meta_description'][1] = 'Set this attribute as the meta-description of the page.'; -$GLOBALS['TL_LANG']['tl_content']['editmetamodel'][0] = 'Edit MetaModel'; -$GLOBALS['TL_LANG']['tl_content']['editmetamodel'][1] = 'Edit the MetaModel ID %s.'; -$GLOBALS['TL_LANG']['tl_content']['editrendersetting'][0] = 'Edit rendersetting'; -$GLOBALS['TL_LANG']['tl_content']['editrendersetting'][1] = - 'Edit the render setting ID %s.'; -$GLOBALS['TL_LANG']['tl_content']['editfiltersetting'][0] = 'Edit filtersetting'; -$GLOBALS['TL_LANG']['tl_content']['editfiltersetting'][1] = - 'Edit the filter setting ID %s.'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_form_field.php b/src/CoreBundle/Resources/contao/languages/en/tl_form_field.php old mode 100644 new mode 100755 diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_maintenance.php b/src/CoreBundle/Resources/contao/languages/en/tl_maintenance.php old mode 100644 new mode 100755 diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel.php deleted file mode 100644 index 68f0edf53..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel.php +++ /dev/null @@ -1,93 +0,0 @@ - - * @author Christian de la Haye - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel']['id'][0] = 'Id'; -$GLOBALS['TL_LANG']['tl_metamodel']['id'][1] = 'Id of the MetaModel'; -$GLOBALS['TL_LANG']['tl_metamodel']['name'][0] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel']['name'][1] = 'MetaModel name.'; -$GLOBALS['TL_LANG']['tl_metamodel']['tstamp'][0] = 'Revision date'; -$GLOBALS['TL_LANG']['tl_metamodel']['tstamp'][1] = 'Date and time of the latest revision'; -$GLOBALS['TL_LANG']['tl_metamodel']['tableName'][0] = 'Table name'; -$GLOBALS['TL_LANG']['tl_metamodel']['tableName'][1] = 'Name of database table to store items to.'; -$GLOBALS['TL_LANG']['tl_metamodel']['mode'][0] = 'Parent list mode'; -$GLOBALS['TL_LANG']['tl_metamodel']['mode'][1] = 'Mode to use for parent/child relationship.'; -$GLOBALS['TL_LANG']['tl_metamodel']['translated'][0] = 'Translation'; -$GLOBALS['TL_LANG']['tl_metamodel']['translated'][1] = - 'Check if this MetaModel shall support translation/multilingualism.'; -$GLOBALS['TL_LANG']['tl_metamodel']['languages'][0] = 'Languages to provide for translation'; -$GLOBALS['TL_LANG']['tl_metamodel']['languages'][1] = - 'Specify all languages that shall be available for translation.'; -$GLOBALS['TL_LANG']['tl_metamodel']['languages_langcode'][0] = 'Language'; -$GLOBALS['TL_LANG']['tl_metamodel']['languages_langcode'][1] = 'Select the languages you want to provide.'; -$GLOBALS['TL_LANG']['tl_metamodel']['languages_isfallback'][0] = 'Fallback language'; -$GLOBALS['TL_LANG']['tl_metamodel']['languages_isfallback'][1] = 'Check the language that shall be used as fallback.'; -$GLOBALS['TL_LANG']['tl_metamodel']['varsupport'][0] = 'Variant support'; -$GLOBALS['TL_LANG']['tl_metamodel']['varsupport'][1] = - 'Check if this MetaModel shall support variants of items.'; -$GLOBALS['TL_LANG']['tl_metamodel']['localeterritorysupport'][0] = 'Locale territory support'; -$GLOBALS['TL_LANG']['tl_metamodel']['localeterritorysupport'][1] = - 'Check if this MetaModel shall support language territory at locale.'; -$GLOBALS['TL_LANG']['tl_metamodel']['sorting'][0] = 'Sorting'; -$GLOBALS['TL_LANG']['tl_metamodel']['sorting'][1] = 'Sorting order of items.'; -$GLOBALS['TL_LANG']['tl_metamodel']['title_legend'] = 'Name and table'; -$GLOBALS['TL_LANG']['tl_metamodel']['translated_legend'] = 'Translation'; -$GLOBALS['TL_LANG']['tl_metamodel']['advanced_legend'] = 'Advanced settings'; -$GLOBALS['TL_LANG']['tl_metamodel']['new'][0] = 'New MetaModel'; -$GLOBALS['TL_LANG']['tl_metamodel']['new'][1] = 'Create a new MetaModel.'; -$GLOBALS['TL_LANG']['tl_metamodel']['edit'][0] = 'Manage items'; -$GLOBALS['TL_LANG']['tl_metamodel']['edit'][1] = 'Manage items of MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['copy'][0] = 'Copy MetaModel definition'; -$GLOBALS['TL_LANG']['tl_metamodel']['copy'][1] = 'Copy definition of MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['delete'][0] = 'Delete MetaModel'; -$GLOBALS['TL_LANG']['tl_metamodel']['delete'][1] = 'Delete MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['show'][0] = 'MetaModel details'; -$GLOBALS['TL_LANG']['tl_metamodel']['show'][1] = 'Show details of MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['editheader'][0] = 'Edit MetaModel'; -$GLOBALS['TL_LANG']['tl_metamodel']['editheader'][1] = 'Edit the MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['fields'][0] = 'Define attributes'; -$GLOBALS['TL_LANG']['tl_metamodel']['fields'][1] = 'Define attributes for MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['filter'][0] = 'Define filters'; -$GLOBALS['TL_LANG']['tl_metamodel']['filter'][1] = 'Define filters for MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['rendersettings'][0] = 'Define render settings'; -$GLOBALS['TL_LANG']['tl_metamodel']['rendersettings'][1] = 'Define render settings for MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['dca'][0] = 'Define input screens'; -$GLOBALS['TL_LANG']['tl_metamodel']['dca'][1] = 'Define input screens for MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['dca_combine'][0] = 'Define input/output combinations'; -$GLOBALS['TL_LANG']['tl_metamodel']['dca_combine'][1] = - 'Define input/output combinations for MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['cut'][0] = 'Move MetaModel'; -$GLOBALS['TL_LANG']['tl_metamodel']['cut'][1] = 'Define the order of your MetaModels.'; -$GLOBALS['TL_LANG']['tl_metamodel']['searchable_pages'][0] = 'Define search settings'; -$GLOBALS['TL_LANG']['tl_metamodel']['searchable_pages'][1] = 'Define search settings for MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['pastenew'][0] = 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel']['pastenew'][1] = 'Add new after MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['pasteafter'][0] = 'Create new MetaModel'; -$GLOBALS['TL_LANG']['tl_metamodel']['pasteafter'][1] = 'Create new after MetaModel ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel']['itemFormatCount']['0'] = '%s items'; -$GLOBALS['TL_LANG']['tl_metamodel']['itemFormatCount']['1'] = '%s item'; -$GLOBALS['TL_LANG']['tl_metamodel']['itemFormatCount']['2:'] = '%s items'; -$GLOBALS['TL_LANG']['tl_metamodel']['deleteConfirm'] = 'Do you really want to delete MetaModel ID %s?'; - -$GLOBALS['TL_LANG']['tl_metamodel']['hint_schema_manager'] = - 'After creating an model, the database must be migrated (console, Contao Manager) -' . - ' even if the table name is changed. When changing the table name, the user data itself must be transferred.'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_attribute.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_attribute.php deleted file mode 100644 index 88ab281c7..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_attribute.php +++ /dev/null @@ -1,73 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['type'][0] = 'Attribute type'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['type'][1] = - 'Select the type of this attribute. ' . - 'WARNING: if you change this, all existing data within this attribute will be deleted.'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['name'][0] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['name'][1] = 'Human readable name'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['description'][0] = 'Description'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['description'][1] = 'Human readable description'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['colname'][0] = 'Column name'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['colname'][1] = - 'Internal reference name for this attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['isvariant'][0] = 'Enable variant override'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['isvariant'][1] = - 'Check this, if you want variants within the MetaModel to override the parent item\'s value'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['isunique'][0] = 'Unique values'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['isunique'][1] = - 'Check this, if you want to ensure that each value only occurs once'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['name_langcode'] = 'Language'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['name_value'] = 'Description'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['title_legend'] = - 'Type, naming and base attribute configuration'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['advanced_legend'] = 'Advanced settings'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['new'][0] = 'New attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['new'][1] = 'Create new attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['pastenew'][0] = 'New attribute after this Attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['pastenew'][1] = 'New attribute after this Attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['edit'][0] = 'Edit attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['edit'][1] = 'Edit attribute ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['cut'][0] = 'Cut attribute definition'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['cut'][1] = 'Cut definition of attribute ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['copy'][0] = 'Copy attribute definition'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['copy'][1] = 'Copy definition of attribute ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['delete'][0] = 'Delete attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['delete'][1] = 'Delete attribute ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['show'][0] = 'Attribute details'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['show'][1] = 'Show details of attribute ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['editheader'][0] = 'Edit attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['editheader'][1] = 'Edit the attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['pastenew'][0] = 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['pastenew'][1] = 'Add new after attribute ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['pasteafter'][0] = 'Create new attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['pasteafter'][1] = 'Create new after attribute ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['error_unknown_attribute'][0] = 'Unknown attribute!'; -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['error_unknown_attribute'][1] = - 'Extension missing? The attribute type "%s" is not installed.'; - -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['deleteConfirm'] = 'Do you really want to delete attribute ID %s?'; - -$GLOBALS['TL_LANG']['tl_metamodel_attribute']['hint_schema_manager'] = - 'After creating an attribute, the database must be migrated (console, Contao Manager) -' . - ' even if the column name is changed. When changing the column name, the user data itself must be transferred.'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca.php deleted file mode 100644 index 3f9a4d42f..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca.php +++ /dev/null @@ -1,106 +0,0 @@ - - * @author Ingolf Steinhardt - * @author Sven Baumann - * @copyright 2012-2023 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_dca']['name'][0] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['name'][1] = 'Name of the input screen.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['tstamp'][0] = 'Revision date'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['tstamp'][1] = 'Date and time of the latest revision.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendertype'][0] = 'Integration'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendertype'][1] = 'Select the desired type of integration.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendermode'][0] = 'Render mode'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendermode'][1] = 'Select the desired render mode.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['ptable'][0] = 'Parent table name'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['ptable'][1] = - 'Name of the database table that shall be referred to as parent table.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['showColumns'][0] = 'Use column based layout'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['showColumns'][1] = - 'If selected a table header will be generated with column names.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendsection'][0] = 'Backend section'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendsection'][1] = - 'Select the desired backend section where you want the MetaModel appear. ' . - 'For models that shall be edited by end users, the "content" section most likely will be appropriate.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendicon'][0] = 'Backend icon'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendicon'][1] = - 'Select the desired backend icon.' . - 'This icon will get used to draw an image in the parent list if you have a integration as child table.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendcaption'][0] = 'Backend caption'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['backendcaption'][1] = - 'The text you specify in here, will get used as the label and description text in the backend menu.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_langcode'][0] = 'Language'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_langcode'][1] = 'Select the languages you want to provide.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_label'][0] = 'Label text'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_label'][1] = - 'The text you specify in here, will get used as the menu label in the backend menu.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_description'][0] = 'Description text'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['becap_description'][1] = - 'The text you specify in here, will get used as the description (hover title) in the backend menu.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['panelLayout'][0] = 'Panel layout'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['panelLayout'][1] = - 'Separate panel options with comma (= space) and semicolon (= new line) like "filter;search;sort,limit".'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['panelpicker'] = 'Panelpicker'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['use_limitview'][0] = 'View limitation'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['use_limitview'][1] = 'Activate the view limitation.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['limit_rendersetting'][0] = 'Limit the render setting'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['limit_rendersetting'][1] = 'Choose between front end or backend.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['iseditable'][0] = 'Allow editing of items'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['iseditable'][1] = - 'If checked, this input screen allows the editing of items.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['iscreatable'][0] = 'Allow creating of items'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['iscreatable'][1] = - 'If checked, this input screen allows the creating of items.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['isdeleteable'][0] = 'Allow deleting of items'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['isdeleteable'][1] = - 'If checked, this input screen allows the deleting of items.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['title_legend'] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['view_legend'] = 'View settings'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['backend_legend'] = 'Backend integration'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['display_legend'] = 'Data display settings'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['permissions_legend'] = 'Data manipulation permissions'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['new'][0] = 'New input screen'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['new'][1] = 'Create new input screen'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['edit'][0] = 'Edit input screen'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['edit'][1] = 'Edit the input screen ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['copy'][0] = 'Copy input screen definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['copy'][1] = 'Copy definition of input screen ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['delete'][0] = 'Delete input screen'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['delete'][1] = 'Delete input screen ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['show'][0] = 'Input screen details'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['show'][1] = 'Show details of input screen ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['settings'][0] = 'Input screen settings'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['settings'][1] = 'Edit the settings of input screen ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['groupsort_settings'][0] = 'Grouping and sorting'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['groupsort_settings'][1] = - 'Edit the grouping and sorting settings of input screen ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['subheadline'][0] = 'Additions to the mask-heading'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['subheadline'][1] = - 'The field can be used to adapt the heading of the mask at edit and replaces the output of the ID.' . - 'You can use simple tokens e.g. ##model_name##, ##model_firstname## [##model_id##]'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendertypes']['standalone'] = 'Standalone'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendertypes']['ctable'] = 'As child table'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendermodes']['flat'] = 'Flat'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendermodes']['parented'] = 'Parented'; -$GLOBALS['TL_LANG']['tl_metamodel_dca']['rendermodes']['hierarchical'] = 'Hierarchical'; - -$GLOBALS['TL_LANG']['tl_metamodel_dca']['hint_rendermode_hierarchical'] = - 'When using the "Hierarchical" render mode, the current sort must be enable to "Manual sorting" as default.'; - -$GLOBALS['TL_LANG']['tl_metamodel_dca']['deleteConfirm'] = 'Do you really want to delete input screen ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_combine.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_combine.php deleted file mode 100644 index 2f611a1b5..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_combine.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['dca_combiner_legend'] = 'Combination configuration'; - -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['dca_combiner'][0] = 'Permissions for input screen and views'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['dca_combiner'][1] = - 'For selected frontend user group (if any) and selected backend user group (if any) use the selected palette and ' . - 'the selected view.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['fe_group'][0] = 'Frontend group'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['fe_group'][1] = - 'The frontend user group the combination applies to; * is \'catch all\'.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['be_group'][0] = 'Backend group'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['be_group'][1] = - 'The backend user group the combination applies to; * is \'catch all\'.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['dca_id'][0] = 'The input screen'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['dca_id'][1] = 'The input screen the combination applies to.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['view_id'][0] = 'The render setting'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['view_id'][1] = 'The view the combination applies to.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['sysadmin'] = 'Administrator'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_combine']['anonymous'] = 'Anonymous'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_sortgroup.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_sortgroup.php deleted file mode 100644 index 83f33b642..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dca_sortgroup.php +++ /dev/null @@ -1,90 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['name'][0] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['name'][1] = 'Name of the sorting group.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['tstamp'][0] = 'Revision date'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['tstamp'][1] = - 'Date and time of the latest revision.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['isdefault'][0] = 'Is default'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['isdefault'][1] = - 'Determines that this input screen shall be used as default for the parenting MetaModel.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendermode'][0] = 'Render mode'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendermode'][1] = 'Select the desired render mode.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['becap_langcode'][0] = 'Language'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['becap_langcode'][1] = - 'Select the languages you want to provide.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['becap_label'][0] = 'Label text'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['becap_label'][1] = - 'The text you specify in here, will get used as the menu label in the backend menu.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['becap_description'][0] = 'Description text'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['becap_description'][1] = - 'The text you specify in here, will get used as the description (hover title) in the backend menu.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptype'][0] = 'Grouping type'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptype'][1] = - 'The grouping type to use in the item view.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergroupattr'][0] = 'Grouping attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergroupattr'][1] = - 'The attribute to use for grouping in the item view.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouplen'][0] = 'Grouping length'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouplen'][1] = - 'The amount of characters to use for grouping.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersortattr'][0] = 'Sorting attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersortattr'][1] = 'The attribute to sort by.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersort'][0] = 'Sorting direction'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersort'][1] = 'The sorting direction.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['ismanualsort'][0] = 'Enable manual sorting'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['ismanualsort'][1] = - 'If this is enabled, the user will be able to perform manual sorting.'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['title_legend'] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['display_legend'] = 'Data display settings'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['new'][0] = 'New definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['new'][1] = 'Create new definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['edit'][0] = 'Edit definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['edit'][1] = 'Edit the definition ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['copy'][0] = 'Copy definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['copy'][1] = 'Copy the definition ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['delete'][0] = 'Delete definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['delete'][1] = 'Delete the definition ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['show'][0] = 'Definition details'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['show'][1] = 'Show details of definition ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['toggle'][0] = 'Toggle'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['toggle'][1] = - 'Toggle the state of definition ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['settings'][0] = 'Definition settings'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['settings'][1] = - 'Edit the settings of definition ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['none'] = 'Do not group '; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['char'] = 'Group by initial letter(s)'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['digit'] = 'Group by numeric order'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['day'] = 'Group by day of date'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['weekday'] = 'Group by weekday of date'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['week'] = 'Group by week of year'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['month'] = 'Group by month of date'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendergrouptypes']['year'] = 'Group by year of date'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersortdirections']['asc'] = 'Ascending'; -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['rendersortdirections']['desc'] = 'Descending'; - -$GLOBALS['TL_LANG']['tl_metamodel_dca_sortgroup']['deleteConfirm'] = 'Do you really want to delete definition ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting.php deleted file mode 100644 index ca0a9afe9..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting.php +++ /dev/null @@ -1,145 +0,0 @@ - - * @author Cliff Parnitzky - * @author Ingolf Steinhardt - * @author Sven Baumann - * @copyright 2012-2023 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -/** - * Fields - */ - -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['dcatype'][0] = 'Type'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['dcatype'][1] = 'Select the attribute type.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['attr_id'][0] = 'Attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['attr_id'][1] = 'Attribute this setting relates to.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['template'][0] = 'Custom template to use for generating'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['template'][1] = - 'Select the template that shall be used for the selected attribute. ' . - 'Valid template files start with "mm_<type>" where the type name is put for <type>'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['tl_class'][0] = 'Backend class'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['tl_class'][1] = - 'Here you can set backend class(es). Open the wizard for an overview of the classes.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['be_template'][0] = 'Template at backend'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['be_template'][1] = - 'You can chose own template for widget in backend - add file in root folder of template.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['legendhide'][0] = 'Collapse section'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['legendhide'][1] = 'Collapse the section by default.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['legendtitle'][0] = 'Legend title'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['legendtitle'][1] = 'Here you can enter the legend title.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_langcode'] = 'Language'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_value'] = 'Legend title'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['mandatory'][0] = 'Mandatory'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['mandatory'][1] = 'Check if this attribute shall be ' . - 'mandatory. -
NOTE: This will be implicitely active on if you selected "Unique values" in the attribute configuration.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['alwaysSave'][0] = 'Always save'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['alwaysSave'][1] = - 'If true the field will always be saved, even if its value has not changed.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['chosen'][0] = 'Chosen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['chosen'][1] = 'Enable Chosen graphical select widget.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['filterable'][0] = 'Filterable'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['filterable'][1] = - 'Check if this attribute shall be available for backend filtering.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['searchable'][0] = 'Searchable'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['searchable'][1] = - 'Check if this attribute shall be available for backend search.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['allowHtml'][0] = 'Do not encode allowed html tags.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['allowHtml'][1] = - 'If you select this, allowed HTML tags from system settings will not be encoded.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['preserveTags'][0] = 'Do not encode all html tags.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['preserveTags'][1] = - 'If you select this, no HTML tags will be encoded.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['decodeEntities'][0] = 'Decode HTML entities.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['decodeEntities'][1] = - 'If you select this, all HTML entities will be decoded. Note that HTML entities are always decoded if "Do not encode allowed html tags" is true.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rte'][0] = 'Enable richtext editor on this'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rte'][1] = - 'Select the rich text configuration that shall be used on this field (if any).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rows'][0] = 'Rows'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rows'][1] = - 'Amount of rows to use for longtext/table widget.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['cols'][0] = 'Columns'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['cols'][1] = - 'Amount of colums to use for longtext/table widget'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash'][0] = 'Trailing slash handling'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash'][1] = - 'Here you can specify how trailing slashes shall be handled'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['spaceToUnderscore'][0] = 'Replace spaces with underscore'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['spaceToUnderscore'][1] = - 'If true any whitespace character will be replaced by an underscore.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['includeBlankOption'][0] = 'Include blank option'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['includeBlankOption'][1] = - 'if true a blank option will be added to the options which allows to define a "no item selected" option.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly'][0] = 'Read only'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly'][1] = - 'If true a the widget will be read only and may not be changed.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['submitOnChange'][0] = 'Submit on change'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['submitOnChange'][1] = - 'If active the form will be submitted when the field value changes.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['title_legend'] = 'Type'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['presentation_legend'] = 'Widget appearance related options'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['functions_legend'] = 'Functionality related options'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['overview_legend'] = - 'Filtering and searching in the backend list'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['backend_legend'] = 'Backend'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['config_legend'] = 'Configuration'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['advanced_legend'] = 'Advanced'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['new'][0] = 'New'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['new'][1] = 'Create new setting.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['edit'][0] = 'Edit setting'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['edit'][1] = 'Edit the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['cut'][0] = 'Cut setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['cut'][1] = 'Cut the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['copy'][0] = 'Copy setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['copy'][1] = 'Copy the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['delete'][0] = 'Delete setting'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['delete'][1] = 'Delete the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['conditions'][0] = 'Manage visibility conditions'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['conditions'][1] = - 'Manage the visibility conditions of property ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['show'][0] = 'Setting details'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['show'][1] = 'Show details of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['toggle'][0] = 'Toggle'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['toggle'][1] = 'Toggle the state of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addall'][0] = 'Add all'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addall'][1] = 'Add all attributes to input screen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pastenew'][0] = 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pastenew'][1] = 'Add new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pasteafter'][0] = 'Create new setting at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pasteafter'][1] = 'Create new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['dcatypes']['legend'] = 'Legend'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['dcatypes']['attribute'] = 'Attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['0'] = 'Strip slash on save'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['1'] = 'Add slash on save'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['2'] = 'Do nothing'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addAll_willadd'] = - 'Will add the attribute "%s" [%s, "%s"] to the input screen.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addAll_alreadycontained'] = - 'Attribute "%s" [%s, "%s"] is already contained in input screen.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addAll_addsuccess'] = - 'Added the attribute "%s" [%s, "%s"] to the input screen.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addAll_activate'] = 'Add new settings enabled.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['addAll_tlclass'] = 'Set backend class.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['mandatory_for_unique_attr'] = - 'Unique attribues are automatically mandatory (this is not changable).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly_for_force_alias'] = - 'Attribues with force alias are automatically readonly (this is not changable).'; - -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['deleteConfirm'] = 'Do you really want to delete setting ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting_condition.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting_condition.php deleted file mode 100644 index 703ed8719..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_dcasetting_condition.php +++ /dev/null @@ -1,110 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -/** - * Legends - */ -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['list_label'] = - 'Visibility conditons'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['basic_legend'] = - 'Basic configuration'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['config_legend'] = - 'Condition configuration'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['type'][0] = 'Type'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['type'][1] = - 'Select the condition type.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['enabled'][0] = 'Enabled'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['enabled'][1] = - 'Check to enable this condition.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['comment'][0] = 'Comment'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['comment'][1] = - 'Enter a comment to describe the purpose of this condition.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['attr_id'][0] = - 'Attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['attr_id'][1] = - 'Select the attribute to use for this condition.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['value'][0] = 'Value'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['value'][1] = - 'Please select the desired value.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['new'][0] = 'New'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['new'][1] = - 'Create new setting.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['edit'][0] = - 'Edit setting'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['edit'][1] = - 'Edit the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['cut'][0] = - 'Cut setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['cut'][1] = - 'Cut the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['copy'][0] = - 'Copy setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['copy'][1] = - 'Copy the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['delete'][0] = - 'Delete setting'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['delete'][1] = - 'Delete the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditions'][0] = - 'Manage conditions'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditions'][1] = - 'Manage the conditions of property ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['show'][0] = - 'Setting details'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['show'][1] = - 'Show details of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['toggle'][0] = 'Toggle'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['toggle'][1] = - 'Toggle the state of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['addall'][0] = 'Add all'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['addall'][1] = - 'Add all attributes to input screen'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['pastenew'][0] = - 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['pastenew'][1] = - 'Add new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['pasteafter'][1] = - 'Create new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['pasteinto'][0] = - 'Create new setting at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['pasteinto'][1] = - 'Create new at the top of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditionnames']['conditionpropertyvalueis'] = - 'Attribute value is...'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditionnames']['conditionpropertycontainanyof'] = - 'Attribute values contain any of...'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditionnames']['conditionpropertyvisible'] = - 'Is attribute visible...'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditionnames']['conditionor'] = 'OR'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditionnames']['conditionand'] = 'AND'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['conditionnames']['conditionnot'] = 'NOT'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['_default_'] = - '%s %s
for attribute %s (Parameter: %s)'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionor'] = - '%s %s
any sub conditions must be fulfilled'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionand'] = - '%s %s
all sub conditions must be fulfilled'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionnot'] = - '%s %s
invert the result of the contained condition'; - -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['deleteConfirm'] = - 'Do you really want to delete setting ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filter.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filter.php deleted file mode 100644 index 3ae002946..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filter.php +++ /dev/null @@ -1,45 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_filter']['name'][0] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['name'][1] = 'Filter setting name.'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['tstamp'][0] = 'Revision date'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['tstamp'][1] = 'Date and time of the latest revision.'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['title_legend'] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['pastenew'][0] = 'New'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['pastenew'][1] = 'Create a new filter setting'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['editheader'][0] = 'Edit'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['editheader'][1] = 'Edit MetaModel'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['new'][0] = 'New'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['new'][1] = 'Create new filter setting'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['edit'][0] = 'Edit setting'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['edit'][1] = 'Edit the filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['copy'][0] = 'Copy filter setting'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['copy'][1] = 'Copy the filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['delete'][0] = 'Delete filter setting'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['delete'][1] = 'Delete the filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['show'][0] = 'Filter setting details'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['show'][1] = 'Show details of filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['settings'][0] = 'Define attribute settings'; -$GLOBALS['TL_LANG']['tl_metamodel_filter']['settings'][1] = 'Define attribute settings for filter setting ID %s'; - -$GLOBALS['TL_LANG']['tl_metamodel_filter']['deleteConfirm'] = 'Do you really want to delete filter setting ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filtersetting.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filtersetting.php deleted file mode 100644 index dcc972a7d..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_filtersetting.php +++ /dev/null @@ -1,157 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -/** - * Fields - */ -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['list_label'] = 'Filter settings'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['fid'][0] = 'Parent collection'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['fid'][1] = - 'The collection of filter settings, this setting belongs to.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['type'][0] = 'Type'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['type'][1] = 'The type of this setting.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['enabled'][0] = 'Enabled'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['enabled'][1] = 'Enable this filter setting.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['comment'][0] = 'Comment'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['comment'][1] = - 'A short comment for describing the purpose of this filter setting.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['attr_id'][0] = 'Attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['attr_id'][1] = - 'Attribute this setting relates to.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['all_langs'][0] = 'Search all languages'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['all_langs'][1] = - 'Check if you want to perform the lookup language independant. ' . - 'If this is not checked, only the current active language will be searched.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['allow_empty'][0] = 'Allow empty value'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['allow_empty'][1] = - 'Check if you want to allow this filter value to be emtpy, if checked and the parameter holds an empty value, ' . - 'this filter rule will behave as if it was not defined.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['stop_after_match'][0] = 'Stop after first match'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['stop_after_match'][1] = - 'Check if you want this filter setting to stop executing its child rules after the first subset returned matches.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['urlparam'][0] = 'URL parameter'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['urlparam'][1] = - 'The URL parameter that shall get mapped to the selected attribute. ' . - 'The special "auto_item" parameter can also be used, this is especially useful for alias columns.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['predef_param'][0] = 'Static parameter'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['predef_param'][1] = - 'Check if you want to be able to set the value of this parameter in the parenting list ' . - '(modules, content elements, etc.).'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['fe_widget'][0] = 'Provide Frontend widget'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['fe_widget'][1] = - 'Check if you want to display a filter widget in the Frontend.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['customsql'][0] = 'Custom SQL Query'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['customsql'][1] = - 'The SQL query that shall be executed, insert tags are supported.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['label'][0] = 'Label'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['label'][1] = - 'Show label instead of attribute name.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['template'][0] = 'Template'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['template'][1] = - 'Sub template for this filter element. Standard: form widget.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['blankoption'][0] = 'Empty option'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['blankoption'][1] = - 'Show empty options in filter widget.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['onlyused'][0] = 'Assigned values only'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['onlyused'][1] = - 'Show only options, that are assigned somewhere in the MetaModel.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['onlypossible'][0] = 'Remaining values only'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['onlypossible'][1] = - 'Show only options, that are still assigned somewhere after the actual filter is set.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['skipfilteroptions'][0] = - 'Ignore this filter for the remaining values'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['skipfilteroptions'][1] = - 'If activate the filter will return all options without itself in the filter rules.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['hide_label'][0] = - 'Hide label in filter widget'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['hide_label'][1] = - 'If active, the label is not output.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['label_as_blankoption'][0] = - 'Use label as blank option'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['label_as_blankoption'][1] = - 'If active, the label output as blank option.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['apply_sorting'][0] = 'Sorting'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['apply_sorting'][1] = - 'Please enter sorting of values in filter widget.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['cssID'][0] = 'CSS ID/class'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['cssID'][1] = - 'Here you can set an ID and one or more classes.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['placeholder'][0] = 'Placeholder'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['placeholder'][1] = - 'Show this text as long as the field is empty.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['sorting_directions']['natsort_asc'] = 'Natural sorting (ASC)'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['sorting_directions']['natsort_desc'] = 'Natural sorting (DESC)'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['defaultid'][0] = 'Default'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['defaultid'][1] = - 'Default value for selection.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['title_legend'] = 'Type'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['config_legend'] = 'Configuration'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['fefilter_legend'] = 'Frontend filter'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['new'][0] = 'New'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['new'][1] = 'Create new setting.'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['edit'][0] = 'Edit setting'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['edit'][1] = 'Edit the filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['copy'][0] = - 'Copy filter setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['copy'][1] = 'Copy the filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['cut'][0] = - 'Cut filter setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['cut'][1] = 'Cut the filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['delete'][0] = 'Delete filter setting'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['delete'][1] = 'Delete the filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['show'][0] = 'Filter setting details'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['show'][1] = - 'Show details of filter setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['toggle'][0] = 'Toggle'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['toggle'][1] = 'Toggle the state of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['pastenew'][0] = 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['pastenew'][1] = 'Add new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['pasteafter'][1] = - 'Create new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['pasteinto'][0] = - 'Create new setting at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['pasteinto'][1] = - 'Create new at the top of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['idlist'] = 'Predefined set of items'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['simplelookup'] = 'Simple lookup'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['customsql'] = 'Custom SQL'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['conditionor'] = 'OR condition'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typenames']['conditionand'] = 'AND condition'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['_attribute_'] = ' [%s, "%s"]'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['_url_'] = ' (URL: %s)'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['_comment_'] = '
%s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['_default_'] = - '%1$s %2$s%3$s%5$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['simplelookup'] = - '%1$s %2$s%3$s%5$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['fefilter'] = - '%1$s %2$s %3$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['conditionor'] = - '%1$s %2$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['typedesc']['conditionand'] = - '%1$s %2$s%4$s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['items'][0] = 'Items'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['items'][1] = - 'Please enter the IDs of the items for filtering as comma-separated list.'; - -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['deleteConfirm'] = - 'Do you really want to delete filter setting ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_item.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_item.php deleted file mode 100644 index e060cca8f..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_item.php +++ /dev/null @@ -1,57 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_item']['new'][0] = 'New item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['new'][1] = 'Create new item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['edit'][0] = 'Edit item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['edit'][1] = 'Edit item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['copy'][0] = 'Copy item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['copy'][1] = 'Copy item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['createvariant'][0] = 'New variant'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['createvariant'][1] = 'Create a new variant of item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['cut'][0] = 'Move item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['cut'][1] = 'Move item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['delete'][0] = 'Delete item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['delete'][1] = 'Delete item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['show'][0] = 'Item details'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['show'][1] = 'Show details of item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['editheader'][0] = 'Edit item type'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['editheader'][1] = 'Edit the item type'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pasteafter'][0] = 'Create new item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pasteafter'][1] = 'Create a new item after item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pasteinto'][0] = 'Create new item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pasteinto'][1] = 'Create a new item in item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pastenew'][0] = 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pastenew'][1] = 'Add new item after item ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['varbase'][0] = 'Is variant base'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['varbase'][1] = - 'Check this if you want to make this the base for the current variant group'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['editRecord'] = 'Edit item %s'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['newRecord'] = 'Create a new item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['sorting'][0] = 'Sorting'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['sorting'][1] = 'The manual sorting'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['id'][0] = 'ID of the item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['id'][1] = 'The id of the item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pid'][0] = 'Parent item id'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['pid'][1] = 'The id of the parent item'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['tstamp'][0] = 'Revision date'; -$GLOBALS['TL_LANG']['tl_metamodel_item']['tstamp'][1] = 'The date when the item revision was created'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersetting.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersetting.php deleted file mode 100644 index ced2a7268..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersetting.php +++ /dev/null @@ -1,63 +0,0 @@ - - * @author Sven Baumann - * @author Ingolf Steinhardt - * @copyright 2012-2022 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id'][0] = 'Attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id'][1] = 'Attribute this setting relates to.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template'][0] = 'Custom template to use for generating'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template'][1] = - 'Select the template that shall be used for the selected attribute. ' . - 'Valid template files start with "mm_<type>" where the type name is put for <type>'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['additional_class'][0] = 'Custom CSS class'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['additional_class'][1] = - 'Enter any CSS classes that you want get added to the output of this attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['title_legend'] = 'Type'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['advanced_legend'] = 'Advanced'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new'][0] = 'New'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new'][1] = 'Create new setting'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit'][0] = 'Edit setting'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit'][1] = 'Edit render setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['cut'][0] = 'Cut render setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['cut'][1] = 'Cut the render setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['copy'][0] = 'Copy render setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['copy'][1] = 'Copy the render setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['delete'][0] = 'Delete render setting'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['delete'][1] = 'Delete the render setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['show'][0] = 'Render setting details'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['show'][1] = 'Show details of render setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle'][0] = 'Toggle'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle'][1] = - 'Toggle the state of render setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall'][0] = 'Add all'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall'][1] = 'Add all attributes to render setting'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['pastenew'][0] = 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['pastenew'][1] = 'Add new after render setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_filtersetting']['row'] = '%s %s [%s]'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_willadd'] = - 'Will add attribute "%s" [%s] to rendersetting.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_alreadycontained'] = - 'Attribute "%s" [%s] already in rendersetting.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_addsuccess'] = - 'Added attribute "%s" [%s] to rendersetting.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_activate'] = 'Add new settings enabled.'; - -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['deleteConfirm'] = - 'Do you really want to render filter setting ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersettings.php deleted file mode 100644 index d9f247b07..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_rendersettings.php +++ /dev/null @@ -1,85 +0,0 @@ - - * @author Ingolf Steinhardt - * @author Sven Baumann - * @copyright 2012-2022 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['title_legend'] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['general_legend'] = 'General settings'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['expert_legend'] = 'Expert settings'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpto_legend'] = 'Frontend jump-to settings'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['additional_legend'] = 'Additional files'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['name'][0] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['name'][1] = 'Setting name.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['template'][0] = 'Template'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['template'][1] = - 'The template to use to render the items.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['format'][0] = 'Output format'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['format'][1] = - 'Define the output format. Leave empty to use the format used by current page.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['formatOptions']['html5'] = 'HTML5'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['formatOptions']['text'] = 'Text'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo'][0] = 'JumpTo page'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo'][1] = - 'The page that shall be used as "show details" urls. Note that the detailed URL params will get generated by the ' . - 'filter setting that is currently in use.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_allLanguages'] = 'All languages'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_language'][0] = 'Language'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_language'][1] = 'The language for the jump to page.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_page'][0] = 'Jump to page'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_page'][1] = 'The page to use for detail links.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_filter'][0] = 'Filter settings'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['jumpTo_filter'][1] = - 'The filter settings that define how the target (the reader/lister on the detail page) will filter the items.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['hideEmptyValues'][0] = 'Hide empty values'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['hideEmptyValues'][1] = - 'Hide empty values in backend and frontend.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['hideLabels'][0] = 'Hide labels'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['hideLabels'][1] = - 'Hide all labels in backend and frontend.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['additionalCss'][0] = 'Additional css files'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['additionalCss'][1] = - 'Choose this, if you want to include additional css files.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['additionalJs'][0] = 'Additional javascript files'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['additionalJs'][1] = - 'Choose this, if you want to include additional javascript files.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['file'] = 'File'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['publish'] = 'Publish'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['new'][0] = 'New'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['new'][1] = 'Create new setting'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['edit'][0] = 'Edit setting'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['edit'][1] = 'Edit the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['copy'][0] = 'Copy setting definition'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['copy'][1] = 'Copy the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['delete'][0] = 'Delete setting'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['delete'][1] = 'Delete the setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['show'][0] = 'Filter details'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['show'][1] = 'Show details of setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['settings'][0] = 'Define attribute settings'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['settings'][1] = - 'Define attribute settings for setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['pastenew'][0] = 'Add new at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['pastenew'][1] = 'Add new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['pasteafter'][0] = 'Create new setting at the top'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['pasteafter'][1] = 'Create new after setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['error_unknown_id'] = 'unknown ID: %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['error_unknown_attribute'] = 'unknown attribute'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['error_unknown_column'] = 'unknown column'; - -$GLOBALS['TL_LANG']['tl_metamodel_rendersettings']['deleteConfirm'] = 'Do you really want to render setting ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_searchable_pages.php b/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_searchable_pages.php deleted file mode 100644 index 3faeef908..000000000 --- a/src/CoreBundle/Resources/contao/languages/en/tl_metamodel_searchable_pages.php +++ /dev/null @@ -1,58 +0,0 @@ - - * @author Tim Becker - * @author Ingolf Steinhardt - * @author Sven Baumann - * @copyright 2012-2018 The MetaModels team. - * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later - * @filesource - */ - -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['name'][0] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['name'][1] = 'Name of the searchable page setting'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['tstamp'][0] = 'Revision date'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['tstamp'][1] = 'Date and time of the latest revision.'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['rendersetting'][0] = 'Rendersetting'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['rendersetting'][1] = - 'Choose the rendersetting which will be used for the search rendering.'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['filter'][0] = 'Filtersetting'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['filter'][1] = - 'Choose the filtersetting which will be used for the search rendering.'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['filterparams'][0] = 'Filter parameter override'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['filterparams'][1] = 'Filter parameter override'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['title_legend'] = 'Name'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['general_legend'] = 'General settings'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['new'][0] = 'New searchable page'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['new'][1] = 'Create new searchable page setting'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['edit'][0] = 'Edit searchable page'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['edit'][1] = 'Edit the searchable page setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['copy'][0] = 'Copy searchable page'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['copy'][1] = - 'Copy definition of searchable page setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['delete'][0] = 'Delete searchable page'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['delete'][1] = 'Delete searchable page setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['show'][0] = 'Searchable page setting details'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['show'][1] = - 'Show details of searchable page setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['toggle'][0] = 'Toggle'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['toggle'][1] = - 'Toggle the state of searchable page setting ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['settings'][0] = 'Searchable page settings'; -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['settings'][1] = - 'Edit the settings of searchable page setting ID %s'; - -$GLOBALS['TL_LANG']['tl_metamodel_searchable_pages']['deleteConfirm'] = - 'Do you really want to searchable page setting ID %s?'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_module.php b/src/CoreBundle/Resources/contao/languages/en/tl_module.php old mode 100644 new mode 100755 index abceb32d3..0caf3b184 --- a/src/CoreBundle/Resources/contao/languages/en/tl_module.php +++ b/src/CoreBundle/Resources/contao/languages/en/tl_module.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,7 @@ * @author Christian Schiffler * @author Sven Baumann * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -41,7 +41,7 @@ 'Please specify the offset value (i.e. 10 to skip the first 10 items).'; $GLOBALS['TL_LANG']['tl_module']['metamodel_limit'][0] = 'Maximum number of items'; $GLOBALS['TL_LANG']['tl_module']['metamodel_limit'][1] = - 'Please enter the maximum number of items. Enter 0 to show all items and therefore disable the pagination.'; + 'Please enter the maximum number of items - enter 0 to show all items.'; $GLOBALS['TL_LANG']['tl_module']['metamodel_sortby'][0] = 'Order by'; $GLOBALS['TL_LANG']['tl_module']['metamodel_sortby'][1] = 'Please choose the sort order.'; $GLOBALS['TL_LANG']['tl_module']['metamodel_sortby_direction'][0] = 'Order by direction'; @@ -84,9 +84,9 @@ $GLOBALS['TL_LANG']['tl_module']['metamodel_page_param_type'][0] = 'URL-Type for pagination'; $GLOBALS['TL_LANG']['tl_module']['metamodel_page_param_type'][1] = 'Please specify the type of URL parameters als slug (key\value) or GET (key=value).'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_maxpaginationlinks'][0] = +$GLOBALS['TL_LANG']['tl_module']['metamodel_maxpaginationlinks'][0] = 'Maximum number of pagination links'; -$GLOBALS['TL_LANG']['tl_module']['metamodel_maxpaginationlinks'][1] = +$GLOBALS['TL_LANG']['tl_module']['metamodel_maxpaginationlinks'][1] = 'Please enter the maximum number pagination links. Enter 0 to show the default value from Contao e.g. 7.'; $GLOBALS['TL_LANG']['tl_module']['metamodel_pagination'][0] = 'Custom template to use for pagination'; @@ -149,9 +149,3 @@ $GLOBALS['TL_LANG']['tl_module']['metamodel_meta_description'][0] = 'Meta Description'; $GLOBALS['TL_LANG']['tl_module']['metamodel_meta_description'][1] = 'Set this attribute as the meta-description of the page.'; -$GLOBALS['TL_LANG']['tl_module']['editmetamodel'][0] = 'Edit MetaModel'; -$GLOBALS['TL_LANG']['tl_module']['editmetamodel'][1] = 'Edit the MetaModel ID %s.'; -$GLOBALS['TL_LANG']['tl_module']['editrendersetting'][0] = 'Edit render setting'; -$GLOBALS['TL_LANG']['tl_module']['editrendersetting'][1] = 'Edit the render setting ID %s.'; -$GLOBALS['TL_LANG']['tl_module']['editfiltersetting'][0] = 'Edit filter setting'; -$GLOBALS['TL_LANG']['tl_module']['editfiltersetting'][1] = 'Edit the filter setting ID %s.'; diff --git a/src/CoreBundle/Resources/contao/languages/en/tl_syncCto_database.php b/src/CoreBundle/Resources/contao/languages/en/tl_syncCto_database.php old mode 100644 new mode 100755 diff --git a/src/CoreBundle/Resources/contao/languages/et/default.php b/src/CoreBundle/Resources/contao/languages/et/default.php deleted file mode 100644 index e0669a075..000000000 --- a/src/CoreBundle/Resources/contao/languages/et/default.php +++ /dev/null @@ -1,62 +0,0 @@ -lihtne päring'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['0'] = 'Sisesta silte'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['0']['0'] = 'Omaduse väärtus on...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['2']['0'] = 'Kas omadus on nähtav...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['0'] = 'VÕI'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['4']['0'] = 'JA'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['5']['0'] = 'EI'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['0'] = 'clr'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['0'] = 'clx'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['0'] = 'w50'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['0'] = 'm12'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['0'] = 'juhendaja'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['8']['0'] = 'Pikk'; - diff --git a/src/CoreBundle/Resources/contao/languages/et/modules.php b/src/CoreBundle/Resources/contao/languages/et/modules.php deleted file mode 100644 index 8bfe53a98..000000000 --- a/src/CoreBundle/Resources/contao/languages/et/modules.php +++ /dev/null @@ -1,19 +0,0 @@ -requête plaine'; -$GLOBALS['TL_LANG']['XPL']['customsql']['2']['0'] = 'Example 2
insert tablename'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['0'] = 'Balises d\'insertion'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['0'] = 'Sécuriser les balises'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['0'] = 'Source des paramètres
'; -$GLOBALS['TL_LANG']['XPL']['customsql']['6']['0'] = 'Example 3
Utilise des sources de paramètres de filtre complexe'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['0'] = 'OR'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['0'] = 'clr'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['1'] = 'Effacer tous les flottants'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['0'] = 'clx'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['1'] = 'Enlever seulement le débordement caché ennuyeux, à utiliser avec "clr".'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['0'] = 'w50'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['1'] = 'Définir la largeur du champ à 50% et son type de flottant (float:left).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['1'] = 'Retirer seulement la hauteur fixe ennuyeuse, à utiliser avec "w50".'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['0'] = 'm12'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['1'] = 'Ajoute 12 pixels à la marge haute de l\'élément (utilisé pour les cases à cocher simples).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['0'] = 'wizard'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['1'] = 'Raccourcir le champ de saisie de sorte qu\'il y ait assez de place pour le bouton Assistant (ex : champ sélecteur de date).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['8']['0'] = 'long'; - diff --git a/src/CoreBundle/Resources/contao/languages/fr/modules.php b/src/CoreBundle/Resources/contao/languages/fr/modules.php deleted file mode 100644 index 8a2bb18e0..000000000 --- a/src/CoreBundle/Resources/contao/languages/fr/modules.php +++ /dev/null @@ -1,25 +0,0 @@ -"auto_item" peut aussi être utilisé, spécialement pour les alias de colonnes.'; - diff --git a/src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_item.php b/src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_item.php deleted file mode 100644 index 854d39d51..000000000 --- a/src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_item.php +++ /dev/null @@ -1,46 +0,0 @@ -%s [%s]'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['0'] = 'Ajouter tout'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['1'] = 'Ajouter tout les attributs au paramètre de rendu'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['advanced_legend'] = 'Avancé'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['0'] = 'Attribut'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['1'] = 'l\'attribut auquel ce paramètre se réfère.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['0'] = 'Éditer le paramètre'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['0'] = 'Nouveau'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['1'] = 'Créer nouveau paramètre'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['0'] = 'Modèle personnalisé à utiliser pour la production'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['1'] = 'Sélectionner le modèle qui doit être utilisé pour l\'attribut sélectionné. les fichiers modèle valides commencent par "mm_<type>" où le nom type est mis pour <type>'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['title_legend'] = 'Type'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle']['0'] = 'Basculer'; - diff --git a/src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_rendersettings.php deleted file mode 100644 index 9a3529884..000000000 --- a/src/CoreBundle/Resources/contao/languages/fr/tl_metamodel_rendersettings.php +++ /dev/null @@ -1,65 +0,0 @@ -query semplice'; -$GLOBALS['TL_LANG']['XPL']['customsql']['2']['0'] = 'Esempio 2
Riferimento nome tabella'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['0'] = 'Insert tags'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['0'] = 'Secure insert tags'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['0'] = 'Sorgente dei parametri'; -$GLOBALS['TL_LANG']['XPL']['customsql']['6']['0'] = 'Esempio 3
Utilizzo di filtri di sorgenti parametri complessi '; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['0'] = 'OR'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['0'] = 'clr'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['1'] = 'Elimina tutti i floats.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['0'] = 'clx'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['1'] = 'Rimuove solo l\'overflow hidden fastidioso. Si prega di utilizzare insieme con "clr".'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['0'] = 'w50'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['1'] = 'Imposta la larghezza del campo al 50% e con float (float:left)'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['1'] = 'Rimuove solo l\'altezza fissa fastidiosa. Si prega di utilizzare insieme con "w50".'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['0'] = 'm12'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['1'] = 'Aggiungi 12 pixel al top margin dell\'elemento (utilizzato per i checkbox singoli)'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['0'] = 'assistente'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['1'] = 'Accorciare il campo di input per permettere di avere un pulsante di aiuto sul campo (esempio nei campi data per far comparire il calendario)'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['8']['0'] = 'lungo'; - diff --git a/src/CoreBundle/Resources/contao/languages/it/modules.php b/src/CoreBundle/Resources/contao/languages/it/modules.php deleted file mode 100644 index cb9b5cea1..000000000 --- a/src/CoreBundle/Resources/contao/languages/it/modules.php +++ /dev/null @@ -1,25 +0,0 @@ -"auto_item" può essere utilizzato, questo è particolarmente utile come alias delle colonne.'; - diff --git a/src/CoreBundle/Resources/contao/languages/it/tl_metamodel_item.php b/src/CoreBundle/Resources/contao/languages/it/tl_metamodel_item.php deleted file mode 100644 index 76163960c..000000000 --- a/src/CoreBundle/Resources/contao/languages/it/tl_metamodel_item.php +++ /dev/null @@ -1,46 +0,0 @@ -%s [%s]'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['0'] = 'Aggiungi tutti'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['1'] = 'Aggiungi tutti gli attributi nelle impostazioni del render'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['advanced_legend'] = 'Avanzato'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['0'] = 'Attributo'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['1'] = 'Attributo a cui questa impostazione si riferisce.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['0'] = 'Modifica l\'impostazione'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['0'] = 'Nuovo'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['1'] = 'Crea una nuova impostazione'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['0'] = 'Template personalizzato da utilizzare per la generazione'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['1'] = 'Selezionare il template che deve essere utilizzato per l\'attributo selezionato. Il nome del template deve iniziare con "mm_<type>" dove il nome del tipo deve essere inserito al posto di <type>'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['title_legend'] = 'Tipo'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle']['0'] = 'Toggle'; - diff --git a/src/CoreBundle/Resources/contao/languages/it/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/languages/it/tl_metamodel_rendersettings.php deleted file mode 100644 index 5c9667f2c..000000000 --- a/src/CoreBundle/Resources/contao/languages/it/tl_metamodel_rendersettings.php +++ /dev/null @@ -1,65 +0,0 @@ -dumonda simpla'; -$GLOBALS['TL_LANG']['XPL']['customsql']['2']['0'] = 'Exempel 2
inserir num da tabella'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['0'] = 'Insert-tags'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['0'] = 'Insert-tags segirs'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['0'] = 'Funtaunas da parameters
'; -$GLOBALS['TL_LANG']['XPL']['customsql']['6']['0'] = 'Exempel 3
utilisar funtaunas da parameters cumplexas'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['0'] = 'OR'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['0'] = 'clr'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['1'] = 'Annular tut ils floats.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['0'] = 'clx'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['1'] = 'Allontanar l\'overflow zuppentà mulestus. Utilisar ensemen cun "clr".'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['0'] = 'w50'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['1'] = 'Definir la ladezza dal champ a 50% e laschar circumdar (float:left).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['1'] = 'Allontanar la autezza fixa mulestusa. Utilisar ensemen cun "w50".'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['0'] = 'm12'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['1'] = 'Agiuntar sura a l\'element in ur da 12 pixels (vegn utilisà per chaschettas da controlla singulas).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['0'] = 'assistent'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['1'] = 'Scursanir il champ d\'endataziun per ch\'i haja avunda plaz per in buttun d\'assistenza (p.ex. champs da tscherner la data).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['8']['0'] = 'long'; - diff --git a/src/CoreBundle/Resources/contao/languages/rm/modules.php b/src/CoreBundle/Resources/contao/languages/rm/modules.php deleted file mode 100644 index 0a8eed86a..000000000 --- a/src/CoreBundle/Resources/contao/languages/rm/modules.php +++ /dev/null @@ -1,26 +0,0 @@ -"auto_item" po era vegnir utilisà, quai è specialmain practic per colonnas dad alias.'; - diff --git a/src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_item.php b/src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_item.php deleted file mode 100644 index d626876ee..000000000 --- a/src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_item.php +++ /dev/null @@ -1,46 +0,0 @@ -%s [%s]'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['0'] = 'Agiuntar tuts'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['1'] = 'Agiuntar tut ils attributs a la configuraziun da visualisar'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['advanced_legend'] = 'Avanzà'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['0'] = 'Attribut'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['1'] = 'Attribut che vegn definì da questa configuraziun.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['0'] = 'Modifitgar la configuraziun'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['0'] = 'Nov'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['1'] = 'Crear ina nova configuraziun'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['0'] = 'Template persunalisà per generar'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['1'] = 'Tscherna il template che duai vegnir utilisà per l\'attribut tschernì. Datotecas da template validas cumenzan cun "mm_<type>", e <type> stat per il tip.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['title_legend'] = 'Tip'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle']['0'] = 'Activar/deactivar'; - diff --git a/src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_rendersettings.php deleted file mode 100644 index 34911d36e..000000000 --- a/src/CoreBundle/Resources/contao/languages/rm/tl_metamodel_rendersettings.php +++ /dev/null @@ -1,65 +0,0 @@ - веб-сайте - в разделе "Помощь" в качестве справочника по MetaModels - вы можете найти руководство, все каналы поддержки, - видеоуроки и нашу рассылку новостей.

- - Прямая ссылка на руководство MetaModels...'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['main_headline'] = 'Мы просим оказать нам помощь!'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['main_text'] = 'Как разработчики этого проекта, мы не получаем никакой компенсации - за нашу работу. Значительная часть нашего ценного свободного - времени предоставляется проекту MetaModels. Любые пожертвования - на проект MetaModels позволят нам работать над проектом в рабочее - время, значительно ускоряя разработку. -

Мы гарантируем, что потратим любые пожертвования - только на этот проект. Если у вас есть какие-либо конкретные - требования или пожелания, вы можете нанять члена - нашей команды, который с радостью поможет вам.

  - Большое спасибо всем нашим существующим сторонникам и - спонсорам.. Пожалуйста, подумайте о присоединении к нашему - списку спонсоров. Мы не смогли бы создать такой популярный проект - с открытым исходным кодом без поддержки сообщества.

- Больше информации'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['other_donations'] = 'Для пожертвований проверьте также наш - - поиск финансирования или рассмотрите - - пожертвование для авторов.'; -$GLOBALS['TL_LANG']['MSC']['metamodels_support']['purpose'] = 'Цель'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_filter']['0'] = 'Фи'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_filter']['1'] = 'Фильтр'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_name']['0'] = 'MM'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_name']['1'] = 'MetaModel'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting']['0'] = 'Нв'; -$GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting']['1'] = 'Настройка визуализации'; -$GLOBALS['TL_LANG']['MSC']['noItemsMsg'] = 'Нет элементов, соответствующих вашему запросу.'; -$GLOBALS['TL_LANG']['MSC']['no_theme'] = 'global scope'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['filter']['0'] = 'Фильтр'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['limit']['0'] = 'Лимит'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['search']['0'] = 'Поиск'; -$GLOBALS['TL_LANG']['MSC']['panelLayout']['sort']['0'] = 'Сортировка'; -$GLOBALS['TL_LANG']['MSC']['random'] = 'Случайный'; -$GLOBALS['TL_LANG']['MSC']['template_in_theme'] = '%s (%s)'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clr']['0'] = 'clr'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clr']['1'] = 'Очистить все floats.'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clx']['0'] = 'clx'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['clx']['1'] = 'Чтобы удалить только раздражающее переполнение, используйте его вместе с «clr».'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['long']['0'] = 'длинный'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['long']['1'] = 'Сделать поле ввода текста двумя столбцами.'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['m12']['0'] = 'm12'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['m12']['1'] = 'Добавьте верхний край 12 пикселей к элементу (используется для отдельных флажков).'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50']['0'] = 'w50'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50']['1'] = 'Установите ширину поля на 50% и поместите ее (float: left).'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50x']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['w50x']['1'] = 'Чтобы удалить только раздражающую фиксированную высоту, используйте ее вместе с «w50».'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['wizard']['0'] = 'мастер'; -$GLOBALS['TL_LANG']['MSC']['tl_class']['wizard']['1'] = 'Сократите поле ввода, чтобы было достаточно места для кнопки мастера (например, поля выбора даты).'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_add'] = '+'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['action_remove'] = '-'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['clear_all'] = 'Очистить все фильтры'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['do_not_filter'] = 'Без фильтрации'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['no_combinations'] = '(Комбинаций соответствия не найдено.)'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['select_all'] = 'Выбрать все'; -$GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit'] = 'Фильтр'; - diff --git a/src/CoreBundle/Resources/contao/languages/ru/explain.php b/src/CoreBundle/Resources/contao/languages/ru/explain.php deleted file mode 100644 index b59647516..000000000 --- a/src/CoreBundle/Resources/contao/languages/ru/explain.php +++ /dev/null @@ -1,85 +0,0 @@ -простой запрос'; -$GLOBALS['TL_LANG']['XPL']['customsql']['2']['0'] = 'Пример 2
вставка имени таблицы'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['0'] = 'Вставка тегов'; -$GLOBALS['TL_LANG']['XPL']['customsql']['3']['1'] = 'Вставка тегов поддерживается, но имейте в виду, что не все теги могут - быть доступны когда используется параметр фильтра - (например, {{page::id}} доступен только при использовании - с передней страницы, а не из RSS-каналов).'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['0'] = 'Безопасная вставка тегов'; -$GLOBALS['TL_LANG']['XPL']['customsql']['4']['1'] = 'Безопасные теги вставки похожи на теги простой вставки, но их значение ускользает в запросе.
- Поэтому, возможно, вам лучше использовать безопасный эквивалент, если вы точно не знаете, что делаете.
- Обозначения: -
{{secure::page::id}}
'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['0'] = 'Параметр источников'; -$GLOBALS['TL_LANG']['XPL']['customsql']['5']['1'] = 'Источники параметров имеют нормальную компоновку: -
{{param::[source]?[query string]}}
- Где источником может быть любой из: -
    -
  • get - строка запроса HTTP GET
  • -
  • post - HTTP POST поля
  • -
  • cookie - HTTP COOKIE значения
  • -
  • session - любое поле в the Contao сессии
  • -
  • filter - любой из переданных параметров фильтра (для обмена параметрами между настройками фильтра).
  • -
  • container - имя вызываемой службы в контейнере службы MetaModels (для этого требуется дополнительное PHP-кодирование с вашей стороны).
  • -
- Строка запроса построена как обычная строка запроса HTTP как пары «имя = значение», которые объединены с помощью символа & char и должны содержать по крайней мере поле «имя». - Можно использовать одну или несколько следующих дополнительных клавиш: -
    -
  • default - значение по умолчанию для использования, если нет доступного значения.
  • -
  • aggregate - либо «список», либо «набор».
  • -
  • key - установить 1, чтобы прочитать ключ массивов (требуется совокупность с «set»).
  • -
  • recursive - устанавливается в 1 для чтения рекурсивных массивов (требуется совокупность с «set»).
  • -
  • service - имя службы для извлечения (требуется источник «service»).
  • -
- '; -$GLOBALS['TL_LANG']['XPL']['customsql']['6']['0'] = 'Пример 3
использовать сложный фильтр параметров источников'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['0']['0'] = 'Значение атрибута...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['0']['1'] = 'Условие выполняется, когда значение атрибута равно заданному значению.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['1']['0'] = 'Значения атрибута содержат любое из...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['1']['1'] = 'Условие выполняется, когда любое из значений атрибута соответствует хотя бы одному из указанных значений (установить пересечение).'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['2']['0'] = 'Является ли атрибут видимым...'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['2']['1'] = 'Условие выполняется, когда выполняется условие указанного атрибута. Другими словами, атрибут отображается, если и только если указанный атрибут также виден.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['0'] = 'ИЛИ'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['3']['1'] = 'Любое дополнительное условие должно быть выполнено.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['4']['0'] = 'И'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['4']['1'] = 'Все вспомогательные условия должны быть выполнены.'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['5']['0'] = 'НЕ'; -$GLOBALS['TL_LANG']['XPL']['dcasetting_condition']['5']['1'] = 'Инвертировать результат содержащегося условия.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['0'] = 'clr'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['2']['1'] = 'Очистить все floats.'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['0'] = 'clx'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['3']['1'] = 'Чтобы удалить только раздражающее переполнение, используйте его вместе с «clr».'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['0'] = 'w50'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['4']['1'] = 'Установите ширину поля на 50% и поместите ее (float: left).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['0'] = 'w50x'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['5']['1'] = 'Чтобы удалить только раздражающую фиксированную высоту, используйте ее вместе с «w50».'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['0'] = 'm12'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['6']['1'] = 'Добавьте верхний край 12 пикселей к элементу (используется для отдельных флажков).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['0'] = 'мастер'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['7']['1'] = 'Сократите поле ввода, чтобы было достаточно места для кнопки мастера (например, поля выбора даты).'; -$GLOBALS['TL_LANG']['XPL']['tl_class']['8']['0'] = 'длинный'; - diff --git a/src/CoreBundle/Resources/contao/languages/ru/modules.php b/src/CoreBundle/Resources/contao/languages/ru/modules.php deleted file mode 100644 index 9035f46aa..000000000 --- a/src/CoreBundle/Resources/contao/languages/ru/modules.php +++ /dev/null @@ -1,26 +0,0 @@ -ПРИМЕЧАНИЕ: Это будет неявно активным, если вы выбрали «Уникальные значения» в конфигурации атрибута.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['mandatory_for_unique_attr'] = 'Уникальные атрибуты автоматически обязательны (это невозможно изменить).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_langcode'] = 'Язык'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['name_value'] = 'Название легенды'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['new']['0'] = 'Новый'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['new']['1'] = 'Создать новую настройку'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pasteafter']['0'] = 'Создать новую настройку сверху'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pasteafter']['1'] = 'Создать новый после настройки ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pastenew']['0'] = 'Добавить новый сверху'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['pastenew']['1'] = 'Добавить новый после настройки ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['presentation_legend'] = 'Связанные параметры внешнего вида виджета'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['preserveTags']['0'] = 'Не кодировать все теги html.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['preserveTags']['1'] = 'Если вы выберете это, HTML-теги не будут закодированы.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly']['0'] = 'Только чтение'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly']['1'] = 'Если истина, виджет будет доступен только для чтения и не может быть изменен.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['readonly_for_force_alias'] = 'Атрибуты с принудительным псевдонимом автоматически считываются (это невозможно изменить).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rows']['0'] = 'Строки'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rows']['1'] = 'Количество строк для виджета longtext/table.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rte']['0'] = 'Включить редактор расширенного текста'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['rte']['1'] = 'Выберите конфигурацию расширенного текста, которая будет использоваться в этом поле (если есть).'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['searchable']['0'] = 'Поисковый'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['searchable']['1'] = 'Выберите, если этот атрибут должен быть доступен для поиска в панели управления.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['show']['0'] = 'Детали настроек'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['show']['1'] = 'Показать детали настроек ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['spaceToUnderscore']['0'] = 'Заменять пробелы на подчеркивания'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['spaceToUnderscore']['1'] = 'Если истина, любой пробел будет заменен подчеркиванием.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['submitOnChange']['0'] = 'Отправить по изменению'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['submitOnChange']['1'] = 'Если активно, форма будет отправлена ​​при изменении значения поля.'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['template']['0'] = 'Пользовательские шаблоны для генерации'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['template']['1'] = 'Выберите шаблон, который должен использоваться для выбранного атрибута. Названия шаблонов начинаются с "mm_<type>", где название типа ставится для <type>'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['title_legend'] = 'Тип'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['tl_class']['0'] = 'Класс панели управления'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['toggle']['0'] = 'Переключить'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['toggle']['1'] = 'Переключить состояние настройки ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash']['0'] = 'Обработка замыкающего слеша'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash']['1'] = 'Здесь вы можете указать, как обрабатывать конечные слеши'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['0'] = 'Сбросить косую черту при сохранении'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['1'] = 'Добавить косую черту при сохранении'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting']['trailingSlash_options']['2'] = 'Ничего не делать'; - diff --git a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dcasetting_condition.php b/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dcasetting_condition.php deleted file mode 100644 index de055910b..000000000 --- a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_dcasetting_condition.php +++ /dev/null @@ -1,59 +0,0 @@ -%s
для атрибута %s (Параметр: %s)'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionand'] = '%s %s
все вспомогательные условия должны быть выполнены'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionnot'] = '%s %s
инвертировать результат содержащегося условия'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['typedesc']['conditionor'] = '%s %sлюбые условия должны быть выполнены'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['value']['0'] = 'Значение'; -$GLOBALS['TL_LANG']['tl_metamodel_dcasetting_condition']['value']['1'] = 'Выберите нужное значение.'; - diff --git a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_filter.php b/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_filter.php deleted file mode 100644 index 8a107a3bb..000000000 --- a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_filter.php +++ /dev/null @@ -1,35 +0,0 @@ -"auto_item", что особенно полезно для столбцов псевдонимов.'; - diff --git a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_item.php b/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_item.php deleted file mode 100644 index 769878dd6..000000000 --- a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_item.php +++ /dev/null @@ -1,52 +0,0 @@ -%s [%s]'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addAll_activate'] = 'Добавить новые настройки.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['0'] = 'Добавить все'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['addall']['1'] = 'Добавить все атрибуты к настройкам визуализации'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['additional_class']['0'] = 'Пользовательский CSS-класс'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['additional_class']['1'] = 'Введите все классы CSS, которые вы хотите добавить в вывод этого атрибута'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['advanced_legend'] = 'Дополнительно'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['0'] = 'Атрибут'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['attr_id']['1'] = 'Атрибут этой настройки относится к.'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['copy']['0'] = 'Копировать настройки визуализации определения'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['copy']['1'] = 'Копировать настройки визуализации ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['cut']['0'] = 'Вырезать настройки визуализации определения'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['cut']['1'] = 'Вырезать настройки визуализации ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['delete']['0'] = 'Удалить настройки визуализации'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['delete']['1'] = 'Удалить настройки визуализации ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['0'] = 'Редактировать настройки'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['edit']['1'] = 'Изменить настройки визуализации ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['0'] = 'Новый'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['new']['1'] = 'Создать новую настройку'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['pastenew']['0'] = 'Добавить новый сверху'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['pastenew']['1'] = 'Добавить новый после настройки визуализации ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['show']['0'] = 'Настройки визуализации деталей'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['show']['1'] = 'Показать детали визуализации настроек ID %s'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['0'] = 'Пользовательские шаблоны для генерации'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['template']['1'] = 'Выберите шаблон, который должен использоваться для выбранного атрибута. Имена шаблонов начинаются с "mm_<type>" где имя типа ставится для <type>'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['title_legend'] = 'Тип'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle']['0'] = 'Переключить'; -$GLOBALS['TL_LANG']['tl_metamodel_rendersetting']['toggle']['1'] = 'Переключить состояние настройки визуализации ID %s'; - diff --git a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_rendersettings.php b/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_rendersettings.php deleted file mode 100644 index 4073e95c9..000000000 --- a/src/CoreBundle/Resources/contao/languages/ru/tl_metamodel_rendersettings.php +++ /dev/null @@ -1,73 +0,0 @@ - - backBt ?>
diff --git a/src/CoreBundle/Resources/contao/templates/be_detectedproblems.html5 b/src/CoreBundle/Resources/contao/templates/be_detectedproblems.html5 index ac55ab6cc..8bba835ea 100644 --- a/src/CoreBundle/Resources/contao/templates/be_detectedproblems.html5 +++ b/src/CoreBundle/Resources/contao/templates/be_detectedproblems.html5 @@ -1,5 +1,5 @@ diff --git a/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.html5 b/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.html5 index a5e96c815..d89969706 100644 --- a/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.html5 +++ b/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.html5 @@ -1,3 +1,6 @@ +get('translator'); +?> data)): ?>
@@ -6,18 +9,14 @@ block('item'); ?>
- $strName): ?> - getFormat()][$field]) - && ($strValue = $arrItem[$this->getFormat()][$field]) - || (isset($arrItem['text'][$field]) && ($strValue = $arrItem['text'][$field])))): ?> + $name): ?> + getFormat()][$field] ?? null)) + || (null !== ($value = $arrItem['text'][$field] ?? null))): ?>
view->get('hideLabels')): ?> -
+
trans('field_label', ['%field_label%' => $name], 'metamodels_list') ?>
-
+
diff --git a/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.text b/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.text index ad78c65c3..c12497fbd 100644 --- a/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.text +++ b/src/CoreBundle/Resources/contao/templates/metamodel_prerendered.text @@ -1,13 +1,14 @@ get('translator'); $hideLabels = $this->view->get('hideLabels'); if (count($this->data)) { foreach ($this->data as $item) { foreach ($item['attributes'] as $field => $name) { - if ((isset($item['text'][$field]) && ($value = $item['text'][$field]))) { + if (null !== ($value = $arrItem['text'][$field] ?? null)) { if (!$hideLabels) { - echo sprintf($GLOBALS['TL_LANG']['MSC']['field_label'], $name) . ' '; + echo trim($translator->trans('field_label', ['%field_label%' => $name], 'metamodels_list')) . ' '; } echo $value . PHP_EOL; } diff --git a/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.html5 b/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.html5 index df6ecc00d..ea8d295b0 100644 --- a/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.html5 +++ b/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.html5 @@ -1,20 +1,20 @@ +get('translator'); +?> items->getCount()): ?>
items->parseAll($this->getFormat(), $this->view) as $arrItem): ?> block('item'); ?>
- items->getItem()->getMetaModel()->getAttributes() as $field => $objAttribute): ?> - getFormat()][$field]) - || ($strValue = $arrItem['text'][$field])): ?> + items->getItem()->getMetaModel()->getAttributes() as $field => $attribute): ?> + getFormat()][$field] ?? null)) + || (null !== ($value = $arrItem['text'][$field] ?? null))): ?>
view->get('hideLabels')): ?> -
getName() - ) ?>
+
trans('field_label', ['%field_label%' => $attribute->getName()], 'metamodels_list') ?>
-
+
diff --git a/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.text b/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.text index 4607e29ea..ff3fd4997 100644 --- a/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.text +++ b/src/CoreBundle/Resources/contao/templates/metamodel_unrendered.text @@ -1,4 +1,5 @@ get('translator'); $hideLabels = $this->view->get('hideLabels'); @@ -7,7 +8,7 @@ if ($this->items->getCount()) { foreach ($item['attributes'] as $field => $attribute) { if ((isset($item['text'][$field]) && ($value = $item['text'][$field]))) { if (!$hideLabels) { - echo sprintf($GLOBALS['TL_LANG']['MSC']['field_label'], $attribute->getName()) . ' '; + echo trim($translator->trans('field_label', ['%field_label%' => $attribute->getName()], 'metamodels_list')) . ' '; } echo $value . PHP_EOL; } diff --git a/src/CoreBundle/Resources/contao/templates/mm_actionbutton.html5 b/src/CoreBundle/Resources/contao/templates/mm_actionbutton.html5 index 3dc69aaef..7ea5f73c8 100644 --- a/src/CoreBundle/Resources/contao/templates/mm_actionbutton.html5 +++ b/src/CoreBundle/Resources/contao/templates/mm_actionbutton.html5 @@ -1,5 +1,5 @@ action['html'])): ?> - action['class'] ?? null): ?> class="action['class'] ?? ''; ?>"action['title'] ?? null): ?> title="action['title']; ?>"action['attribute'] ?? ''; ?>>action['label']; ?> + action['class'] ?? null): ?> class="action['class'] ?? '' ?>"action['title'] ?? null): ?> title="action['title'] ?>"action['attribute'] ?? '' ?>>action['label'] ?> action['html'] ?> diff --git a/src/CoreBundle/Resources/contao/templates/mm_clearall_default.html5 b/src/CoreBundle/Resources/contao/templates/mm_clearall_default.html5 index e54c3183f..b8572b63f 100644 --- a/src/CoreBundle/Resources/contao/templates/mm_clearall_default.html5 +++ b/src/CoreBundle/Resources/contao/templates/mm_clearall_default.html5 @@ -1,6 +1,6 @@
cssID ?>style): ?> style="style ?>"> - +
diff --git a/src/CoreBundle/Resources/contao/templates/mm_pagination.html5 b/src/CoreBundle/Resources/contao/templates/mm_pagination.html5 index 373001b81..1c55caedf 100644 --- a/src/CoreBundle/Resources/contao/templates/mm_pagination.html5 +++ b/src/CoreBundle/Resources/contao/templates/mm_pagination.html5 @@ -1,5 +1,5 @@ get('translator'); +$translator = \Contao\System::getContainer()->get('translator'); $paginationFragment = $this->paginationFragment ? '#' . $this->paginationFragment : ''; ?> diff --git a/src/CoreBundle/Resources/public/css/style.css b/src/CoreBundle/Resources/public/css/style.css index 6543da192..34c266dd2 100644 --- a/src/CoreBundle/Resources/public/css/style.css +++ b/src/CoreBundle/Resources/public/css/style.css @@ -44,7 +44,7 @@ color: #8ab858; margin: 6px 0; padding-left: 24px; - background: url("../../../../themes/flexible/images/palOpen.gif") 3px center no-repeat; + background: url("/system/themes/flexible/icons/navcol.svg") 3px center no-repeat; } .mm_problem_display { diff --git a/src/CoreBundle/Resources/public/scss/style.scss b/src/CoreBundle/Resources/public/scss/style.scss index b6280f785..8eb1c77c3 100644 --- a/src/CoreBundle/Resources/public/scss/style.scss +++ b/src/CoreBundle/Resources/public/scss/style.scss @@ -23,7 +23,7 @@ $icon_fields: url('../images/icons/fields.png'); $icon_dca_add: url('../images/icons/dca_add.png'); $icon_rendersettings_add: url('../images/icons/rendersettings_add.png'); -$icon_pal_open: url('../../../../themes/default/images/palOpen.gif'); +$icon_pal_open: url('/system/themes/flexible/icons/navcol.svg'); $icon_filter_setting: url('../images/icons/filter_settings.png'); $icon_locale: url('../images/icons/locale.png'); diff --git a/src/CoreBundle/Resources/translations/metamodels_default.en.xlf b/src/CoreBundle/Resources/translations/metamodels_default.en.xlf new file mode 100644 index 000000000..3db199390 --- /dev/null +++ b/src/CoreBundle/Resources/translations/metamodels_default.en.xlf @@ -0,0 +1,16 @@ + + + + + + global scope + + + default + + + %template% (%themes%) + + + + diff --git a/src/CoreBundle/Resources/translations/metamodels_filter.en.xlf b/src/CoreBundle/Resources/translations/metamodels_filter.en.xlf new file mode 100644 index 000000000..a4c91a2b7 --- /dev/null +++ b/src/CoreBundle/Resources/translations/metamodels_filter.en.xlf @@ -0,0 +1,13 @@ + + + + + + Filter value for attribute "%id%" + + + + + + + diff --git a/src/CoreBundle/Resources/translations/metamodels_list.en.xlf b/src/CoreBundle/Resources/translations/metamodels_list.en.xlf new file mode 100644 index 000000000..10c98b6a7 --- /dev/null +++ b/src/CoreBundle/Resources/translations/metamodels_list.en.xlf @@ -0,0 +1,25 @@ + + + + + + Sorting + + + Random + + + Id + + + %field_label%: + + + There are no items matching your search. + + + Details + + + + diff --git a/src/CoreBundle/Resources/translations/metamodels_navigation.en.xlf b/src/CoreBundle/Resources/translations/metamodels_navigation.en.xlf new file mode 100644 index 000000000..b588d11f3 --- /dev/null +++ b/src/CoreBundle/Resources/translations/metamodels_navigation.en.xlf @@ -0,0 +1,53 @@ + + + + + + MetaModels + + + MetaModels + + + The MetaModels extension allows you to create own data models. + + + MetaModels + + + Attributes of "%s" + + + All render setting of "%s" + + + Render settings in "%s" + + + Sorting and grouping in "%s" + + + All input screens of "%s" + + + Input screens in "%s" + + + Input screen and render setting combination for "%s" + + + Visibility conditions for attribute "%s" + + + All filter of "%s" + + + Filter settings in "%s" + + + All indexes of "%s" + + + + diff --git a/src/CoreBundle/Resources/translations/metamodels_support.en.xlf b/src/CoreBundle/Resources/translations/metamodels_support.en.xlf new file mode 100644 index 000000000..82d1902dc --- /dev/null +++ b/src/CoreBundle/Resources/translations/metamodels_support.en.xlf @@ -0,0 +1,62 @@ + + + + + + Support MetaModels + + + Support information for the MetaModels extension. + + + As the developers of this project, we receive no compensation for our work. + Much of our valuable time is freely given to the MetaModels project. Any + donations towards the MetaModels project would allow us to work on the + project during our working hours, speeding up development significantly. + <br /><br /> We guarantee to spend any donations only on this project. + If you have any specific requirements or features requests, you are free + to hire a member from our <a target="_blank" + href="https://now.metamodel.me/en/about/team">team</a>, who will gladly + help you.<br /><br />A big thanks to all our <a target="_blank" + href="https://now.metamodel.me/en/supporters">existing supporters and + sponsors</a>. Please consider joining our list of sponsors. We could not + create such a popular open source project without the support of the + community.<br /><br /><a target="_blank" + href="https://now.metamodel.me/en/supporters/donate">More informations</a> + + + + We are calling for your help! + + + Thanks to these users for tickets, suggestions and translations + + + Purpose + + + For donations check also our + <a target="_blank" href="https://now.metamodel.me/en/supporters/fundraising"> + fundraisings</a> or consider + <a target="_blank" href="https://now.metamodel.me/en/supporters/donate"> + donating for the manual</a>. + + + + Help for your MetaModels projects + + + On our <a target="_blank" href="https://now.metamodel.me/en/help">help + website as guide to MetaModels</a> you can find the manual, all support + channels, videos tutorials and our newsletter service.<br /><br /> + <a target="_blank" href="https://metamodels.readthedocs.io/en/latest/"> + Direct link to the MetaModels manual...</a> + + + + See contributors at github... + + + + diff --git a/src/CoreBundle/Resources/translations/metamodels_wildcard.en.xlf b/src/CoreBundle/Resources/translations/metamodels_wildcard.en.xlf new file mode 100644 index 000000000..ed5fabc8a --- /dev/null +++ b/src/CoreBundle/Resources/translations/metamodels_wildcard.en.xlf @@ -0,0 +1,41 @@ + + + + + + MM + + + MetaModel + + + Fi + + + Filter + + + Rs + + + Rendersetting + + + MetaModels elements + + + MetaModels list + + + MetaModels list + + + MetaModels frontend filter + + + MetaModels clear all + + + + diff --git a/src/CoreBundle/Resources/translations/mm_testselecttags.en.metamodels b/src/CoreBundle/Resources/translations/mm_testselecttags.en.metamodels deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/CoreBundle/Resources/translations/modules.en.xlf b/src/CoreBundle/Resources/translations/modules.en.xlf new file mode 100644 index 000000000..b7f0c549a --- /dev/null +++ b/src/CoreBundle/Resources/translations/modules.en.xlf @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/CoreBundle/Resources/translations/tl_content.en.xlf b/src/CoreBundle/Resources/translations/tl_content.en.xlf new file mode 100644 index 000000000..d179d01c0 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_content.en.xlf @@ -0,0 +1,25 @@ + + + + + + Edit MetaModel + + + Edit the MetaModel ID %id%. + + + Edit render setting + + + Edit the render setting ID %id%. + + + Edit filter setting + + + Edit the filter setting ID %id%. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel.en.xlf new file mode 100644 index 000000000..0c3471345 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel.en.xlf @@ -0,0 +1,243 @@ + + + + + + All MetaModels + + + New MetaModel + + + Create a new MetaModel + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Show the details of record %id% + + + Id + + + Id of the MetaModel + + + Name + + + MetaModel name. + + + Revision date + + + Date and time of the latest revision + + + Table name + + + Name of database table to store items to. + + + Parent list mode + + + Mode to use for parent/child relationship. + + + Translation + + + Check if this MetaModel shall support translation/multilingualism. + + + Languages to provide for translation + + + Specify all languages that shall be available for translation. + + + Language + + + Select the languages you want to provide. + + + Fallback language + + + Check the language that shall be used as fallback. + + + Variant support + + + Check if this MetaModel shall support variants of items. + + + Locale territory support + + + Check if this MetaModel shall support language territory at locale. + + + Sorting + + + Sorting order of items. + + + Name and table + + + Translation + + + Advanced settings + + + Cancel + + + Cancel multiple processing. + + + Manage items + + + Manage items of MetaModel ID %id% + + + Copy MetaModel definition + + + Copy definition of MetaModel ID %id% + + + Delete MetaModel + + + Delete MetaModel ID %id% + + + Do you really want to delete element ID %id%? + + + MetaModel details + + + Show details of MetaModel ID %id% + + + Edit MetaModel + + + Edit the MetaModel ID %id% + + + Define attributes + + + Define attributes for MetaModel ID %id% + + + Define filters + + + Define filters for MetaModel ID %id% + + + Define render settings + + + Define render settings for MetaModel ID %id% + + + Define input screens + + + Define input screens for MetaModel ID %id% + + + Define input/output combinations + + + Define input/output combinations for MetaModel ID %id% + + + Move MetaModel + + + Define the order of your MetaModels. + + + Define search settings + + + Define search settings for MetaModel ID %id% + + + {-1} Table does not exist, run migration!| {0} No items|{1} 1 item|[2,Inf[ %count% items + + + Do you really want to delete MetaModel ID %id%? + + + After creating a model, the database must be migrated (console, Contao Manager) - even if the table + name is changed. When changing the table name, the user data itself must be transferred. + + + + Create a new item + + + Edit record %id% + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + The table name is not given or empty. + + + The table name "%table_name%" is invalid. + + + Table "%table_name%" already exists. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_attribute.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_attribute.en.xlf new file mode 100644 index 000000000..a1578ab14 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_attribute.en.xlf @@ -0,0 +1,192 @@ + + + + + + All attributes + + + Id + + + Pid + + + Sorting + + + Revision date + + + New attribute + + + Create a new attribute + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Attribute type + + + Select the type of this attribute. WARNING: if you change this, all existing data within this attribute + will be deleted. + + + + Name + + + Human readable name + + + Description + + + Human readable description + + + Column name + + + Internal reference name for this attribute + + + Enable variant override + + + Check this, if you want variants within the MetaModel to override the parent item's value + + + Unique values + + + Check this, if you want to ensure that each value only occurs once + + + Language + + + Description + + + Type, naming and base attribute configuration + + + Advanced settings + + + Edit attribute + + + Cancel + + + Cancel multiple processing. + + + Edit attribute ID %id% + + + Cut attribute definition + + + Cut definition of attribute ID %id% + + + Copy attribute definition + + + Copy definition of attribute ID %id% + + + Delete attribute + + + Delete attribute ID %id% + + + Do you really want to delete element ID %id%? + + + Attribute details + + + Show details of attribute ID %id% + + + Edit attribute + + + Edit the attribute + + + Unknown attribute! + + + Extension missing? The attribute type "%id%" is not installed. + + + Do you really want to delete attribute ID %id%? + + + After creating an attribute, the database must be migrated (console, Contao Manager) - even if the + column name is changed. When changing the column name, the user data itself must be transferred. + + + + Create a new item + + + Edit record %id% + + + Show the details of record %id% + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + Column "%col_name%" already exists on table "%table_name%". + + + The column name "%col_name%" is invalid. + + + The column name "%col_name%" is reserved for system use. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_dca.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_dca.en.xlf new file mode 100644 index 000000000..7ab65aa0d --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_dca.en.xlf @@ -0,0 +1,284 @@ + + + + + + All input screens + + + Id + + + Pid + + + Sorting + + + New input screen + + + Create a new input screen + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + Go back + + + Back to the previous page + + + Show the details of record %id% + + + Edit record %id% + + + Edit MetaModel + + + Edit the MetaModel ID %id% + + + Name + + + Name of the input screen. + + + Revision date + + + Date and time of the latest revision. + + + Integration + + + Select the desired type of integration. + + + Render mode + + + Select the desired render mode. + + + Parent table name + + + Name of the database table that shall be referred to as parent table. + + + Use column based layout + + + If selected a table header will be generated with column names. + + + Backend section + + + Select the desired backend section where you want the MetaModel appear. For models that shall be edited + by end users, the "content" section most likely will be appropriate. + + + + Backend icon + + + Select the desired backend icon.This icon will get used to draw an image in the parent list if you have + a integration as child table. + + + + Backend caption + + + The text you specify in here, will get used as the label and description text in the backend menu. + + + + Language + + + Select the languages you want to provide. + + + Label text + + + The text you specify in here, will get used as the menu label in the backend menu. + + + Description text + + + The text you specify in here, will get used as the description (hover title) in the backend menu. + + + + Panel layout + + + Separate panel options with comma (= space) and semicolon (= new line) like + "filter;search;sort,limit". + + + + Panelpicker + + + View limitation + + + Activate the view limitation. + + + Limit the render setting + + + Choose between front end or backend. + + + Allow editing of items + + + If checked, this input screen allows the editing of items. + + + Allow creating of items + + + If checked, this input screen allows the creating of items. + + + Allow deleting of items + + + If checked, this input screen allows the deleting of items. + + + Name + + + View settings + + + Backend integration + + + Data display settings + + + Data manipulation permissions + + + Edit input screen + + + Edit the input screen ID %id% + + + Copy input screen definition + + + Copy definition of input screen ID %id% + + + Delete input screen + + + Delete input screen ID %id% + + + Do you really want to delete element ID %id%? + + + Input screen details + + + Show details of input screen ID %id% + + + Input screen settings + + + Edit the settings of input screen ID %id% + + + Grouping and sorting + + + Edit the grouping and sorting settings of input screen ID %id% + + + Additions to the mask-heading + + + The field can be used to adapt the heading of the mask at edit and replaces the output of the ID.You can + use simple tokens e.g. ##model_name##, ##model_firstname## [##model_id##] + + + + Standalone + + + As child table + + + Flat + + + Parented + + + Hierarchical + + + When using the "Hierarchical" render mode, the current sort must be enable to "Manual sorting" as + default. + + + + Do you really want to delete input screen ID %id%? + + + Cancel + + + Cancel multiple processing. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_dca_combine.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_dca_combine.en.xlf new file mode 100644 index 000000000..4e9fe501c --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_dca_combine.en.xlf @@ -0,0 +1,73 @@ + + + + + + All input/output combinations + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + Go back + + + Back to the previous page + + + Edit record %id% + + + Combination configuration + + + Permissions for input screen and views + + + For selected frontend user group (if any) and selected backend user group (if any) use the selected + palette and the selected view. + + + + Frontend group + + + The frontend user group the combination applies to; * is 'catch all'. + + + Backend group + + + The backend user group the combination applies to; * is 'catch all'. + + + Input screen + + + The input screen the combination applies to. + + + Render setting + + + The view the combination applies to. + + + Administrator + + + Anonymous + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_dca_sortgroup.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_dca_sortgroup.en.xlf new file mode 100644 index 000000000..77d4b05fe --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_dca_sortgroup.en.xlf @@ -0,0 +1,231 @@ + + + + + + All grouping and sorting settings + + + Id + + + Pid + + + Revision date + + + Sorting + + + Published + + + New Sorting and grouping + + + Create a new Sorting and grouping + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + Edit record %id% + + + Name + + + Name of the sorting group. + + + Is default + + + Determines that this input screen shall be used as default for the parenting MetaModel. + + + Render mode + + + Select the desired render mode. + + + Language + + + Select the languages you want to provide. + + + Label text + + + The text you specify in here, will get used as the menu label in the backend menu. + + + Description text + + + The text you specify in here, will get used as the description (hover title) in the backend menu. + + + + Grouping type + + + The grouping type to use in the item view. + + + Grouping attribute + + + The attribute to use for grouping in the item view. + + + Grouping length + + + The amount of characters to use for grouping. + + + Sorting attribute + + + The attribute to sort by. + + + Sorting direction + + + The sorting direction. + + + Enable manual sorting + + + If this is enabled, the user will be able to perform manual sorting. + + + Name + + + Data display settings + + + Edit definition + + + Edit the definition ID %id% + + + Copy definition + + + Copy the definition ID %id% + + + Delete definition + + + Delete the definition ID %id% + + + Do you really want to delete element ID %id%? + + + Definition details + + + Show details of definition ID %id% + + + Toggle + + + Toggle the state of definition ID %id% + + + Definition settings + + + Edit the settings of definition ID %id% + + + Do not group + + + Group by initial letter(s) + + + Group by numeric order + + + Group by day of date + + + Group by weekday of date + + + Group by week of year + + + Group by month of date + + + Group by year of date + + + Ascending + + + Descending + + + Do you really want to delete definition ID %id%? + + + Show the details of record %id% + + + Cancel + + + Cancel multiple processing. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_dcasetting.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_dcasetting.en.xlf new file mode 100644 index 000000000..fca38de04 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_dcasetting.en.xlf @@ -0,0 +1,335 @@ + + + + + + All input screen settings + + + Id + + + Pid + + + Sorting + + + Revision date + + + Published + + + New attribute or legend + + + Add a new attribute or legend for input mask + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Save and close + + + Continue + + + Select all + + + Cancel + + + Cancel multiple processing. + + + Type + + + Select the attribute type. + + + Attribute + + + Attribute this setting relates to. + + + Custom template to use for generating + + + Select the template that shall be used for the selected attribute. Valid template files start with "mm_&lt;type&gt;" + where the type name is put for &lt;type&gt; + + + + Backend class + + + Here you can set backend class(es). Open the wizard for an overview of the classes. + + + Template at backend + + + You can chose own template for widget in backend - add file in root folder of template. + + + Collapse section + + + Collapse the section by default. + + + Legend title + + + Here you can enter the legend title. + + + Language + + + Legend title + + + Mandatory + + + Check if this attribute shall be mandatory. + <br />NOTE: This will be implicitely active on if you selected "Unique values" in the attribute + configuration. + + + + Always save + + + If true the field will always be saved, even if its value has not changed. + + + Chosen + + + Enable Chosen graphical select widget. + + + Filterable + + + Check if this attribute shall be available for backend filtering. + + + Searchable + + + Check if this attribute shall be available for backend search. + + + Do not encode allowed html tags. + + + If you select this, allowed HTML tags from system settings will not be encoded. + + + Do not encode all html tags. + + + If you select this, no HTML tags will be encoded. + + + Decode HTML entities. + + + If you select this, all HTML entities will be decoded. Note that HTML entities are always decoded if "Do + not encode allowed html tags" is true. + + + + Enable richtext editor on this + + + Select the rich text configuration that shall be used on this field (if any). + + + Rows + + + Amount of rows to use for longtext/table widget. + + + Columns + + + Amount of colums to use for longtext/table widget + + + Trailing slash handling + + + Here you can specify how trailing slashes shall be handled + + + Replace spaces with underscore + + + If true any whitespace character will be replaced by an underscore. + + + Include blank option + + + if true a blank option will be added to the options which allows to define a &quot;no item selected&quot; + option. + + + + Read only + + + If true a the widget will be read only and may not be changed. + + + Submit on change + + + If active the form will be submitted when the field value changes. + + + Type + + + Widget appearance related options + + + Functionality related options + + + Filtering and searching in the backend list + + + Backend + + + Configuration + + + Advanced + + + Edit setting + + + Edit the setting ID %id% + + + Cut setting definition + + + Cut the setting ID %id% + + + Copy setting definition + + + Copy the setting ID %id% + + + Delete setting + + + Delete the setting ID %id% + + + Do you really want to delete element ID %id%? + + + Manage visibility conditions + + + Manage the visibility conditions of property ID %id% + + + Setting details + + + Show details of setting ID %id% + + + Toggle + + + Toggle the state of setting ID %id% + + + Add all + + + Add all attributes to input screen + + + Legend + + + Attribute + + + Strip slash on save + + + Add slash on save + + + Do nothing + + + Will add the attribute "%name%" [%type%, "%colName%"] to the input screen. + + + Attribute "%name%" [%type%, "%colName%"] is already contained in input screen. + + + Added the attribute "%name%" [%type%, "%colName%"] to the input screen. + + + Add new settings enabled. + + + Set backend class. + + + Unique attribues are automatically mandatory (this is not changable). + + + Attribues with force alias are automatically readonly (this is not changable). + + + Show the details of record %id% + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_dcasetting_condition.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_dcasetting_condition.en.xlf new file mode 100644 index 000000000..efbcc4020 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_dcasetting_condition.en.xlf @@ -0,0 +1,192 @@ + + + + + + All input screen conditions + + + Id + + + Pid + + + Fid + + + Sorting + + + Revision date + + + New condition + + + Add a new visibility condition + + + Edit multiple + + + Edit multiple elements at once + + + Go back + + + Back to the previous page + + + Visibility conditons + + + Basic configuration + + + Condition configuration + + + Type + + + Select the condition type. + + + Enabled + + + Check to enable this condition. + + + Comment + + + Enter a comment to describe the purpose of this condition. + + + Attribute + + + Select the attribute to use for this condition. + + + Value + + + Please select the desired value. + + + Edit setting + + + Edit the setting ID %id% + + + Cut setting definition + + + Cut the setting ID %id% + + + Copy setting definition + + + Copy the setting ID %id% + + + Delete setting + + + Delete the setting ID %id% + + + Do you really want to delete element ID %id%? + + + Manage conditions + + + Manage the conditions of property ID %id% + + + Setting details + + + Show details of setting ID %id% + + + Toggle + + + Toggle the state of setting ID %id% + + + Add all + + + Add all attributes to input screen + + + Add new at the top + + + Add new after setting ID %id% + + + Create new after setting ID %id% + + + Create new after setting ID %id% + + + Create new setting at the top + + + Create new at the top of setting ID %id% + + + Attribute value is... + + + Attribute values contain any of... + + + Is attribute visible... + + + OR + + + AND + + + NOT + + + %icon% <strong>%name%</strong> - for attribute <em>%attribute%</em> (Parameter: %value%)%comment% + + + + %icon% <strong>%name%</strong> - any sub conditions must be fulfilled%comment% + + + %icon% <strong>%name%</strong> - all sub conditions must be fulfilled%comment% + + + %icon% <strong>%name%</strong> - invert the result of the contained condition%comment% + + + %icon% <strong>%attribute%</strong> value is %value%%comment% + + + Do you really want to delete setting ID %id%? + + + Show the details of record %id% + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_filter.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_filter.en.xlf new file mode 100644 index 000000000..11b2236d3 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_filter.en.xlf @@ -0,0 +1,128 @@ + + + + + + All filters + + + Id + + + Pid + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + Edit record %id% + + + Show the details of record %id% + + + New filter + + + Create a new filter + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Name + + + Filter setting name. + + + Revision date + + + Date and time of the latest revision. + + + Name + + + Edit + + + Edit MetaModel + + + Edit setting + + + Edit the filter setting ID %id% + + + Copy filter setting + + + Copy the filter setting ID %id% + + + Delete filter setting + + + Delete the filter setting ID %id% + + + Do you really want to delete element ID %id%? + + + Filter setting details + + + Show details of filter setting ID %id% + + + Define attribute settings + + + Define attribute settings for filter setting ID %id% + + + Do you really want to delete filter setting ID %id%? + + + Cancel + + + Cancel multiple processing. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_filtersetting.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_filtersetting.en.xlf new file mode 100644 index 000000000..e80af871a --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_filtersetting.en.xlf @@ -0,0 +1,339 @@ + + + + + + All filter settings + + + Id + + + Pid + + + Sorting + + + Revision date + + + New filter setting + + + Create a new filter setting + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Create new setting at the top + + + Create new into setting ID %id% + + + Go back + + + Back to the previous page + + + Filter settings + + + Parent collection + + + The collection of filter settings, this setting belongs to. + + + Type + + + The type of this setting. + + + Enabled + + + Enable this filter setting. + + + Comment + + + A short comment for describing the purpose of this filter setting. + + + Attribute + + + Attribute this setting relates to. + + + Search all languages + + + Check if you want to perform the lookup language independant. If this is not checked, only the current + active language will be searched. + + + + Allow empty value + + + Check if you want to allow this filter value to be emtpy, if checked and the parameter holds an empty + value, this filter rule will behave as if it was not defined. + + + + Stop after first match + + + Check if you want this filter setting to stop executing its child rules after the first subset returned + matches. + + + + URL parameter + + + The URL parameter that shall get mapped to the selected attribute. The special <em>"auto_item"</em> + parameter can also be used, this is especially useful for alias columns. + + + + Static parameter + + + Check if you want to be able to set the value of this parameter in the parenting list (modules, content + elements, etc.). + + + + Provide Frontend widget + + + Check if you want to display a filter widget in the Frontend. + + + Custom SQL Query + + + The SQL query that shall be executed, insert tags are supported. + + + Label + + + Show label instead of attribute name. + + + Template + + + Sub template for this filter element. Standard: form widget. + + + Empty option + + + Show empty options in filter widget. + + + Assigned values only + + + Show only options, that are assigned somewhere in the MetaModel. + + + Remaining values only + + + Show only options, that are still assigned somewhere after the actual filter is set. + + + Ignore this filter for the remaining values + + + If activate the filter will return all options without itself in the filter rules. + + + Hide label in filter widget + + + If active, the label is not output. + + + Use label as blank option + + + If active, the label output as blank option. + + + Sorting + + + Please enter sorting of values in filter widget. + + + CSS ID/class + + + Here you can set an ID and one or more classes. + + + Placeholder + + + Show this text as long as the field is empty. + + + Natural sorting (ASC) + + + Natural sorting (DESC) + + + Default + + + Default value for selection. + + + Type + + + Configuration + + + Frontend filter + + + Edit setting + + + Edit the filter setting ID %id% + + + Copy filter setting definition + + + Copy the filter setting ID %id% + + + Cut filter setting definition + + + Cut the filter setting ID %id% + + + Delete filter setting + + + Delete the filter setting ID %id% + + + Do you really want to delete element ID %id%? + + + Filter setting details + + + Show details of filter setting ID %id% + + + Toggle + + + Toggle the state of setting ID %id% + + + Predefined set of items + + + Simple lookup + + + Custom SQL + + + OR condition + + + AND condition + + + <em>[%colName%, "%name%"]</em> + + + <em>(URL: %urlparam%)</em> + + + <br />%comment% + + + %1$s <strong>%2$s</strong> %3$s %5$s %4$s + + + %1$s <strong>%2$s</strong> %3$s %5$s %4$s + + + %1$s <strong>%2$s</strong> %3$s %4$s + + + %1$s <strong>%2$s</strong> %4$s + + + %1$s <strong>%2$s</strong> %4$s + + + Items + + + Please enter the IDs of the items for filtering as comma-separated list. + + + Do you really want to delete filter setting ID %id%? + + + Cancel + + + Cancel multiple processing. + + + Edit record %id% + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf new file mode 100644 index 000000000..56e1fb534 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_item.en.xlf @@ -0,0 +1,150 @@ + + + + + + New item + + + Create new item + + + Edit item + + + Edit item ID %id% + + + Edit multiple + + + Edit multiple + + + Edit "%child_name%" + + + Edit "%child_name%" for item %id% + + + Copy item + + + Copy item ID %id% + + + New variant + + + Create a new variant of item ID %id% + + + Move item + + + Move item ID %id% + + + Delete item + + + Delete item ID %id% + + + Do you really want to delete element ID %id%? + + + Item details + + + Show details of item ID %id% + + + Edit item type + + + Edit the item type + + + Create new item + + + Create a new item after item ID %id% + + + Create new item + + + Create a new item in item ID %id% + + + Add new at the top + + + Add new item after item ID %id% + + + Is variant base + + + Check this if you want to make this the base for the current variant group + + + Edit item %item% + + + Create a new item + + + Sorting + + + The manual sorting + + + ID of the item + + + The id of the item + + + Parent item id + + + The id of the parent item + + + Revision date + + + The date when the item revision was created + + + Details + Used in the frontend for the "Details" link caption. + + + Show the details of record %id% + + + Go back + + + Back to the previous page + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_rendersetting.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_rendersetting.en.xlf new file mode 100644 index 000000000..0bd355579 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_rendersetting.en.xlf @@ -0,0 +1,178 @@ + + + + + + All render setting settings + + + Id + + + Pid + + + Revision date + + + Sorting + + + New attribute + + + Add a new attribute for render setting + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Continue + + + Select all + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + Edit record %id% + + + Attribute + + + Attribute this setting relates to. + + + Custom template to use for generating + + + Select the template that shall be used for the selected attribute. Valid template files start with "mm_&lt;type&gt;" + where the type name is put for &lt;type&gt; + + + + Custom CSS class + + + Enter any CSS classes that you want get added to the output of this attribute + + + Type + + + Advanced + + + Edit setting + + + Edit render setting ID %id% + + + Cut render setting definition + + + Cut the render setting ID %id% + + + Copy render setting definition + + + Copy the render setting ID %id% + + + Delete render setting + + + Delete the render setting ID %id% + + + Do you really want to delete element ID %id%? + + + Render setting details + + + Show details of render setting ID %id% + + + Toggle + + + Toggle the state of render setting ID %id% + + + Add all + + + Add all attributes to render setting + + + %id% <strong>%id%</strong> <em>[%id%]</em> + + + Will add the attribute "%name%" [%type%, "%colName%"] to the input screen. + + + Attribute "%name%" [%type%, "%colName%"] is already contained in input screen. + + + Added the attribute "%name%" [%type%, "%colName%"] to the input screen. + + + Add new settings enabled. + + + Do you really want to render filter setting ID %id%? + + + Enabled + + + Enable this filter setting. + + + Show the details of record %id% + + + Cancel + + + Cancel multiple processing. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_rendersettings.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_rendersettings.en.xlf new file mode 100644 index 000000000..9649e9518 --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_rendersettings.en.xlf @@ -0,0 +1,225 @@ + + + + + + All render settings + + + Id + + + Pid + + + Revision date + + + New render setting + + + Create a new render setting + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Edit MetaModel + + + Edit the MetaModel ID %id% + + + Name + + + General settings + + + Expert settings + + + Frontend jump-to settings + + + Additional files + + + Name + + + Setting name. + + + Template + + + The template to use to render the items. + + + Output format + + + Define the output format. Leave empty to use the format used by current page. + + + HTML5 + + + Text + + + JumpTo page + + + The page that shall be used as "show details" urls. Note that the detailed URL params will get generated + by the filter setting that is currently in use. + + + + All languages + + + Language + + + The language for the jump to page. + + + Jump to page + + + The page to use for detail links. + + + Filter settings + + + The filter settings that define how the target (the reader/lister on the detail page) will filter the + items. + + + + Hide empty values + + + Hide empty values in backend and frontend. + + + Hide labels + + + Hide all labels in backend and frontend. + + + Additional css files + + + Choose this, if you want to include additional css files. + + + Additional javascript files + + + Choose this, if you want to include additional javascript files. + + + File + + + Choose a file + + + Publish + + + Check to publish the file. + + + Edit setting + + + Edit the setting ID %id% + + + Copy setting definition + + + Copy the setting ID %id% + + + Delete setting + + + Delete the setting ID %id% + + + Do you really want to delete element ID %id%? + + + Filter details + + + Show details of setting ID %id% + + + Define attribute settings + + + Define attribute settings for setting ID %id% + + + Unknown ID: %id% + + + unknown attribute + + + Unknown column + + + Do you really want to render setting ID %id%? + + + Show the details of record %id% + + + Edit record %id% + + + Save + + + Save and close + + + Save and new + + + Save and go back + + + + diff --git a/src/CoreBundle/Resources/translations/tl_metamodel_searchable_pages.en.xlf b/src/CoreBundle/Resources/translations/tl_metamodel_searchable_pages.en.xlf new file mode 100644 index 000000000..c4384c0da --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_metamodel_searchable_pages.en.xlf @@ -0,0 +1,140 @@ + + + + + + All search settings + + + Id + + + Pid + + + New index + + + Create a new searchable page setting + + + Edit multiple + + + Edit multiple elements at once + + + Create a new element at the top + + + Create a new element after element ID %id% + + + Paste at the top + + + Paste after element ID %id% + + + Go back + + + Back to the previous page + + + Show the details of record %id% + + + Name + + + Name of the searchable page setting + + + Revision date + + + Date and time of the latest revision. + + + Rendersetting + + + Choose the rendersetting which will be used for the search rendering. + + + Filtersetting + + + Choose the filtersetting which will be used for the search rendering. + + + Filter parameter override + + + Filter parameter override + + + Name + + + General settings + + + Edit searchable page + + + Edit the searchable page setting ID %id% + + + Copy searchable page + + + Copy definition of searchable page setting ID %id% + + + Delete searchable page + + + Delete searchable page setting ID %id% + + + Do you really want to delete element ID %id%? + + + Searchable page setting details + + + Show details of searchable page setting ID %id% + + + Toggle + + + Toggle the state of searchable page setting ID %id% + + + Searchable page settings + + + Edit the settings of searchable page setting ID %id% + + + Searchable page settings + + + Published + + + Do you really want to render setting ID %id%? + + + Cancel + + + Cancel multiple processing. + + + + diff --git a/src/CoreBundle/Resources/translations/tl_modules.en.xlf b/src/CoreBundle/Resources/translations/tl_modules.en.xlf new file mode 100644 index 000000000..bc384cb5e --- /dev/null +++ b/src/CoreBundle/Resources/translations/tl_modules.en.xlf @@ -0,0 +1,25 @@ + + + + + + Edit MetaModel + + + Edit the MetaModel ID %id%. + + + Edit render setting + + + Edit the render setting ID %id%. + + + Edit filter setting + + + Edit the filter setting ID %id%. + + + + diff --git a/src/CoreBundle/Resources/views/Backend/add-all.html.twig b/src/CoreBundle/Resources/views/Backend/add-all.html.twig index 9005cd433..213bef4f9 100644 --- a/src/CoreBundle/Resources/views/Backend/add-all.html.twig +++ b/src/CoreBundle/Resources/views/Backend/add-all.html.twig @@ -12,7 +12,7 @@ {% block main %}
diff --git a/src/CoreBundle/Resources/views/Backend/be_config.html.twig b/src/CoreBundle/Resources/views/Backend/be_config.html.twig new file mode 100644 index 000000000..40b0e1a14 --- /dev/null +++ b/src/CoreBundle/Resources/views/Backend/be_config.html.twig @@ -0,0 +1,15 @@ +{% extends "@MetaModelsCore/Backend/be_base.html.twig" %} + +{% block headline %} + {{ headline }} +{% endblock %} + +{% block error %} + {%- if error is defined -%} + {{- error -}} + {%- endif -%} +{% endblock %} + +{% block main %} +{{ body | raw }} +{% endblock %} diff --git a/src/CoreBundle/Translator/MetaModelTranslationLoader.php b/src/CoreBundle/Translator/MetaModelTranslationLoader.php index 45e2f356a..1dcc6eb34 100644 --- a/src/CoreBundle/Translator/MetaModelTranslationLoader.php +++ b/src/CoreBundle/Translator/MetaModelTranslationLoader.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2019 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,29 +12,249 @@ * * @package MetaModels/core * @author Christian Schiffler - * @author Sven Baumann - * @copyright 2012-2019 The MetaModels team. + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ namespace MetaModels\CoreBundle\Translator; +use Doctrine\DBAL\Exception; +use MetaModels\Attribute\IInternal; +use MetaModels\IFactory; +use MetaModels\ITranslatedMetaModel; +use MetaModels\ViewCombination\InputScreenInformationBuilder; +use MetaModels\ViewCombination\ViewCombination; +use Symfony\Component\Translation\Exception\NotFoundResourceException; use Symfony\Component\Translation\Loader\LoaderInterface; use Symfony\Component\Translation\MessageCatalogue; +use Symfony\Component\Translation\TranslatorBagInterface; + +use function is_array; +use function sprintf; final class MetaModelTranslationLoader implements LoaderInterface { - public function load($resource, $locale, $domain = 'messages') + /** + * The constructor. + * + * @param TranslatorBagInterface $baseTranslator The translator interface. + * @param IFactory $factory The factory. + * @param ViewCombination $viewCombination The view combination. + * @param InputScreenInformationBuilder $builder The input screen builder. + */ + public function __construct( + private readonly TranslatorBagInterface $baseTranslator, + private readonly IFactory $factory, + private readonly ViewCombination $viewCombination, + private readonly InputScreenInformationBuilder $builder, + ) { + } + + /** + * Load translation catalog. + * + * @param mixed $resource The resource. + * @param string $locale The locale. + * @param string $domain The domain + * + * @return MessageCatalogue + * @throws Exception + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + * @SuppressWarnings(PHPMD.NPathComplexity) + */ + public function load($resource, string $locale, string $domain = 'messages'): MessageCatalogue { - dump($resource, $locale, $domain); + // Load tl_metamodel_item catalogue. + $base = $this->baseTranslator->getCatalogue($locale); + $catalog = new MessageCatalogue($locale); - if ($domain === 'mm_testselecttags') { - $catalog->set('mm_testselecttags.select_normal.0', 'Label !!!!', $domain); - $catalog->set('mm_testselecttags.select_normal.1', 'Description', $domain); + + foreach ($base->all('tl_metamodel_item') as $key => $value) { + $catalog->set($key, $value, $domain); + } + + $metaModel = $this->factory->getMetaModel($domain); + if (null === $metaModel) { + throw new NotFoundResourceException('Failed to load MetaModel: ' . $domain); + } + + /** + * @psalm-suppress DeprecatedMethod + * @psalm-suppress TooManyArguments + */ + if ($metaModel instanceof ITranslatedMetaModel) { + $metaModel->selectLanguage($locale); + $mainLanguage = $metaModel->getMainLanguage(); + } elseif ($metaModel->isTranslated(false)) { + $mainLanguage = $metaModel->getFallbackLanguage() ?? 'en'; + } else { + // Untranslated MetaModel. + $mainLanguage = 'en'; + } + + // Attributes: + foreach ($metaModel->getAttributes() as $attribute) { + if ($attribute instanceof IInternal) { + continue; + } + $colName = $attribute->getColName(); + $name = $attribute->get('name') ?? $colName; + $description = $attribute->get('description') ?? ''; + $catalog->set( + sprintf('%1$s.label', $colName), + $this->extractLangString($name, $locale, $mainLanguage) ?? $colName, + $domain + ); + $catalog->set( + sprintf('%1$s.description', $colName), + $this->extractLangString($description, $locale, $mainLanguage) ?? '', + $domain + ); + } + + foreach ($this->builder->fetchAllInputScreensForTable($domain) as $inputScreen) { + $this->handleInputScreen($domain, $locale, $mainLanguage, $inputScreen, $catalog); + } + + // Check if we have some children - add child button translations then. + foreach ($this->viewCombination->getChildrenOf($domain) as $tableName => $inputScreen) { + $subMetaModel = $this->factory->getMetaModel($tableName); + if (null === $subMetaModel) { + continue; + } + $translationKey = 'metamodel_edit_as_child.' . $subMetaModel->getTableName(); + + if ( + 'metamodel_edit_as_child.label' !== + $baseValue = $catalog->get('metamodel_edit_as_child.label', $domain) + ) { + $catalog->set( + $translationKey . '.label', + strtr($baseValue, ['%child_name%' => $subMetaModel->getName()]), + $domain, + ); + } + if ( + 'metamodel_edit_as_child.description' !== + $baseValue = $catalog->get('metamodel_edit_as_child.description', $domain) + ) { + $catalog->set( + $translationKey . '.description', + strtr($baseValue, ['%child_name%' => $subMetaModel->getName()]), + $domain, + ); + } + + $this->setTranslationLabelAndDescription( + $domain, + $locale, + $mainLanguage, + $translationKey, + $inputScreen, + $catalog, + $tableName, + ); } - dump($catalog); return $catalog; } + + /** + * Handle input screen. + * + * @param string $domain The domain. + * @param string $locale The locale. + * @param string $mainLanguage The fallback language. + * @param array $inputScreen The input screen. + * @param MessageCatalogue $catalog The catalog. + * + * @return void + */ + private function handleInputScreen( + string $domain, + string $locale, + string $mainLanguage, + array $inputScreen, + MessageCatalogue $catalog + ): void { + $prefix = 'inputscreen.' . $inputScreen['meta']['id'] . '.'; + + foreach ($inputScreen['legends'] as $index => $legend) { + $value = $this->extractLangString($legend['label'], $locale, $mainLanguage) ?? ''; + // Suffix '_legend' due to EditMask in DcGeneral. + $catalog->set($prefix . $index . '_legend', $value, $domain); + } + + if ('standalone' === $inputScreen['meta']['rendertype']) { + $this->setTranslationLabelAndDescription( + $domain, + $locale, + $mainLanguage, + $prefix . 'menu', + $inputScreen, + $catalog, + $domain, + ); + } + } + + private function setTranslationLabelAndDescription( + string $domain, + string $locale, + string $mainLanguage, + string $prefix, + array $inputScreen, + MessageCatalogue $catalog, + string $headlineDomain + ): void { + $headlineKey = 'backend-module.' . $inputScreen['meta']['id'] . '.headline'; + $catalog->set($prefix . '.description', '', $domain); + if ('' !== $value = $this->extractLangString($inputScreen['description'], $locale, $mainLanguage) ?? '') { + $catalog->set($prefix . '.description', $value, $domain); + + $catalog->set($headlineKey, $value, $headlineDomain); + } + if ('' !== $value = $this->extractLangString($inputScreen['label'], $locale, $mainLanguage) ?? '') { + $catalog->set($prefix . '.label', $value, $domain); + if ($headlineKey === $catalog->get($headlineKey, $headlineDomain)) { + $catalog->set($headlineKey, $value, $headlineDomain); + } + } + } + + /** + * @param string|array $value The value. + * @param string $locale The locale. + * @param string $mainLocale The fallback language. + * + * @return string|null + * + * @SuppressWarnings(PHPMD.CyclomaticComplexity) + */ + private function extractLangString(string|array $value, string $locale, string $mainLocale): ?string + { + if (!is_array($value)) { + return $value; + } + + $fallback = null; + foreach ($value as $langCode => $string) { + if ($locale === $langCode && '' !== $string) { + return $string; + } + if ($mainLocale === $langCode && '' !== $string) { + $fallback = $string; + } + } + + if ('en' === $locale && null === $fallback && (null !== $default = ($value[''] ?? null))) { + return $default; + } + + return $fallback; + } } diff --git a/src/CoreBundle/Translator/MetaModelTranslatorConfigurator.php b/src/CoreBundle/Translator/MetaModelTranslatorConfigurator.php new file mode 100644 index 000000000..b70ed2490 --- /dev/null +++ b/src/CoreBundle/Translator/MetaModelTranslatorConfigurator.php @@ -0,0 +1,109 @@ + + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. + * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later + * @filesource + */ + +namespace MetaModels\CoreBundle\Translator; + +use MetaModels\IFactory; +use MetaModels\ITranslatedMetaModel; +use Psr\Cache\InvalidArgumentException; +use Symfony\Component\Translation\Translator as SymfonyTranslator; +use Symfony\Contracts\Cache\CacheInterface; + +/** @psalm-type TDomainList=iterable> */ +final class MetaModelTranslatorConfigurator +{ + /** @var callable|null */ + private $previous; + + /** + * The constructor. + * + * @param IFactory $factory The factory. + * @param CacheInterface $cache The cache. + * @param callable|null $previous The previous configurator. + */ + public function __construct( + private readonly IFactory $factory, + private readonly CacheInterface $cache, + $previous = null + ) { + if (null !== $previous && !is_callable($previous)) { + throw new \InvalidArgumentException('Passed value for previous must be callable or null'); + } + $this->previous = $previous; + } + + /** + * @param SymfonyTranslator $translator The translator. + * + * @return void + * + * @throws InvalidArgumentException + */ + public function __invoke(SymfonyTranslator $translator): void + { + // Apply previous configurator + if (null !== $this->previous) { + \call_user_func($this->previous, $translator); + } + + foreach ($this->fetchDomains() as $domain => $locales) { + foreach ($locales as $locale) { + $translator->addResource('metamodels', $domain, $locale, $domain); + } + } + } + + /** + * Obtain the domain names with their locales. + * + * @return TDomainList + * @throws InvalidArgumentException + */ + private function fetchDomains(): iterable + { + return $this->cache->get( + 'metamodels.translation-domains', + /** @return TDomainList */ + function (): iterable { + $result = []; + foreach ($this->factory->collectNames() as $metamodelName) { + $instance = $this->factory->getMetaModel($metamodelName); + if (!$instance instanceof ITranslatedMetaModel) { + $result[$metamodelName] = ['en']; + continue; + } + $locales = []; + foreach ($instance->getLanguages() as $language) { + $locales[] = $language; + } + // Fix: Always add 'en' to the language domains, even if user only set 'af_NA' by quick save. + if (!\in_array('en', $locales, true)) { + array_unshift($locales, 'en'); + } + + $result[$metamodelName] = $locales; + } + + return $result; + } + ); + } +} diff --git a/src/CoreBundle/Translator/Translator.php b/src/CoreBundle/Translator/Translator.php index b54fc51e9..33592e5ec 100644 --- a/src/CoreBundle/Translator/Translator.php +++ b/src/CoreBundle/Translator/Translator.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2019 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -12,30 +12,27 @@ * * @package MetaModels/core * @author Christian Schiffler - * @author Sven Baumann - * @copyright 2012-2019 The MetaModels team. + * @author Ingolf Steinhardt + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ namespace MetaModels\CoreBundle\Translator; +use Symfony\Component\Translation\MessageCatalogueInterface; use Symfony\Component\Translation\TranslatorBagInterface; -use Symfony\Component\Translation\TranslatorInterface as LegacyTranslatorInterface; use Symfony\Contracts\Translation\LocaleAwareInterface; use Symfony\Contracts\Translation\TranslatorInterface; -final class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleAwareInterface, LegacyTranslatorInterface +final class Translator implements TranslatorInterface, TranslatorBagInterface, LocaleAwareInterface { - /** - * @var TranslatorInterface|TranslatorBagInterface|LegacyTranslatorInterface - */ - private $translator; + private TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator; /** * @internal Do not inherit from this class; decorate the "contao.translation.translator" service instead */ - public function __construct(TranslatorInterface $translator) + public function __construct(TranslatorInterface&TranslatorBagInterface&LocaleAwareInterface $translator) { $this->translator = $translator; } @@ -49,19 +46,14 @@ public function __construct(TranslatorInterface $translator) public function trans($id, array $parameters = [], $domain = null, $locale = null): string { // Cut off the contao_ prefix for mm_ domains as they are already loaded via symfony. - if (0 === strncmp($domain, 'contao_mm_', 10)) { + if (null !== $domain && 0 === strncmp($domain, 'contao_mm_', 10)) { $domain = substr($domain, 7); - dump('REDIRECTED TO: ' . $domain); } + // Forward to Contao translator return $this->translator->trans($id, $parameters, $domain, $locale); } - public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null): string - { - return $this->translator->transChoice($id, $number, $parameters, $domain, $locale); - } - public function setLocale($locale): void { $this->translator->setLocale($locale); @@ -72,7 +64,7 @@ public function getLocale(): string return $this->translator->getLocale(); } - public function getCatalogue($locale = null) + public function getCatalogue($locale = null): MessageCatalogueInterface { return $this->translator->getCatalogue($locale); } diff --git a/src/DcGeneral/Data/Driver.php b/src/DcGeneral/Data/Driver.php index c04b07436..e429bff67 100644 --- a/src/DcGeneral/Data/Driver.php +++ b/src/DcGeneral/Data/Driver.php @@ -566,8 +566,10 @@ public function getVersions($mixID, $onlyActive = false) */ public function isUniqueValue($field, $new, $primaryId = null) { - $attribute = $this->getMetaModel()?->getAttribute($field); - if ($attribute) { + $model = $this->getMetaModel(); + assert($model instanceof IMetaModel); + $attribute = $model->getAttribute($field); + if (null !== $attribute) { $matchingIds = $this ->prepareFilter( $this->getEmptyConfig()->setFilter( diff --git a/src/DcGeneral/Data/FilterBuilder.php b/src/DcGeneral/Data/FilterBuilder.php index 1c33e57cc..510be7cc6 100644 --- a/src/DcGeneral/Data/FilterBuilder.php +++ b/src/DcGeneral/Data/FilterBuilder.php @@ -49,6 +49,7 @@ * @psalm-type TFilter=TFilterANDOR|TFilterForProperty * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) + * @SuppressWarnings(PHPMD.ExcessiveClassComplexity) */ class FilterBuilder { @@ -147,7 +148,7 @@ private function getFilterForComparingOperator($attribute, IFilter $filter, $ope { switch ($operation['operation']) { case '=': - $filter->addFilterRule($this->buildSearchAttributeFilterRule($attribute, $operation['value'])); + $filter->addFilterRule($this->buildSearchAttributeFilterRule($attribute, (string) $operation['value'])); return; case '>': diff --git a/src/DcGeneral/Events/MetaModel/DuplicateModel.php b/src/DcGeneral/Events/MetaModel/DuplicateModel.php index 501c9d6e3..cbf69dbd3 100644 --- a/src/DcGeneral/Events/MetaModel/DuplicateModel.php +++ b/src/DcGeneral/Events/MetaModel/DuplicateModel.php @@ -61,9 +61,8 @@ public function handle(PreDuplicateModelEvent $event) $model = $event->getModel(); $metaModel = $this->factory->getMetaModel($model->getProviderName()); - assert($metaModel instanceof IMetaModel); - if (!$metaModel->hasVariants()) { + if (null === $metaModel || !$metaModel->hasVariants()) { return; } diff --git a/src/Dca/Helper.php b/src/Dca/Helper.php index e4ff6551a..3669256f3 100644 --- a/src/Dca/Helper.php +++ b/src/Dca/Helper.php @@ -26,6 +26,7 @@ namespace MetaModels\Dca; +use Contao\CoreBundle\Intl\Locales; use Contao\Folder; use Contao\StringUtil; use Contao\System; @@ -127,17 +128,35 @@ public static function encodeLangArray($varValue, IMetaModel $metaModel) * @param IMetaModel $metaModel The MetaModel to extract the languages from. * @param TranslatorInterface $translator The translator to use. * - * @return \string[] + * @return array */ private static function buildLanguageArray(IMetaModel $metaModel, TranslatorInterface $translator) { $languages = []; - /** @psalm-suppress DeprecatedMethod */ - foreach ((array) $metaModel->getAvailableLanguages() as $langCode) { - $languages[$langCode] = $translator->translate('LNG.' . $langCode, 'languages'); + if ($metaModel instanceof ITranslatedMetaModel) { + $intlLocales = System::getContainer()->get('contao.intl.locales'); + assert($intlLocales instanceof Locales); + $labels = $intlLocales->getLocales(); + foreach ($metaModel->getLanguages() as $langCode) { + $languages[$langCode] = $labels[$langCode]; + } + + return $languages; + } + + /** + * @psalm-suppress DeprecatedMethod + * @psalm-suppress TooManyArguments + */ + if ($metaModel->isTranslated(false)) { + /** @psalm-suppress DeprecatedMethod */ + foreach ((array) $metaModel->getAvailableLanguages() as $langCode) { + $languages[$langCode] = $translator->translate('LNG.' . $langCode, 'contao_languages'); + } + return $languages; } - return $languages; + throw new \RuntimeException('Should not end up here.'); } /** @@ -195,7 +214,7 @@ public static function prepareLanguageAwareWidget( $rowClasses = []; foreach (\array_keys($arrValues) as $langCode) { - $rowClasses[] = ($langCode == $fallback) ? 'fallback_language' : 'normal_language'; + $rowClasses[] = ($langCode === $fallback) ? 'fallback_language' : 'normal_language'; } $extra = $property->getExtra(); @@ -227,6 +246,7 @@ public static function prepareLanguageAwareWidget( ] ], ]; + $extra['useTranslator'] = true; $property ->setWidgetType('multiColumnWizard') diff --git a/src/Filter/Rules/SimpleQuery.php b/src/Filter/Rules/SimpleQuery.php index 434ae9b0d..589a24acf 100644 --- a/src/Filter/Rules/SimpleQuery.php +++ b/src/Filter/Rules/SimpleQuery.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -15,7 +15,7 @@ * @author Sven Baumann * @author Cliff Parnitzky * @author Ingolf Steinhardt - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -123,7 +123,7 @@ public function getMatchingIds() $matches = $this->connection->executeQuery($this->queryString, $this->params, $this->types); $ids = []; foreach ($matches->fetchAllAssociative() as $value) { - $ids[] = $value[$this->idColumn]; + $ids[] = (string) $value[$this->idColumn]; } return $ids; diff --git a/src/Filter/Rules/StaticIdList.php b/src/Filter/Rules/StaticIdList.php index fe4955c18..4a5b2ca23 100644 --- a/src/Filter/Rules/StaticIdList.php +++ b/src/Filter/Rules/StaticIdList.php @@ -32,14 +32,14 @@ class StaticIdList extends FilterRule /** * The static id list that shall be applied. * - * @var list + * @var list|null */ protected $arrIds = []; /** * Create a new FilterRule instance. * - * @param list $arrIds Static list of ids that shall be returned as matches. + * @param list|null $arrIds Static list of ids that shall be returned as matches. */ public function __construct($arrIds) { diff --git a/src/Filter/Setting/SimpleLookup.php b/src/Filter/Setting/SimpleLookup.php index b181b621f..09df3880d 100644 --- a/src/Filter/Setting/SimpleLookup.php +++ b/src/Filter/Setting/SimpleLookup.php @@ -3,7 +3,7 @@ /** * This file is part of MetaModels/core. * - * (c) 2012-2023 The MetaModels team. + * (c) 2012-2024 The MetaModels team. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. @@ -16,7 +16,7 @@ * @author Stefan Heimes * @author Ingolf Steinhardt * @author Sven Baumann - * @copyright 2012-2023 The MetaModels team. + * @copyright 2012-2024 The MetaModels team. * @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later * @filesource */ @@ -24,6 +24,7 @@ namespace MetaModels\Filter\Setting; use Contao\StringUtil; +use Contao\System; use MetaModels\Attribute\IAttribute; use MetaModels\FrontendIntegration\FrontendFilterOptions; use MetaModels\IItem; @@ -33,6 +34,7 @@ use MetaModels\IMetaModel; use MetaModels\ITranslatedMetaModel; use MetaModels\Render\Setting\ICollection as IRenderSettings; +use Symfony\Contracts\Translation\TranslatorInterface; /** * Filter setting implementation performing a search for a value on a configured attribute. @@ -216,18 +218,16 @@ public function getParameterDCA() $arrOptions = $objAttribute->getFilterOptions(null, (bool) $this->get('onlyused')); + $translator = System::getContainer()->get('translator'); + assert($translator instanceof TranslatorInterface); + return [ (string) $this->getParamName() => [ - 'label' => [ - \sprintf( - $GLOBALS['TL_LANG']['MSC']['metamodel_filtersettings_parameter']['simplelookup'][0], - $objAttribute->getName() - ), - \sprintf( - $GLOBALS['TL_LANG']['MSC']['metamodel_filtersettings_parameter']['simplelookup'][1], - $objAttribute->getName() - ) - ], + 'label' => $translator->trans( + 'simplelookup.label', + ['%id%' => $objAttribute->getName()], + 'metamodels_filter' + ), 'inputType' => 'select', 'options' => $arrOptions, 'eval' => [ @@ -299,7 +299,7 @@ public function getParameterFilterWidgets( ), 'blankOptionLabel' => $this->get('label_as_blankoption') ? $this->getLabel() - : $GLOBALS['TL_LANG']['metamodels_frontendfilter']['do_not_filter'], + : $GLOBALS['TL_LANG']['metamodels_frontendfilter']['do_not_filter'] ?? '', 'colname' => $attribute->getColname(), 'urlparam' => $paramName, 'onlyused' => $this->get('onlyused'), diff --git a/src/FrontendIntegration/FrontendFilter.php b/src/FrontendIntegration/FrontendFilter.php index 70865b524..7b9d25845 100644 --- a/src/FrontendIntegration/FrontendFilter.php +++ b/src/FrontendIntegration/FrontendFilter.php @@ -443,7 +443,7 @@ protected function getFilters() 'filters' => $renderedWidgets, 'submit' => ($filterOptions->isAutoSubmit() ? '' - : $GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit'] + : $GLOBALS['TL_LANG']['metamodels_frontendfilter']['submit'] ?? '' ) ]; } diff --git a/src/FrontendIntegration/MetaModelHybrid.php b/src/FrontendIntegration/MetaModelHybrid.php index e48d20272..13c3477dc 100644 --- a/src/FrontendIntegration/MetaModelHybrid.php +++ b/src/FrontendIntegration/MetaModelHybrid.php @@ -24,11 +24,8 @@ namespace MetaModels\FrontendIntegration; use Contao\BackendTemplate; -use Contao\ContentModel; use Contao\Database\Result; -use Contao\FormModel; use Contao\Hybrid; -use Contao\ModuleModel; use Contao\StringUtil; use Contao\System; use Doctrine\DBAL\Connection; @@ -37,6 +34,7 @@ use MetaModels\IMetaModelsServiceContainer; use MetaModels\MetaModelsServiceContainer; use Symfony\Component\HttpFoundation\Request; +use Symfony\Contracts\Translation\TranslatorInterface; /** * Base implementation of a MetaModel Hybrid element. @@ -196,7 +194,7 @@ public function generate() // Add CSS file. $GLOBALS['TL_CSS'][] = 'bundles/metamodelscore/css/style.css'; - // Retrieve name of MetaModels. + // Retrieve name of MetaModel. $infoTemplate = '
%s: %s
'; @@ -205,10 +203,13 @@ public function generate() $metaModel = $factory->getMetaModel($metaModelName); assert($metaModel instanceof IMetaModel); + $translator = System::getContainer()->get('translator'); + assert($translator instanceof TranslatorInterface); + $strInfo = \sprintf( $infoTemplate, - $GLOBALS['TL_LANG']['MSC']['mm_be_info_name'][1], - $GLOBALS['TL_LANG']['MSC']['mm_be_info_name'][0], + $translator->trans('mm_be_info_name.description', [], 'metamodels_wildcard'), + $translator->trans('mm_be_info_name.label', [], 'metamodels_wildcard'), $metaModel->getName() ); @@ -229,14 +230,14 @@ public function generate() if ($infoFi) { $strInfo .= \sprintf( $infoTemplate, - $GLOBALS['TL_LANG']['MSC']['mm_be_info_filter'][1], - $GLOBALS['TL_LANG']['MSC']['mm_be_info_filter'][0], + $translator->trans('mm_be_info_filter.description', [], 'metamodels_wildcard'), + $translator->trans('mm_be_info_filter.label', [], 'metamodels_wildcard'), \current($infoFi) ); } } - // Retrieve name of rendersetting. + // Retrieve name of render setting. if ($this->metamodel_rendersettings) { $infoRs = $database ->createQueryBuilder() @@ -251,8 +252,8 @@ public function generate() if ($infoRs) { $strInfo .= \sprintf( $infoTemplate, - $GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting'][1], - $GLOBALS['TL_LANG']['MSC']['mm_be_info_render_setting'][0], + $translator->trans('mm_be_info_render_setting.description', [], 'metamodels_wildcard'), + $translator->trans('mm_be_info_render_setting.label', [], 'metamodels_wildcard'), \current($infoRs) ); } diff --git a/src/Item.php b/src/Item.php index 343b73b1c..44d502e24 100644 --- a/src/Item.php +++ b/src/Item.php @@ -479,7 +479,7 @@ public function parseValue($strOutputFormat = 'text', $objSettings = null) $arrResult['actions']['jumpTo'] = [ 'href' => $jumpTo['url'], 'deep' => $jumpTo['deep'], - 'label' => $this->getCaptionText('details'), + 'label' => $jumpTo['label'], 'class' => 'details' ]; } @@ -597,40 +597,6 @@ public function varCopy() return $objNewItem; } - - /** - * Retrieve the translation string for the given lang key. - * - * In order to achieve the correct caption text, the function tries several translation strings sequentially. - * The first language key that is set will win, even if it is to be considered empty. - * - * This message is looked up in the following order: - * 1. $GLOBALS['TL_LANG']['MSC'][][][$langKey] - * 2. $GLOBALS['TL_LANG']['MSC'][][$langKey] - * 3. $GLOBALS['TL_LANG']['MSC'][$langKey] - * - * @param string $langKey The language key to retrieve. - * - * @return string - * - * @SuppressWarnings(PHPMD.Superglobals) - * @SuppressWarnings(PHPMD.CamelCaseVariableName) - */ - private function getCaptionText($langKey) - { - $tableName = $this->getMetaModel()->getTableName(); - if ( - isset($this->objView) - && isset($GLOBALS['TL_LANG']['MSC'][$tableName][$this->objView->get('id')][$langKey]) - ) { - return $GLOBALS['TL_LANG']['MSC'][$tableName][$this->objView->get('id')][$langKey]; - } elseif (isset($GLOBALS['TL_LANG']['MSC'][$tableName][$langKey])) { - return $GLOBALS['TL_LANG']['MSC'][$tableName][$langKey]; - } - - return $GLOBALS['TL_LANG']['MSC'][$langKey]; - } - /** * Create the CSS class for variant information. * diff --git a/src/ItemList.php b/src/ItemList.php index f11e9e5f0..a10de0b28 100644 --- a/src/ItemList.php +++ b/src/ItemList.php @@ -53,6 +53,7 @@ use RuntimeException; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Contracts\Translation\TranslatorInterface; use function array_key_exists; use function array_keys; @@ -1099,8 +1100,14 @@ private function getCaptionText(string $langKey): string ) { return $GLOBALS['TL_LANG']['MSC'][$tableName][$this->objView->get('id')][$langKey]; } + if (null !== ($caption = $GLOBALS['TL_LANG']['MSC'][$tableName][$langKey] ?? null)) { + return $caption; + } + + $translator = System::getContainer()->get('translator'); + assert($translator instanceof TranslatorInterface); - return ($GLOBALS['TL_LANG']['MSC'][$tableName][$langKey] ?? $GLOBALS['TL_LANG']['MSC'][$langKey]); + return $translator->trans($langKey, [], 'metamodels_list'); } /** diff --git a/src/Render/Setting/Collection.php b/src/Render/Setting/Collection.php index f55ee9fe0..13fe9e2cd 100644 --- a/src/Render/Setting/Collection.php +++ b/src/Render/Setting/Collection.php @@ -35,6 +35,7 @@ use MetaModels\IMetaModel; use MetaModels\ITranslatedMetaModel; use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Contracts\Translation\TranslatorInterface; /** * Base implementation for render settings. @@ -188,10 +189,18 @@ public function getSettingNames() private function getJumpToLabel() { $tableName = $this->metaModel->getTableName(); + if ( + null !== ($label = ($GLOBALS['TL_LANG']['MSC'][$tableName][$this->get('id')]['details'] ?? + ($GLOBALS['TL_LANG']['MSC'][$tableName]['details'] ?? + ($GLOBALS['TL_LANG']['MSC']['details'] ?? null)))) + ) { + return $label; + } + + $translator = System::getContainer()->get('translator'); + assert($translator instanceof TranslatorInterface); - return ($GLOBALS['TL_LANG']['MSC'][$tableName][$this->get('id')]['details'] ?? - ($GLOBALS['TL_LANG']['MSC'][$tableName]['details'] ?? - $GLOBALS['TL_LANG']['MSC']['details'])); + return $translator->trans('details', [], $tableName); } /** diff --git a/src/ViewCombination/InputScreenInformationBuilder.php b/src/ViewCombination/InputScreenInformationBuilder.php index 66be513d9..620d1c9de 100644 --- a/src/ViewCombination/InputScreenInformationBuilder.php +++ b/src/ViewCombination/InputScreenInformationBuilder.php @@ -61,6 +61,35 @@ public function __construct(Connection $connection, IFactory $factory) $this->factory = $factory; } + /** + * Fetch information about all input screens. + * + * @return array + * + * @throws Exception + */ + public function fetchAllInputScreensForTable(string $tableName): array + { + $builder = $this->connection->createQueryBuilder(); + $screens = $builder + ->select('d.*') + ->from('tl_metamodel_dca', 'd') + ->leftJoin('d', 'tl_metamodel', 'm', 'm.id=d.pid') + ->where($builder->expr()->in('m.tableName', ':tableName')) + ->setParameter('tableName', $tableName) + ->orderBy('m.sorting') + ->executeQuery() + ->fetchAllAssociative(); + + $result = []; + foreach ($screens as $screen) { + $result[$screen['id']] = $this->prepareInputScreen($tableName, $screen); + // FIXME: simplify prepareInputScreen to not translate the values inline but define translation keys. + } + + return $result; + } + /** * Fetch information about an input screen. * @@ -117,7 +146,7 @@ private function prepareInputScreen(string $modelName, array $screen): array throw new \InvalidArgumentException('Could not retrieve MetaModel ' . $modelName); } $caption = ['' => $metaModel->getName()]; - $description = ['' => $metaModel->getName()]; + $description = ['' => '']; $fallback = null; /** * @psalm-suppress DeprecatedMethod diff --git a/tests/Data/FilterBuilderTest.php b/tests/Data/FilterBuilderTest.php index 053abe73f..155005769 100644 --- a/tests/Data/FilterBuilderTest.php +++ b/tests/Data/FilterBuilderTest.php @@ -160,7 +160,7 @@ public function testBuildSqlOnly() $filter = $builder->build(); - self::assertSame([0, 1, 2, 3], $filter->getMatchingIds()); + self::assertSame(['0', '1', '2', '3'], $filter->getMatchingIds()); } /** @@ -184,7 +184,7 @@ public function testIssue700() ->expects(self::once()) ->method('searchFor') ->with('*test*') - ->willReturn([0, 1, 2, 3]); + ->willReturn(['0', '1', '2', '3']); /** @var \MetaModels\Attribute\Base $attribute */ $metaModel->addAttribute($attribute); @@ -220,6 +220,6 @@ public function testIssue700() $filter = $builder->build(); - self::assertSame([0, 1, 2, 3], $filter->getMatchingIds()); + self::assertSame(['0', '1', '2', '3'], $filter->getMatchingIds()); } } diff --git a/tests/MetaModelsTest.php b/tests/MetaModelsTest.php index 689003076..4f91d560a 100644 --- a/tests/MetaModelsTest.php +++ b/tests/MetaModelsTest.php @@ -24,7 +24,6 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder; use Doctrine\DBAL\Query\QueryBuilder; use Doctrine\DBAL\Result; -use Doctrine\DBAL\Statement; use MetaModels\MetaModel; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase;