diff options
author | Yarden Shoham <git@yardenshoham.com> | 2023-05-06 13:10:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-06 18:10:30 +0800 |
commit | 291c86804699ca00c937bfa58f3ee6a3263ea5ae (patch) | |
tree | be3ad0beb80ee722839a12af99b3d547ea732d1a | |
parent | e5a8ebc0ed2553a16bac4b54a74cc3e5e8036b32 (diff) | |
download | gitea-291c86804699ca00c937bfa58f3ee6a3263ea5ae.tar.gz gitea-291c86804699ca00c937bfa58f3ee6a3263ea5ae.zip |
Change `join_on` translation to `joined_on` and include placeholder for the date (#24550)
The correct thing to do is to translate the entire phrase into a single
string. The previous translation assumed all languages have a space
between the "joined on" and the date (and that "joined on" comes before
the date).
Some languages, like Hebrew, have no space between the "joined on" and
the date. For example:
```ini
joined_on=נרשם ב-%s
```
("joined" becomes נרשם, "on" is ב and when paired with a date we use a
dash to connect ב with the date)
-rw-r--r-- | options/locale/locale_en-US.ini | 2 | ||||
-rw-r--r-- | templates/explore/organizations.tmpl | 2 | ||||
-rw-r--r-- | templates/explore/users.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/user_cards.tmpl | 2 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 248936e35d..19ab6b15e4 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -559,7 +559,7 @@ target_branch_not_exist = Target branch does not exist. [user] change_avatar = Change your avatar… -join_on = Joined on +joined_on = Joined on %s repositories = Repositories activity = Public Activity followers = Followers diff --git a/templates/explore/organizations.tmpl b/templates/explore/organizations.tmpl index 295818f94b..a20dd755ea 100644 --- a/templates/explore/organizations.tmpl +++ b/templates/explore/organizations.tmpl @@ -23,7 +23,7 @@ {{svg "octicon-link"}} <a href="{{.Website}}" rel="nofollow">{{.Website}}</a> {{end}} - {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{DateTime "short" .CreatedUnix}} + {{svg "octicon-clock"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} </div> </div> </div> diff --git a/templates/explore/users.tmpl b/templates/explore/users.tmpl index 0c1ba27448..1f3b944f5e 100644 --- a/templates/explore/users.tmpl +++ b/templates/explore/users.tmpl @@ -18,7 +18,7 @@ {{svg "octicon-mail"}} <a href="mailto:{{.Email}}" rel="nofollow">{{.Email}}</a> {{end}} - {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{DateTime "short" .CreatedUnix}} + {{svg "octicon-clock"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} </div> </div> </div> diff --git a/templates/repo/user_cards.tmpl b/templates/repo/user_cards.tmpl index fd9585b22d..e956f65e9f 100644 --- a/templates/repo/user_cards.tmpl +++ b/templates/repo/user_cards.tmpl @@ -18,7 +18,7 @@ {{else if .Location}} {{svg "octicon-location"}} {{.Location}} {{else}} - {{svg "octicon-clock"}} {{$.locale.Tr "user.join_on"}} {{DateTime "short" .CreatedUnix}} + {{svg "octicon-clock"}} {{$.locale.Tr "user.joined_on" (DateTime "short" .CreatedUnix) | Safe}} {{end}} </div> </li> diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 8d48474441..431961089d 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -73,7 +73,7 @@ </li> {{end}} {{end}} - <li>{{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}} {{DateTime "short" .ContextUser.CreatedUnix}}</li> + <li>{{svg "octicon-clock"}} {{.locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix) | Safe}}</li> {{if and .Orgs .HasOrgsVisible}} <li> <ul class="user-orgs"> |