Skip to content

Commit

Permalink
IBX-6721: Added missing translation for custom_url_alias_add_form.sit… (
Browse files Browse the repository at this point in the history
#1113)

IBX-6721: Added missing translation for custom_url_alias_add_form.site_access.placeholder
  • Loading branch information
adamwojs authored Jan 12, 2024
1 parent c4907f7 commit b1903ea
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
10 changes: 10 additions & 0 deletions src/bundle/Resources/translations/ibexa_content_url.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
<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>
</header>
<body>
<trans-unit id="fe1c876b1a9bcde155f03227bce4ae4fbd54c24f" resname="custom_url_alias_add_form.add">
<source>Create</source>
<target state="new">Create</target>
<note>key: custom_url_alias_add_form.add</note>
</trans-unit>
<trans-unit id="71a3521d37991dc43b665d2cc94b7e1589360f48" resname="custom_url_alias_add_form.site_access.placeholder">
<source>None</source>
<target state="new">None</target>
<note>key: custom_url_alias_add_form.site_access.placeholder</note>
</trans-unit>
<trans-unit id="5c48ac36c2a46c2dc2a89fd4c91a2a3d684eb5d8" resname="tab.urls.action.add">
<source>Add</source>
<target state="new">Add</target>
Expand Down
20 changes: 5 additions & 15 deletions src/bundle/Resources/translations/messages.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -236,21 +236,11 @@
<target state="new">More</target>
<note>key: content_type_selector.list.show_more</note>
</trans-unit>
<trans-unit id="fe1c876b1a9bcde155f03227bce4ae4fbd54c24f" resname="custom_url_alias_add_form.add">
<source>Create</source>
<target state="new">Create</target>
<note>key: custom_url_alias_add_form.add</note>
</trans-unit>
<trans-unit id="84348d405f3829787a5dfa80fbe5abbf07e3c118" resname="custom_url_alias_add_form.remove">
<source>Delete</source>
<target state="new">Delete</target>
<note>key: custom_url_alias_add_form.remove</note>
</trans-unit>
<trans-unit id="71a3521d37991dc43b665d2cc94b7e1589360f48" resname="custom_url_alias_add_form.site_access.placeholder">
<source>None</source>
<target state="new">None</target>
<note>key: custom_url_alias_add_form.site_access.placeholder</note>
</trans-unit>
<trans-unit id="3b2d2efac582e8c8d6eccb40d4499ecf9ee21f95" resname="dashboard.charts.no_data">
<source><![CDATA[No data collected<br/> for the selected period]]></source>
<target state="new"><![CDATA[No data collected<br/> for the selected period]]></target>
Expand Down Expand Up @@ -503,16 +493,16 @@
<target state="new">Change password</target>
<note>key: my_account_settings.password.action.edit</note>
</trans-unit>
<trans-unit id="0305297fa410b3bfb22eb87fa2bea63dabf7e2d6" resname="my_account_settings.password.message">
<source>You don't have permissions to change the password. Contact your administrator.</source>
<target state="new">You don't have permissions to change the password. Contact your administrator.</target>
<note>key: my_account_settings.password.message</note>
</trans-unit>
<trans-unit id="2273b0c5061ff374bd0d5a75e9301721f7312b65" resname="my_account_settings.password.title">
<source>Password</source>
<target state="new">Password</target>
<note>key: my_account_settings.password.title</note>
</trans-unit>
<trans-unit id="0305297fa410b3bfb22eb87fa2bea63dabf7e2d6" resname="my_account_settings.password.message">
<source>You don't have permissions to change the password. Contact your administrator.</source>
<target state="new">You don't have permissions to change the password. Contact your administrator.</target>
<note>key: user.password.message</note>
</trans-unit>
<trans-unit id="5b03625b8de51d296ad7f4bc980e631c964185d8" resname="notification.no_longer_available">
<source>The Content item is no longer available</source>
<target state="new">The Content item is no longer available</target>
Expand Down
13 changes: 12 additions & 1 deletion src/lib/Form/Type/Content/CustomUrl/CustomUrlAddType.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Ibexa\AdminUi\Siteaccess\SiteAccessNameGeneratorInterface;
use Ibexa\AdminUi\Siteaccess\SiteaccessResolverInterface;
use Ibexa\Contracts\Core\Repository\LanguageService;
use JMS\TranslationBundle\Annotation\Desc;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\ChoiceList\Loader\CallbackChoiceLoader;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
Expand All @@ -24,6 +25,7 @@
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;

class CustomUrlAddType extends AbstractType
{
Expand Down Expand Up @@ -115,7 +117,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$this->siteAccessNameGenerator,
$location
),
'placeholder' => /** @Desc("None") */ 'custom_url_alias_add_form.site_access.placeholder',
'placeholder' => /** @Desc("None") */ 'custom_url_alias_add_form.site_access.placeholder',
]
)
->add(
Expand All @@ -130,15 +132,24 @@ public function buildForm(FormBuilderInterface $builder, array $options)
$this->addLanguageFieldBasedOnContentListener,
'onPreSetData',
]);

$builder->addEventListener(FormEvents::PRE_SUBMIT, [
$this->buildPathFromRootListener,
'onPreSubmitData',
]);

$builder->addEventListener(FormEvents::PRE_SET_DATA, [
$this->checkboxIfRootLocationListener,
'onPreSetData',
]);
}

public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'translation_domain' => 'ibexa_content_url',
]);
}
}

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

0 comments on commit b1903ea

Please sign in to comment.