diff --git a/options/locale/locale_en-US.json b/options/locale/locale_en-US.json index a361781768752..d289da6e57d1c 100644 --- a/options/locale/locale_en-US.json +++ b/options/locale/locale_en-US.json @@ -173,6 +173,8 @@ "search.org_kind": "Search orgs…", "search.team_kind": "Search teams…", "search.code_kind": "Search code…", + "search.code_empty": "Start a code search.", + "search.code_empty_description": "Enter a keyword to search across the code.", "search.code_search_unavailable": "Code search is currently not available. Please contact the site administrator.", "search.code_search_by_git_grep": "Current code search results are provided by \"git grep\". There might be better results if site administrator enables Repository Indexer.", "search.package_kind": "Search packages…", @@ -1357,10 +1359,13 @@ "repo.projects.desc": "Manage issues and pulls in projects.", "repo.projects.description": "Description (optional)", "repo.projects.description_placeholder": "Description", + "repo.projects.empty": "No projects yet.", + "repo.projects.empty_description": "Create a project to coordinate issues and pull requests.", "repo.projects.create": "Create Project", "repo.projects.title": "Title", "repo.projects.new": "New Project", "repo.projects.new_subheader": "Coordinate, track, and update your work in one place, so projects stay transparent and on schedule.", + "repo.projects.no_results": "No projects match your search.", "repo.projects.create_success": "The project \"%s\" has been created.", "repo.projects.deletion": "Delete Project", "repo.projects.deletion_desc": "Deleting a project removes it from all related issues. Continue?", @@ -2722,6 +2727,8 @@ "org.members": "Members", "org.teams": "Teams", "org.code": "Code", + "org.repos.empty": "No repositories yet.", + "org.repos.empty_description": "Create a repository to share code with the organization.", "org.lower_members": "members", "org.lower_repositories": "repositories", "org.create_new_team": "New Team", @@ -2858,6 +2865,8 @@ "org.worktime.date_range_end": "End date", "org.worktime.query": "Query", "org.worktime.time": "Time", + "org.worktime.empty": "No worktime data yet.", + "org.worktime.empty_description": "Adjust the date range to view tracked time.", "org.worktime.by_repositories": "By repositories", "org.worktime.by_milestones": "By milestones", "org.worktime.by_members": "By members", diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index ab088ce7b2db3..b7d037c9e1c7e 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -9,8 +9,16 @@
{{.ProfileReadmeContent}}
{{end}} {{template "shared/repo/search" .}} - {{template "shared/repo/list" .}} - {{template "base/paginate" .}} + {{if not .Repos}} +
+ {{svg "octicon-repo" 48}} +

{{ctx.Locale.Tr "org.repos.empty"}}

+

{{ctx.Locale.Tr "org.repos.empty_description"}}

+
+ {{else}} + {{template "shared/repo/list" .}} + {{template "base/paginate" .}} + {{end}} {{if .ShowMemberAndTeamTab}} diff --git a/templates/org/worktime/empty_placeholder.tmpl b/templates/org/worktime/empty_placeholder.tmpl new file mode 100644 index 0000000000000..334098d4890c3 --- /dev/null +++ b/templates/org/worktime/empty_placeholder.tmpl @@ -0,0 +1,9 @@ + + +
+ {{svg "octicon-clock" 48}} +

{{ctx.Locale.Tr "org.worktime.empty"}}

+

{{ctx.Locale.Tr "org.worktime.empty_description"}}

+
+ + diff --git a/templates/org/worktime/table_members.tmpl b/templates/org/worktime/table_members.tmpl index a59d1941d8490..d2721d40854d0 100644 --- a/templates/org/worktime/table_members.tmpl +++ b/templates/org/worktime/table_members.tmpl @@ -11,6 +11,8 @@ {{svg "octicon-person"}} {{.UserName}} {{svg "octicon-clock"}} {{.SumTime | Sec2Hour}} + {{else}} + {{template "org/worktime/empty_placeholder" dict "Colspan" 2}} {{end}} diff --git a/templates/org/worktime/table_milestones.tmpl b/templates/org/worktime/table_milestones.tmpl index 6ef9289e5601e..3421198b355e6 100644 --- a/templates/org/worktime/table_milestones.tmpl +++ b/templates/org/worktime/table_milestones.tmpl @@ -23,6 +23,8 @@ {{svg "octicon-clock"}} {{.SumTime | Sec2Hour}} + {{else}} + {{template "org/worktime/empty_placeholder" dict "Colspan" 3}} {{end}} diff --git a/templates/org/worktime/table_repos.tmpl b/templates/org/worktime/table_repos.tmpl index eaa085df0c7e6..8c62646676d18 100644 --- a/templates/org/worktime/table_repos.tmpl +++ b/templates/org/worktime/table_repos.tmpl @@ -11,6 +11,8 @@ {{svg "octicon-repo"}} {{.RepoName}} {{svg "octicon-clock"}} {{.SumTime | Sec2Hour}} + {{else}} + {{template "org/worktime/empty_placeholder" dict "Colspan" 2}} {{end}} diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index 7ff511e2dece3..6a5fbc5a0b86e 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -75,6 +75,19 @@
{{.RenderedContent}}
{{end}} + {{else}} + {{if and (eq .OpenCount 0) (eq .ClosedCount 0)}} +
+ {{svg "octicon-project-symlink" 48}} +

{{ctx.Locale.Tr "repo.projects.empty"}}

+

{{ctx.Locale.Tr "repo.projects.empty_description"}}

+
+ {{else}} +
+ {{svg "octicon-search" 48}} +

{{ctx.Locale.Tr "repo.projects.no_results"}}

+
+ {{end}} {{end}} {{template "base/paginate" .}} diff --git a/templates/shared/search/code/search.tmpl b/templates/shared/search/code/search.tmpl index 2041213e196bc..e2422d6162fa4 100644 --- a/templates/shared/search/code/search.tmpl +++ b/templates/shared/search/code/search.tmpl @@ -24,6 +24,12 @@ {{template "shared/search/code/results" .}} {{else if .Keyword}}
{{ctx.Locale.Tr "search.no_results"}}
+ {{else}} +
+ {{svg "octicon-search" 48}} +

{{ctx.Locale.Tr "search.code_empty"}}

+

{{ctx.Locale.Tr "search.code_empty_description"}}

+
{{end}} {{end}}