Skip to content

Commit 39a77d9

Browse files
authored
Deduplicate translations for contributors graph (#29256)
I have implemented three graph pages ([contributors](#27882), [code frequency](#29191) and [recent commits](#29210)) and they have all same page title as the tab name so I decided to use same translations for them. This PR is for contributors graph. Other PR's have their own respective commits.
1 parent 567a68a commit 39a77d9

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,12 +1980,10 @@ activity.git_stats_and_deletions = and
19801980
activity.git_stats_deletion_1 = %d deletion
19811981
activity.git_stats_deletion_n = %d deletions
19821982

1983-
contributors = Contributors
19841983
contributors.contribution_type.filter_label = Contribution type:
19851984
contributors.contribution_type.commits = Commits
19861985
contributors.contribution_type.additions = Additions
19871986
contributors.contribution_type.deletions = Deletions
1988-
contributors.what = contributions
19891987

19901988
search = Search
19911989
search.search_repo = Search repository
@@ -2595,6 +2593,7 @@ component_loading = Loading %s...
25952593
component_loading_failed = Could not load %s
25962594
component_loading_info = This might take a bit…
25972595
component_failed_to_load = An unexpected error happened.
2596+
contributors.what = contributions
25982597
25992598
[org]
26002599
org_name_holder = Organization Name

routers/web/repo/contributors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const (
1818

1919
// Contributors render the page to show repository contributors graph
2020
func Contributors(ctx *context.Context) {
21-
ctx.Data["Title"] = ctx.Tr("repo.contributors")
21+
ctx.Data["Title"] = ctx.Tr("repo.activity.navbar.contributors")
2222

2323
ctx.Data["PageIsActivity"] = true
2424
ctx.Data["PageIsContributors"] = true

templates/repo/contributors.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
data-locale-contribution-type-commits="{{ctx.Locale.Tr "repo.contributors.contribution_type.commits"}}"
55
data-locale-contribution-type-additions="{{ctx.Locale.Tr "repo.contributors.contribution_type.additions"}}"
66
data-locale-contribution-type-deletions="{{ctx.Locale.Tr "repo.contributors.contribution_type.deletions"}}"
7-
data-locale-loading-title="{{ctx.Locale.Tr "graphs.component_loading" (ctx.Locale.Tr "repo.contributors.what")}}"
8-
data-locale-loading-title-failed="{{ctx.Locale.Tr "graphs.component_loading_failed" (ctx.Locale.Tr "repo.contributors.what")}}"
7+
data-locale-loading-title="{{ctx.Locale.Tr "graphs.component_loading" (ctx.Locale.Tr "graphs.contributors.what")}}"
8+
data-locale-loading-title-failed="{{ctx.Locale.Tr "graphs.component_loading_failed" (ctx.Locale.Tr "graphs.contributors.what")}}"
99
data-locale-loading-info="{{ctx.Locale.Tr "graphs.component_loading_info"}}"
1010
data-locale-component-failed-to-load="{{ctx.Locale.Tr "graphs.component_failed_to_load"}}"
1111
>

0 commit comments

Comments
 (0)