-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/translate aria label #2120
Fix/translate aria label #2120
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good to me, but I have a few comments: pretty much just a few unnecessary changes.
@@ -10,6 +10,8 @@ public function __invoke(ContainerInterface $container, $name, | |||
callable $callback, array $options = null | |||
) { | |||
$formSelect = $callback(); | |||
$formSelect->addTranslatableAttribute('aria-label'); | |||
$formSelect->addTranslatableAttribute('title'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title
is a default translatable attribute defined in the Laminas abstract form view helper so I don't believe this line is needed
@@ -48,7 +48,7 @@ public function __invoke($partialName = null, array $query = null) | |||
switch ($key) { | |||
// Fulltext | |||
case 'fulltext_search': | |||
$filterLabel = $translate('Search full-text'); | |||
$filterLabel = $translate('Search full-text'); // @translate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$translate
calls are detected by xgettext, so they don't need the @translate
comment.
Generally the comment is only needed where the string literal is not used directly in a call to $translate
or $this->translate
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment applies to all the changes in this file, I believe
I made the requested change on |
No description provided.