]> source.dussan.org Git - gitea.git/commitdiff
Change `valid_until` translation to `valid_until_date` and include placeholder for...
authorYarden Shoham <git@yardenshoham.com>
Sat, 6 May 2023 12:37:02 +0000 (15:37 +0300)
committerGitHub <noreply@github.com>
Sat, 6 May 2023 12:37:02 +0000 (12:37 +0000)
- 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 <git@yardenshoham.com>
options/locale/locale_en-US.ini
templates/user/settings/keys_gpg.tmpl

index 19ab6b15e45798bd595e4f87bd674fbf8c4fce8b..c988cb5964a8f4cf8f46a831a006d8ac9b980095 100644 (file)
@@ -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
index b15fb5686128ddc25a2c0e5f86a724cef20e3428..e57714c8a226e42d8d37c65803a55958cf1e7615 100644 (file)
@@ -70,7 +70,7 @@
                                        <div class="activity meta">
                                                <i>{{$.locale.Tr "settings.add_on"}} <span>{{DateTime "short" .AddedUnix}}</span></i>
                                                -
-                                               <i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until"}} <span>{{DateTime "short" .ExpiredUnix}}</span>{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</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>
                                </div>
                        </div>