@@ -284,7 +284,11 @@ private function initializeContentTypeLabelAndDescription(
284284 $ languagePathLabel = $ languagePathTitle . '.label ' ;
285285 $ languagePathTitle = $ languagePathTitle . '.title ' ;
286286 $ languagePathDescription = $ languagePathDescription . '.description ' ;
287- $ result ->contentType ->title = $ title ;
287+ // A Collection defining "title" must not be overwritten by the field label.
288+ $ result ->contentType ->hasExplicitCollectionTitle = $ title !== '' ;
289+ // Without an explicit title, the field label is the title of the Collection's table.
290+ // $title itself stays empty, so no automatic language key is generated for it.
291+ $ result ->contentType ->title = $ title !== '' ? $ title : (string )($ input ->yaml ['label ' ] ?? '' );
288292 $ result ->contentType ->description = $ description ;
289293 }
290294 $ languagePathSource = new AutomaticLanguageSource ($ languagePathTitle , $ title );
@@ -399,11 +403,6 @@ private function getFieldLabelPath(LanguagePath $languagePath): string
399403 return $ languagePath ->getCurrentPath () . '.label ' ;
400404 }
401405
402- private function getFieldTitlePath (LanguagePath $ languagePath ): string
403- {
404- return $ languagePath ->getCurrentPath () . '.title ' ;
405- }
406-
407406 private function getFieldDescriptionPath (LanguagePath $ languagePath ): string
408407 {
409408 return $ languagePath ->getCurrentPath () . '.description ' ;
@@ -664,10 +663,6 @@ private function processCollection(ProcessingInput $input, ProcessedFieldsResult
664663 // Disable sorting as it is already handled in MM table.
665664 $ field ['sortable ' ] = false ;
666665 }
667- // The Collection's title equals the field label.
668- if (!isset ($ field ['title ' ])) {
669- $ field ['title ' ] = $ field ['label ' ];
670- }
671666 // Anonymous Collections can't have a type field.
672667 $ field ['typeField ' ] = null ;
673668 $ newInput = new ProcessingInput (
0 commit comments