From: Yarden Shoham Date: Sat, 6 May 2023 12:37:02 +0000 (+0300) Subject: Change `valid_until` translation to `valid_until_date` and include placeholder for... X-Git-Tag: v1.20.0-rc0~296 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=95e2e3aa30d777a8298319885bb885befa870396;p=gitea.git Change `valid_until` translation to `valid_until_date` and include placeholder for the date (#24563) - Similar to #24550 - Similar to #24562 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 "valid until" and the date (and that "valid until" comes before the date). Signed-off-by: Yarden Shoham --- diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 19ab6b15e4..c988cb5964 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -755,7 +755,7 @@ ssh_key_deletion_success = The SSH key has been removed. gpg_key_deletion_success = The GPG key has been removed. ssh_principal_deletion_success = The principal has been removed. add_on = Added on -valid_until = Valid until +valid_until_date = Valid until %s valid_forever = Valid forever last_used = Last used on no_activity = No recent activity diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl index b15fb56861..e57714c8a2 100644 --- a/templates/user/settings/keys_gpg.tmpl +++ b/templates/user/settings/keys_gpg.tmpl @@ -70,7 +70,7 @@
{{$.locale.Tr "settings.add_on"}} {{DateTime "short" .AddedUnix}} - - {{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until"}} {{DateTime "short" .ExpiredUnix}}{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}} + {{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until_date" (DateTime "short" .ExpiredUnix) | Safe}}{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}