diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index fda155644a..051a44d958 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -655,6 +655,10 @@ change_avatar = Change your avatar… joined_on = Joined on %s repositories = Repositories activity = Public activity +followers.title.one = Follower +followers.title.few = Followers +following.title.one = Following +following.title.few = Following followers_one = %d follower followers_few = %d followers following_one = %d following diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 64ce93b6cf..a83d7f7333 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -183,9 +183,11 @@ func prepareUserProfileTabData(ctx *context.Context, showPrivate bool, profileDb case "followers": ctx.Data["Cards"] = followers total = int(numFollowers) + ctx.Data["CardsTitle"] = ctx.TrN(total, "user.followers.title.one", "user.followers.title.few") case "following": ctx.Data["Cards"] = following total = int(numFollowing) + ctx.Data["CardsTitle"] = ctx.TrN(total, "user.following.title.one", "user.following.title.few") case "activity": date := ctx.FormString("date") pagingNum = setting.UI.FeedPagingNum diff --git a/templates/repo/user_cards.tmpl b/templates/repo/user_cards.tmpl index 5accc2c7af..9061b17715 100644 --- a/templates/repo/user_cards.tmpl +++ b/templates/repo/user_cards.tmpl @@ -1,8 +1,8 @@
{{if .CardsTitle}} -

- {{.CardsTitle}} -

+

+ {{.CardsTitle}} +

{{end}}