aboutsummaryrefslogtreecommitdiffstats
path: root/templates/user/settings
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2023-05-06 16:11:27 +0300
committerGitHub <noreply@github.com>2023-05-06 21:11:27 +0800
commit46679554d01b0475b4339fb3c5fec96da3a7e202 (patch)
tree7a9e7b775bccab0904ca943942074aa0ed48a62b /templates/user/settings
parent95e2e3aa30d777a8298319885bb885befa870396 (diff)
downloadgitea-46679554d01b0475b4339fb3c5fec96da3a7e202.tar.gz
gitea-46679554d01b0475b4339fb3c5fec96da3a7e202.zip
Change `add_on` translation to `added_on` and include placeholder for the date (#24562)
- Very similar to #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 "added on" and the date (and that "added on" comes before the date). Some languages, like Hebrew, have no space between the "added on" and the date. For example: ```ini added_on=נוסף ב-%s ``` ("added" becomes נוסף, "on" is ב and when paired with a date we use a dash to connect ב with the date) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'templates/user/settings')
-rw-r--r--templates/user/settings/applications.tmpl2
-rw-r--r--templates/user/settings/grants_oauth2.tmpl2
-rw-r--r--templates/user/settings/keys_gpg.tmpl2
-rw-r--r--templates/user/settings/keys_principal.tmpl2
-rw-r--r--templates/user/settings/keys_ssh.tmpl2
5 files changed, 5 insertions, 5 deletions
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl
index 39ea90e92a..84d02c0a00 100644
--- a/templates/user/settings/applications.tmpl
+++ b/templates/user/settings/applications.tmpl
@@ -29,7 +29,7 @@
</ul>
</details>
<div class="activity meta">
- <i>{{$.locale.Tr "settings.add_on"}} <span>{{DateTime "short" .CreatedUnix}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
</div>
diff --git a/templates/user/settings/grants_oauth2.tmpl b/templates/user/settings/grants_oauth2.tmpl
index 8f48aee15b..8dd9ca2119 100644
--- a/templates/user/settings/grants_oauth2.tmpl
+++ b/templates/user/settings/grants_oauth2.tmpl
@@ -20,7 +20,7 @@
<div class="content">
<strong>{{$grant.Application.Name}}</strong>
<div class="activity meta">
- <i>{{$.locale.Tr "settings.add_on"}} <span>{{DateTime "short" $grant.CreatedUnix}}</span></i>
+ <i>{{$.locale.Tr "settings.added_on" (DateTime "short" $grant.CreatedUnix) | Safe}}</i>
</div>
</div>
</div>
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl
index e57714c8a2..f442e8b2d6 100644
--- a/templates/user/settings/keys_gpg.tmpl
+++ b/templates/user/settings/keys_gpg.tmpl
@@ -68,7 +68,7 @@
<b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.PaddedKeyID}} {{end}}
</div>
<div class="activity meta">
- <i>{{$.locale.Tr "settings.add_on"}} <span>{{DateTime "short" .AddedUnix}}</span></i>
+ <i>{{$.locale.Tr "settings.added_on" (DateTime "short" .AddedUnix) | Safe}}</i>
-
<i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until_date" (DateTime "short" .ExpiredUnix) | Safe}}{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</i>
</div>
diff --git a/templates/user/settings/keys_principal.tmpl b/templates/user/settings/keys_principal.tmpl
index fbb35b90d6..7dda6665bd 100644
--- a/templates/user/settings/keys_principal.tmpl
+++ b/templates/user/settings/keys_principal.tmpl
@@ -25,7 +25,7 @@
<div class="content">
<strong>{{.Name}}</strong>
<div class="activity meta">
- <i>{{$.locale.Tr "settings.add_on"}} <span>{{DateTime "short" .CreatedUnix}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{$.locale.Tr "settings.added_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
</div>
diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl
index c365ef226d..b761d9093d 100644
--- a/templates/user/settings/keys_ssh.tmpl
+++ b/templates/user/settings/keys_ssh.tmpl
@@ -59,7 +59,7 @@
{{.Fingerprint}}
</div>
<div class="activity meta">
- <i>{{$.locale.Tr "settings.add_on"}} <span>{{DateTime "short" .CreatedUnix}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{$.locale.Tr "settings.add_on" (DateTime "short" .CreatedUnix) | Safe}} — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{DateTime "short" .UpdatedUnix}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
</div>