Fix: Show image description info based on locale setting

Descrition info not present based on locale info before, translate it before showing on page.

Signed-off-by: Qian Deng <dengq@vmware.com>
This commit is contained in:
Qian Deng 2018-10-22 20:19:41 +08:00
parent 64d83101f5
commit 2e3e225147
4 changed files with 3 additions and 9 deletions

View File

@ -73,7 +73,7 @@
</div>
<div class="card-block">
<div class="card-text">
{{getRepoDescrition(item)}}
{{item.description || ('REPOSITORY.NO_INFO' | translate)}}
</div>
<div class="form-group">
<label>{{'REPOSITORY.TAGS_COUNT' | translate}}</label>

View File

@ -456,13 +456,6 @@ export class RepositoryGridviewComponent implements OnChanges, OnInit {
return "/container-image-icons?container-image=" + repo.name;
}
getRepoDescrition(repo: RepositoryItem): string {
if (repo && repo.description) {
return repo.description;
}
return "No description for this repo. You can add it to this repository.";
}
showCard(cardView: boolean) {
if (this.isCardView === cardView) {
return;

View File

@ -465,7 +465,7 @@
"NOTARY_IS_UNDETERMINED": "Cannot determine the signature of this tag.",
"PLACEHOLDER": "We couldn't find any repositories!",
"INFO": "Info",
"NO_INFO": "No description info for this repository",
"NO_INFO": "No description for this repo. You can add it to this repository.",
"IMAGE": "Images",
"LABELS": "Labels",
"ADD_TO_IMAGE": "Add labels to this image",

View File

@ -442,6 +442,7 @@
"COPY": "Copier",
"NOTARY_IS_UNDETERMINED": "Ne peut pas déterminer la signature de ce tag.",
"PLACEHOLDER": "Nous ne trouvons aucun dépôt !",
"NO_INFO": "No description for this repo. You can add it to this repository.",
"IMAGE": "Images",
"LABELS": "Labels",
"ADD_TO_IMAGE": "Add labels to this image",