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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app/+collection-page/collection-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -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.

</div>
</ng-container>
</div>
<ds-error *ngIf="collectionRD?.hasFailed"
Expand Down