8000 Updated the translation strings related to validation · SofHad/symfony@7c6e0ed · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c6e0ed

Browse files
committed
Updated the translation strings related to validation
1 parent 7770358 commit 7c6e0ed

File tree

3 files changed

+18
-21
lines changed

3 files changed

+18
-21
lines changed

app/Resources/translations/messages.en.xliff

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -233,30 +233,30 @@
233233
<target><![CDATA[For more information, check out the <a href="http://symfony.com/doc">Symfony doc</a>.]]></target>
234234
</trans-unit>
235235

236-
<trans-unit id="entity.comment_blank">
236+
<trans-unit id="post.blank_summary">
237+
<source>entity.summary_blank</source>
238+
<target>Give your post a summary!</target>
239+
</trans-unit>
240+
<trans-unit id="post.too_short_content">
241+
<source>entity.post_short</source>
242+
<target>Post content is too short ({{ limit }} characters minimum)</target>
243+
</trans-unit>
244+
<trans-unit id="comment.blank">
237245
<source>entity.comment_blank</source>
238246
<target>Please don't leave your comment blank!</target>
239247
</trans-unit>
240-
<trans-unit id="entity.comment_short">
248+
<trans-unit id="comment.too_short">
241249
<source>entity.comment_short</source>
242250
<target>Comment is too short ({{ limit }} characters minimum)</target>
243251
</trans-unit>
244-
<trans-unit id="entity.comment_long">
252+
<trans-unit id="comment.too_long">
245253
<source>entity.comment_long</source>
246254
<target>Comment is too long ({{ limit }} characters maximum)</target>
247255
</trans-unit>
248-
<trans-unit id="entity.comment_invalid">
256+
<trans-unit id="comment.is_spam">
249257
<source>entity.comment_invalid</source>
250258
<target>The content of this comment is considered spam.</target>
251259
</trans-unit>
252-
<trans-unit id="entity.summary_blank">
253-
<source>entity.summary_blank</source>
254-
<target>Give your post a summary!</target>
255-
</trans-unit>
256-
<trans-unit id="entity.post_short">
257-
<source>entity.post_short</source>
258-
<target>Post content is too short ({{ limit }} characters minimum)</target>
259-
</trans-unit>
260260
</body>
261261
</file>
262262
</xliff>

src/AppBundle/Entity/Comment.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ class Comment
4343

4444
/**
4545
* @ORM\Column(type="text")
46-
* @Assert\NotBlank(message="entity.comment_blank")
46+
* @Assert\NotBlank(message="comment.blank")
4747
* @Assert\Length(
4848
* min = "5",
49-
* minMessage = "entity.comment_short",
49+
* minMessage = "comment.too_short",
5050
* max = "10000",
51-
* maxMessage = "entity.comment_long"
51+
* maxMessage = "comment.too_long"
5252
* )
5353
*/
5454
private $content;
@@ -71,7 +71,7 @@ public function __construct()
7171
}
7272

7373
/**
74-
* @Assert\IsTrue(message = "entity.comment_invalid")
74+
* @Assert\IsTrue(message = "comment.is_spam")
7575
*/
7676
public function isLegitComment()
7777
{

src/AppBundle/Entity/Post.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,13 @@ class Post
4747

4848
/**
4949
* @ORM\Column(type="string")
50-
* @Assert\NotBlank(message="entity.summary_blank")
50+
* @Assert\NotBlank(message="post.blank_summary")
5151
*/
5252
private $summary;
5353

5454
/**
5555
* @ORM\Column(type="text")
56-
* @Assert\Length(
57-
* min = "10",
58-
* minMessage = "entity.post_short"
59-
* )
56+
* @Assert\Length(min = "10", minMessage = "post.too_short_content")
6057
*/
6158
private $content;
6259

0 commit comments

Comments
 (0)
0