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

Collection pages, recent submissions: Added "empty" message #465

Merged
merged 3 commits into from
Sep 4, 2019

Conversation

lhenze
Copy link
Contributor

@lhenze lhenze commented Aug 26, 2019

Modeled on browse-by.component.html

Modeled on browse-by.component.html
Copy link
Member

@artlowel artlowel left a 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}}
Copy link
Member

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.

Copy link
Contributor Author

@lhenze lhenze Sep 3, 2019

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.

Copy link
Member

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.

Copy link
Member

@artlowel artlowel left a 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

@artlowel artlowel merged commit 94eecff into DSpace:master Sep 4, 2019
@lhenze lhenze deleted the 464-collpages-emptymessage branch September 4, 2019 18:17
@tdonohue tdonohue added this to the 7.0beta1 milestone Jan 26, 2021
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

3 participants