From 4dc872238a61f33c886c423c5812cc578b3b1cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 26 Feb 2016 13:59:08 +0100 Subject: Rename CommentBundle with AnnotationBundle --- src/Wallabag/CoreBundle/Entity/Entry.php | 18 +++++++++--------- .../CoreBundle/Resources/translations/messages.fr.yml | 2 +- .../Resources/views/themes/baggy/Entry/entry.html.twig | 8 ++++---- .../views/themes/material/Entry/entry.html.twig | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/Wallabag/CoreBundle') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 5cf84f03..bd712a04 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -9,7 +9,7 @@ use JMS\Serializer\Annotation\Groups; use JMS\Serializer\Annotation\XmlRoot; use Symfony\Component\Validator\Constraints as Assert; use Wallabag\UserBundle\Entity\User; -use Wallabag\CommentBundle\Entity\Comment; +use Wallabag\AnnotationBundle\Entity\Annotation; /** * Entry. @@ -99,12 +99,12 @@ class Entry private $updatedAt; /** - * @ORM\OneToMany(targetEntity="Wallabag\CommentBundle\Entity\Comment", mappedBy="entry", cascade={"persist", "remove"}) + * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"}) * @ORM\JoinTable * * @Groups({"entries_for_user", "export_all"}) */ - private $comments; + private $annotations; /** * @var string @@ -366,19 +366,19 @@ class Entry } /** - * @return ArrayCollection + * @return ArrayCollection */ - public function getComments() + public function getAnnotations() { - return $this->comments; + return $this->annotations; } /** - * @param Comment $comment + * @param Annotation $annotation */ - public function setComment(Comment $comment) + public function setAnnotation(Annotation $annotation) { - $this->comments[] = $comment; + $this->annotations[] = $annotation; } /** diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml index 548a164b..e4935b9e 100644 --- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml +++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml @@ -98,7 +98,7 @@ Toggle favorite: 'Marquer comme favori' Delete: 'Supprimer' "{0} There is no entry.|{1} There is one entry.|]1,Inf[ There are %count% entries.": "{0} Il n'y a pas d'articles.|{1} Il y a un article.|]1,Inf[ Il y a %count% articles." http://website: "http://siteweb" -"{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations": "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbComments% annotations" +"{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations": "{0} Aucune annotation|{1} Une annotation|]1,Inf[ %nbAnnotations% annotations" # Edit entry Edit an entry: "Éditer un article" diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig index 817e39b8..9323e787 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig @@ -29,8 +29,8 @@
  • {% trans %}Does this article appear wrong?{% endtrans %}
  • - {% set nbComments = entry.comments | length %} - {% transchoice nbComments %}{0} No annotations|{1} One annotation|]1,Inf[ %nbComments% annotations{% endtranschoice %} + {% set nbAnnotations = entry.annotations | length %} + {% transchoice nbAnnotations %}{0} No annotations|{1} One annotation|]1,Inf[ %nbAnnotations% annotations{% endtranschoice %}