From 95e2e3aa30d777a8298319885bb885befa870396 Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Sat, 6 May 2023 15:37:02 +0300 Subject: [PATCH] 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 --- options/locale/locale_en-US.ini | 2 +- templates/user/settings/keys_gpg.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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}}