Add more words to translate

This commit is contained in:
Thomas 2019-08-21 12:09:52 +02:00
parent a94f1695f6
commit 79f2609f70
4 changed files with 40 additions and 12 deletions

View file

@ -48,8 +48,14 @@ class ComposeType extends AbstractType {
$checkbox = ['required' => false]; $checkbox = ['required' => false];
} }
$builder->add('content_warning', TextType::class, ['required' => false]); $builder->add('content_warning', TextType::class, [
$builder->add('content', TextareaType::class, ['required' => false]); 'required' => false,
'label' => 'page.schedule.form.content_warning',
'translation_domain' => 'fediplan']);
$builder->add('content', TextareaType::class, [
'required' => false,
'label' => 'page.schedule.form.content',
'translation_domain' => 'fediplan']);
$builder->add('visibility', ChoiceType::class, $builder->add('visibility', ChoiceType::class,
[ [
'choices' => [ 'choices' => [
@ -59,14 +65,22 @@ class ComposeType extends AbstractType {
'status.visibility.direct' => 'direct', 'status.visibility.direct' => 'direct',
], ],
'data' => $user->getDefaultVisibility(), 'data' => $user->getDefaultVisibility(),
]); 'label' => 'page.schedule.form.visibility',
$builder->add('timeZone', TimezoneType::class); 'translation_domain' => 'fediplan']);
$builder->add('timeZone', TimezoneType::class,
[
'label' => 'page.schedule.form.timeZone',
'translation_domain' => 'fediplan']);
$builder->add('sensitive', CheckboxType::class, $checkbox); $builder->add('sensitive', CheckboxType::class, $checkbox);
$builder->add('scheduled_at', \Symfony\Component\Form\Extension\Core\Type\DateTimeType::class,[ $builder->add('scheduled_at', \Symfony\Component\Form\Extension\Core\Type\DateTimeType::class,[
'widget' => 'single_text', 'widget' => 'single_text',
"data" => new \DateTime() "data" => new \DateTime(),
]); 'label' => 'page.schedule.form.scheduled_at',
$builder->add('Send', SubmitType::class, ['attr' => ['class' => "btn btn-primary "]]); 'translation_domain' => 'fediplan']);
$builder->add('Send', SubmitType::class,
['attr' => ['class' => "btn btn-primary "],
'label' => 'page.schedule.form.send',
'translation_domain' => 'fediplan']);
} }

View file

@ -19,13 +19,15 @@ class ConnectMastodonAccountType extends AbstractType {
switch ($options['flow_step']) { switch ($options['flow_step']) {
case 1: case 1:
$builder->add('host', TextType::class, [ $builder->add('host', TextType::class, [
'label' => 'Your instance', 'label' => 'page.index.form.instance',
'translation_domain' => 'fediplan'
]); ]);
break; break;
case 2: case 2:
// This form type is not defined in the example. // This form type is not defined in the example.
$builder->add('code', TextType::class, [ $builder->add('code', TextType::class, [
'label' => 'Your authorization code', 'label' => 'page.index.form.code',
'translation_domain' => 'fediplan'
]); ]);
$builder->add('client_id', HiddenType::class); $builder->add('client_id', HiddenType::class);
$builder->add('client_secret', HiddenType::class); $builder->add('client_secret', HiddenType::class);

View file

@ -81,7 +81,7 @@
<div class="row"> <div class="row">
<div class=" col-md-6"> <div class=" col-md-6">
<div class="form-group has-feedback"> <div class="form-group has-feedback">
Counter: <span id="count">0</span> {{ 'common.counter'|trans }}: <span id="count">0</span>
</div> </div>
</div> </div>
</div> </div>

View file

@ -17,6 +17,7 @@ common:
delete: Delete delete: Delete
proceed_confirm: Do you want to proceed? proceed_confirm: Do you want to proceed?
start_upload: Start upload start_upload: Start upload
counter: Counter
status: status:
visibility: visibility:
public: Public public: Public
@ -45,6 +46,9 @@ page:
FediPlan is an open source application (<a href="https://framagit.org/tom79/fediplan" target="_blank">source code</a>) built for scheduling your messages with <a href="https://joinmastodon.org/" target="_blank">Mastodon</a> or <a href="https://pleroma.social/" target="_blank">Pleroma</a> (2.7+). FediPlan is an open source application (<a href="https://framagit.org/tom79/fediplan" target="_blank">source code</a>) built for scheduling your messages with <a href="https://joinmastodon.org/" target="_blank">Mastodon</a> or <a href="https://pleroma.social/" target="_blank">Pleroma</a> (2.7+).
data: data:
It <b>does not store any data</b> (token or messages), that is why you need to create a new Token when your session expired. It <b>does not store any data</b> (token or messages), that is why you need to create a new Token when your session expired.
form:
code: Your authorization code
instance: Your instance
about: about:
scheduling: scheduling:
FediPlan allows users to schedule messages for Mastodon and Pleroma (with media attachments).<br/> FediPlan allows users to schedule messages for Mastodon and Pleroma (with media attachments).<br/>
@ -54,5 +58,13 @@ page:
FediPlan does not store your scheduled messages nor your credentials. It only uses the Mastodon API for <a href="https://docs.joinmastodon.org/api/rest/statuses/#scheduled-status" target="_blank">scheduling messages</a> FediPlan does not store your scheduled messages nor your credentials. It only uses the Mastodon API for <a href="https://docs.joinmastodon.org/api/rest/statuses/#scheduled-status" target="_blank">scheduling messages</a>
issues: issues:
You can report issues or ask improvements on <a href="https://github.com/stom79/FediPlan/issues" target="_blank">Github</a> or <a href="https://framagit.org/tom79/fediplan/issues" target="_blank">Framagit</a>. You can report issues or ask improvements on <a href="https://github.com/stom79/FediPlan/issues" target="_blank">Github</a> or <a href="https://framagit.org/tom79/fediplan/issues" target="_blank">Framagit</a>.
scheduled: schedule:
delete: form:
content_warning: Content warning
content: Content
visibility: Visibility
timeZone: Timezone
sensitive: Sensitive
scheduled_at: Scheduled at
send: Send