Skip to content

Commit 8125fe0

Browse files
sahinakkayaearl-warren
authored andcommitted
Deduplicate translations for contributors graph (go-gitea#29256)
I have implemented three graph pages ([contributors](go-gitea#27882), [code frequency](go-gitea#29191) and [recent commits](go-gitea#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. (cherry picked from commit 39a77d9)
1 parent c7c20ff commit 8125fe0

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
@@ -2023,12 +2023,10 @@ activity.git_stats_and_deletions = and
20232023
activity.git_stats_deletion_1 = %d deletion
20242024
activity.git_stats_deletion_n = %d deletions
20252025

2026-
contributors = Contributors
20272026
contributors.contribution_type.filter_label = Contribution type:
20282027
contributors.contribution_type.commits = Commits
20292028
contributors.contribution_type.additions = Additions
20302029
contributors.contribution_type.deletions = Deletions
2031-
contributors.what = contributions
20322030

20332031
search = Search
20342032
search.search_repo = Search repository
@@ -2654,6 +2652,7 @@ component_loading = Loading %s...
26542652
component_loading_failed = Could not load %s
26552653
component_loading_info = This might take a bit…
26562654
component_failed_to_load = An unexpected error happened.
2655+
contributors.what = contributions
26572656
26582657
[org]
26592658
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)