-
Notifications
You must be signed in to change notification settings - Fork 395
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
Collection pages, recent submissions: Added "empty" message #465
Conversation
Modeled on browse-by.component.html
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.
Thanks @lhenze!
@@ -52,6 +52,9 @@ <h2>{{'collection.page.browse.recent.head' | translate}}</h2> | |||
message="{{'error.recent-submissions' | translate}}"></ds-error> | |||
<ds-loading *ngIf="!itemRD || itemRD.isLoading" | |||
message="{{'loading.recent-submissions' | translate}}"></ds-loading> | |||
<div *ngIf="!itemRD?.isLoading && itemRD?.payload?.page.length === 0" class="alert alert-info w-100" role="alert"> | |||
{{'browse.empty' | 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.
In these situations I prefer to duplicate the key. Because even though in english the message may be exactly the same, in other languages it might not be, and if they don't use different keys, translators don't have the option to change the message.
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.
@artlowel, understood. I see there is a "collection.page.browse.recent.head" key. Fine for the new one to be "collection.page.browse.recent.empty" ?
If so, I can add this to en.json; how to handle other language files? I notice they don't each have all of the keys.
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.
collection.page.browse.recent.empty
sounds fine.
We ask devs to always update en.json
so that it contains all the keys. If you happen to be fluid in another supported language, it'd be great if you can add it, but it's not a requirement.
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.
Thanks @lhenze!
Since this is fairly small and straightforward, I'll merge it without waiting for a second review
Modeled on browse-by.component.html