mirror of
https://github.com/goharbor/harbor.git
synced 2025-03-14 23:49:09 +01:00
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:
parent
64d83101f5
commit
2e3e225147
src/portal
lib/src/repository-gridview
src/i18n/lang
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user