Skip to content

Commit b1903ea

Browse files
authored
IBX-6721: Added missing translation for custom_url_alias_add_form.sit… (#1113)
IBX-6721: Added missing translation for custom_url_alias_add_form.site_access.placeholder
1 parent c4907f7 commit b1903ea

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

src/bundle/Resources/translations/ibexa_content_url.en.xliff

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
77
</header>
88
<body>
9+
<trans-unit id="fe1c876b1a9bcde155f03227bce4ae4fbd54c24f" resname="custom_url_alias_add_form.add">
10+
<source>Create</source>
11+
<target state="new">Create</target>
12+
<note>key: custom_url_alias_add_form.add</note>
13+
</trans-unit>
14+
<trans-unit id="71a3521d37991dc43b665d2cc94b7e1589360f48" resname="custom_url_alias_add_form.site_access.placeholder">
15+
<source>None</source>
16+
<target state="new">None</target>
17+
<note>key: custom_url_alias_add_form.site_access.placeholder</note>
18+
</trans-unit>
919
<trans-unit id="5c48ac36c2a46c2dc2a89fd4c91a2a3d684eb5d8" resname="tab.urls.action.add">
1020
<source>Add</source>
1121
<target state="new">Add</target>

src/bundle/Resources/translations/messages.en.xliff

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -236,21 +236,11 @@
236236
<target state="new">More</target>
237237
<note>key: content_type_selector.list.show_more</note>
238238
</trans-unit>
239-
<trans-unit id="fe1c876b1a9bcde155f03227bce4ae4fbd54c24f" resname="custom_url_alias_add_form.add">
240-
<source>Create</source>
241-
<target state="new">Create</target>
242-
<note>key: custom_url_alias_add_form.add</note>
243-
</trans-unit>
244239
<trans-unit id="84348d405f3829787a5dfa80fbe5abbf07e3c118" resname="custom_url_alias_add_form.remove">
245240
<source>Delete</source>
246241
<target state="new">Delete</target>
247242
<note>key: custom_url_alias_add_form.remove</note>
248243
</trans-unit>
249-
<trans-unit id="71a3521d37991dc43b665d2cc94b7e1589360f48" resname="custom_url_alias_add_form.site_access.placeholder">
250-
<source>None</source>
251-
<target state="new">None</target>
252-
<note>key: custom_url_alias_add_form.site_access.placeholder</note>
253-
</trans-unit>
254244
<trans-unit id="3b2d2efac582e8c8d6eccb40d4499ecf9ee21f95" resname="dashboard.charts.no_data">
255245
<source><![CDATA[No data collected<br/> for the selected period]]></source>
256246
<target state="new"><![CDATA[No data collected<br/> for the selected period]]></target>
@@ -503,16 +493,16 @@
503493
<target state="new">Change password</target>
504494
<note>key: my_account_settings.password.action.edit</note>
505495
</trans-unit>
496+
<trans-unit id="0305297fa410b3bfb22eb87fa2bea63dabf7e2d6" resname="my_account_settings.password.message">
497+
<source>You don't have permissions to change the password. Contact your administrator.</source>
498+
<target state="new">You don't have permissions to change the password. Contact your administrator.</target>
499+
<note>key: my_account_settings.password.message</note>
500+
</trans-unit>
506501
<trans-unit id="2273b0c5061ff374bd0d5a75e9301721f7312b65" resname="my_account_settings.password.title">
507502
<source>Password</source>
508503
<target state="new">Password</target>
509504
<note>key: my_account_settings.password.title</note>
510505
</trans-unit>
511-
<trans-unit id="0305297fa410b3bfb22eb87fa2bea63dabf7e2d6" resname="my_account_settings.password.message">
512-
<source>You don't have permissions to change the password. Contact your administrator.</source>
513-
<target state="new">You don't have permissions to change the password. Contact your administrator.</target>
514-
<note>key: user.password.message</note>
515-
</trans-unit>
516506
<trans-unit id="5b03625b8de51d296ad7f4bc980e631c964185d8" resname="notification.no_longer_available">
517507
<source>The Content item is no longer available</source>
518508
<target state="new">The Content item is no longer available</target>

src/lib/Form/Type/Content/CustomUrl/CustomUrlAddType.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Ibexa\AdminUi\Siteaccess\SiteAccessNameGeneratorInterface;
1717
use Ibexa\AdminUi\Siteaccess\SiteaccessResolverInterface;
1818
use Ibexa\Contracts\Core\Repository\LanguageService;
19+
use JMS\TranslationBundle\Annotation\Desc;
1920
use Symfony\Component\Form\AbstractType;
2021
use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader;
2122
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
@@ -24,6 +25,7 @@
2425
use Symfony\Component\Form\Extension\Core\Type\TextType;
2526
use Symfony\Component\Form\FormBuilderInterface;
2627
use Symfony\Component\Form\FormEvents;
28+
use Symfony\Component\OptionsResolver\OptionsResolver;
2729

2830
class CustomUrlAddType extends AbstractType
2931
{
@@ -115,7 +117,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
115117
$this->siteAccessNameGenerator,
116118
$location
117119
),
118-
'placeholder' => /** @Desc("None") */ 'custom_url_alias_add_form.site_access.placeholder',
120+
'placeholder' => /** @Desc("None") */ 'custom_url_alias_add_form.site_access.placeholder',
119121
]
120122
)
121123
->add(
@@ -130,15 +132,24 @@ public function buildForm(FormBuilderInterface $builder, array $options)
130132
$this->addLanguageFieldBasedOnContentListener,
131133
'onPreSetData',
132134
]);
135+
133136
$builder->addEventListener(FormEvents::PRE_SUBMIT, [
134137
$this->buildPathFromRootListener,
135138
'onPreSubmitData',
136139
]);
140+
137141
$builder->addEventListener(FormEvents::PRE_SET_DATA, [
138142
$this->checkboxIfRootLocationListener,
139143
'onPreSetData',
140144
]);
141145
}
146+
147+
public function configureOptions(OptionsResolver $resolver): void
148+
{
149+
$resolver->setDefaults([
150+
'translation_domain' => 'ibexa_content_url',
151+
]);
152+
}
142153
}
143154

144155
class_alias(CustomUrlAddType::class, 'EzSystems\EzPlatformAdminUi\Form\Type\Content\CustomUrl\CustomUrlAddType');

0 commit comments

Comments
 (0)