Skip to content

Commit 1585b7d

Browse files
committed
feature #907 Add translations for input help (ker0x)
This PR was merged into the master branch. Discussion ---------- Add translations for input help This PR add EN and FR translations for inputs help for Post and Comment Form. Commits ------- 0ea9e70 Add translations for input help
2 parents 39f0d9c + 0ea9e70 commit 1585b7d

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

src/Form/CommentType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4242

4343
$builder
4444
->add('content', TextareaType::class, [
45-
'help' => 'Comments not complying with our Code of Conduct will be moderated.',
45+
'help' => 'help.comment_content',
4646
])
4747
;
4848
}

src/Form/PostType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,17 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4848
'label' => 'label.title',
4949
])
5050
->add('summary', TextareaType::class, [
51-
'help' => 'Summaries can\'t contain Markdown or HTML contents; only plain text.',
51+
'help' => 'help.summary',
5252
'label' => 'label.summary',
5353
])
5454
->add('content', null, [
5555
'attr' => ['rows' => 20],
56-
'help' => 'Use Markdown to format the blog post contents. HTML is allowed too.',
56+
'help' => 'help.post_content',
5757
'label' => 'label.content',
5858
])
5959
->add('publishedAt', DateTimePickerType::class, [
6060
'label' => 'label.published_at',
61-
'help' => 'Set the date in the future to schedule the blog post publication.',
61+
'help' => 'help.published_at',
6262
])
6363
->add('tags', TagsInputType::class, [
6464
'label' => 'label.tags',

translations/messages+intl-icu.en.xlf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,22 @@
395395
<source>help.more_information</source>
396396
<target><![CDATA[For more information, check out the <a href="https://symfony.com/doc">Symfony doc</a>.]]></target>
397397
</trans-unit>
398+
<trans-unit id="help.summary">
399+
<source>help.summary</source>
400+
<target>Summaries can't contain Markdown or HTML contents; only plain text.</target>
401+
</trans-unit>
402+
<trans-unit id="help.published_at">
403+
<source>help.published_at</source>
404+
<target>Set the date in the future to schedule the blog post publication.</target>
405+
</trans-unit>
406+
<trans-unit id="help.post_content">
407+
<source>help.post_content</source>
408+
<target>Use Markdown to format the blog post contents. HTML is allowed too.</target>
409+
</trans-unit>
410+
<trans-unit id="help.comment_content">
411+
<source>help.comment_content</source>
412+
<target>Comments not complying with our Code of Conduct will be moderated.</target>
413+
</trans-unit>
398414

399415
<trans-unit id="info.change_password">
400416
<source>info.change_password</source>

translations/messages+intl-icu.fr.xlf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,22 @@
395395
<source>help.more_information</source>
396396
<target><![CDATA[Pour plus d'informations, consultez la <a href="https://symfony.com/doc">documentation de Symfony</a>.]]></target>
397397
</trans-unit>
398+
<trans-unit id="help.summary">
399+
<source>help.summary</source>
400+
<target>Les résumés ne peuvent pas contenir de contenu Markdown ou HTML ; seulement du texte brut.</target>
401+
</trans-unit>
402+
<trans-unit id="help.published_at">
403+
<source>help.published_at</source>
404+
<target>Sélectionnez une date future pour programmer la publication de l'article.</target>
405+
</trans-unit>
406+
<trans-unit id="help.post_content">
407+
<source>help.post_content</source>
408+
<target>Utilisez du Markdown pour formater le contenu de l'article. Le HTML est également autorisé.</target>
409+
</trans-unit>
410+
<trans-unit id="help.comment_content">
411+
<source>help.comment_content</source>
412+
<target>Les commentaires non conformes à notre code de conduite seront modérés.</target>
413+
</trans-unit>
398414

399415
<trans-unit id="info.change_password">
400416
<source>info.change_password</source>

0 commit comments

Comments
 (0)