diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 662ea49ac..e444bfa7c 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -673,6 +673,14 @@ reactions_more = and %d more unit_disabled = The site administrator has disabled this repository section. language_other = Other +desc.private = Private +desc.public = Public +desc.private_template = Private template +desc.public_template = Template +desc.internal = Internal +desc.internal_template = Internal template +desc.archived = Archived + template.items = Template Items template.git_content = Git Content (Default Branch) template.git_hooks = Git Hooks diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index 61ef056af..97495e16b 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -7,13 +7,26 @@ {{end}} {{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}} - {{if .IsArchived}}{{end}} - {{if .IsPrivate}} - {{svg "octicon-lock" 16}} - {{else if and (not .IsMirror) (not .IsFork) (.Owner.Visibility.IsPrivate) }} - {{svg "octicon-internal-repo" 16}} - {{else if .IsFork}} + {{if .IsArchived}}{{$.i18n.Tr "repo.desc.archived"}}{{end}} + {{if .IsTemplate}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private_template"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal_template"}} + {{end}} + {{end}} + {{else}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal"}} + {{end}} + {{end}} + {{end}} + {{if .IsFork}} {{svg "octicon-repo-forked" 16}} {{else if .IsMirror}} {{svg "octicon-repo-clone" 16}} diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 713968dc2..c777d27fc 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -11,10 +11,24 @@ {{.Owner.Name}}
/
{{.Name}} - {{if .RelAvatarLink}} - {{template "repo/header_icon" .}} + {{if .IsTemplate}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private_template"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal_template"}} + {{end}} + {{end}} + {{else}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal"}} + {{end}} + {{end}} {{end}} - {{if .IsArchived}}{{end}} + {{if .IsArchived}}{{$.i18n.Tr "repo.desc.archived"}}{{end}} {{if .IsMirror}}
{{$.i18n.Tr "repo.mirror_from"}} {{if .SanitizedOriginalURL}}{{.SanitizedOriginalURL}}{{else}}{{MirrorAddress $.Mirror}}{{end}}
{{end}} {{if .IsFork}}
{{$.i18n.Tr "repo.forked_from"}} {{SubStr .BaseRepo.RelLink 1 -1}}
{{end}} {{if .IsGenerated}}
{{$.i18n.Tr "repo.generated_from"}} {{SubStr .TemplateRepo.RelLink 1 -1}}
{{end}}