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 Translation for alert banner not displaying #319

Merged
merged 6 commits into from May 21, 2024

Conversation

andybroomfield
Copy link
Contributor

@andybroomfield andybroomfield commented Apr 30, 2024

Fix #318

Alters the alert banner block to check for a translation, and add a translation test.

Originally authoured by adinancenci.
Original patch in comment 3.
https://www.drupal.org/project/localgov/issues/3427615#comment-15487385
(Patch originallty placed the logic in the entity, moved to block to fix issue with visibility checking).

@andybroomfield andybroomfield force-pushed the fix/1.x-318/translation-support branch from 0907e92 to 0a66705 Compare April 30, 2024 21:29
@andybroomfield andybroomfield marked this pull request as ready for review May 13, 2024 08:23
@andybroomfield andybroomfield requested a review from ekes May 18, 2024 22:56
@andybroomfield
Copy link
Contributor Author

This is ready for re-review as I'd like to get this fixed and close the ticket on drupal.org.

Copy link
Member

@ekes ekes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@andybroomfield andybroomfield force-pushed the fix/1.x-318/translation-support branch from b574cc9 to 27f511a Compare May 21, 2024 11:16
andybroomfield and others added 6 commits May 21, 2024 12:17
This is to allow the entitiy to remain pure in terms of logic, and the get
translation logic in the block. If the alert has a translation use that in place
of the alert banner entitiy. This also allows correct checking of visibility

Also allows the title to be translated.
Wrap up translation test.
Use the entitiy repositry service to get translation in correct language
with fallback.
@andybroomfield andybroomfield force-pushed the fix/1.x-318/translation-support branch from 27f511a to d2df424 Compare May 21, 2024 11:21
@andybroomfield andybroomfield merged commit e4aff62 into 1.x May 21, 2024
8 checks passed
@andybroomfield andybroomfield deleted the fix/1.x-318/translation-support branch May 21, 2024 11:55
@andybroomfield andybroomfield mentioned this pull request May 21, 2024
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.

Translation for alert banner not displaying (Originally on drupal.org)
2 participants