Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

Daniel-KM
Copy link
Contributor

No description provided.

Copy link
Member

@zerocrates zerocrates left a 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');
Copy link
Member

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
Copy link
Member

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.

Copy link
Member

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

@zerocrates
Copy link
Member

I made the requested change on title myself, and also omitted the parts that made minor modifications to the block alignment selects (since those have since been moved/removed). For the redundant translate tags in the search filters, I just dropped that commit entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants