@@ -549,13 +549,10 @@ class Translation extends AbstractDateTimed implements TranslationInterface
549549 * fr or en for example
550550 *
551551 * @see https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes
552- *
553- * @Serializer\Groups({"translation", "document", "nodes_sources", "tag", "attribute", "folder", "log_sources"})
554- *
555- * @Serializer\Type("string")
556552 */
557553 #[ORM \Column(type: 'string ' , length: 10 , unique: true , nullable: false )]
558554 #[SymfonySerializer \Ignore]
555+ #[Serializer \Exclude]
559556 #[Assert \NotBlank]
560557 #[Assert \NotNull]
561558 #[Assert \Length(max: 10 )]
@@ -565,27 +562,20 @@ class Translation extends AbstractDateTimed implements TranslationInterface
565562 )]
566563 private string $ locale = '' ;
567564
568- /**
569- * @Serializer\Groups({"translation", "document", "nodes_sources", "tag", "attribute", "folder"})
570- *
571- * @Serializer\Type("string")
572- */
573565 #[ORM \Column(name: 'override_locale ' , type: 'string ' , length: 10 , unique: true , nullable: true )]
574566 #[SymfonySerializer \Ignore]
567+ #[Serializer \Exclude]
575568 #[Assert \Length(max: 10 )]
576569 #[ApiProperty(
577570 description: 'Override standard locale with an other one (for example, `uk` instead of `en`) ' ,
578571 example: 'uk ' ,
579572 )]
580573 private ?string $ overrideLocale = null ;
581574
582- /**
583- * @Serializer\Groups({"translation", "translation_base"})
584- *
585- * @Serializer\Type("string")
586- */
587575 #[ORM \Column(type: 'string ' , length: 250 , unique: true )]
588576 #[SymfonySerializer \Groups(['translation ' , 'translation_base ' ])]
577+ #[Serializer \Groups(['translation ' , 'translation_base ' ])]
578+ #[Serializer \Type('string ' )]
589579 #[Assert \NotNull]
590580 #[Assert \NotBlank]
591581 #[Assert \Length(max: 250 )]
@@ -595,26 +585,20 @@ class Translation extends AbstractDateTimed implements TranslationInterface
595585 )]
596586 private string $ name = '' ;
597587
598- /**
599- * @Serializer\Groups({"translation", "translation_base"})
600- *
601- * @Serializer\Type("bool")
602- */
603588 #[ORM \Column(name: 'default_translation ' , type: 'boolean ' , nullable: false , options: ['default ' => false ])]
604589 #[SymfonySerializer \Groups(['translation ' , 'translation_base ' ])]
590+ #[Serializer \Groups(['translation ' , 'translation_base ' ])]
591+ #[Serializer \Type('bool ' )]
605592 #[ApiProperty(
606593 description: 'Is translation default one? ' ,
607594 example: 'true ' ,
608595 )]
609596 private bool $ defaultTranslation = false ;
610597
611- /**
612- * @Serializer\Groups({"translation", "translation_base"})
613- *
614- * @Serializer\Type("bool")
615- */
616598 #[ORM \Column(type: 'boolean ' , nullable: false , options: ['default ' => true ])]
617599 #[SymfonySerializer \Groups(['translation ' , 'translation_base ' ])]
600+ #[Serializer \Groups(['translation ' , 'translation_base ' ])]
601+ #[Serializer \Type('bool ' )]
618602 #[ApiProperty(
619603 description: 'Is translation available publicly? ' ,
620604 example: 'true ' ,
@@ -778,6 +762,8 @@ public function setOverrideLocale(?string $overrideLocale): Translation
778762 */
779763 #[SymfonySerializer \SerializedName('locale ' )]
780764 #[SymfonySerializer \Groups(['translation_base ' ])]
765+ #[Serializer \SerializedName('locale ' )]
766+ #[Serializer \Groups(['translation_base ' ])]
781767 #[ApiProperty(
782768 description: 'Translation ISO 639-1 locale. See https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes ' ,
783769 example: 'fr ' ,
0 commit comments