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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
andybroomfield
force-pushed
the
fix/1.x-318/translation-support
branch
from
April 30, 2024 21:29
0907e92
to
0a66705
Compare
ekes
reviewed
May 14, 2024
This is ready for re-review as I'd like to get this fixed and close the ticket on drupal.org. |
ekes
approved these changes
May 21, 2024
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.
Looks good 👍
andybroomfield
force-pushed
the
fix/1.x-318/translation-support
branch
from
May 21, 2024 11:16
b574cc9
to
27f511a
Compare
Originally authoured by [adinancenci](https://www.drupal.org/u/adinancenci). Applies patch in comment 3. https://www.drupal.org/project/localgov/issues/3427615#comment-15487385
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
force-pushed
the
fix/1.x-318/translation-support
branch
from
May 21, 2024 11:21
27f511a
to
d2df424
Compare
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).