Skip to content

Refer to expired SSH keys in the past tense

Problem

The User Settings > SSH Keys always uses Expires: to prefix the expiration date.

This becomes really confusing when a key has expired, as it seems as if the date hasn't passed yet.

For example: Expires: 2021-03-01 vs Expired: 2021-03-01

Proposed solution

Prefix the past date with Expired: for expired keys.

image

Implementation outline

# app/views/profiles/keys/_key.html.haml
- s_('Profiles|Expires:')
+ key.expired? ? s_('Profiles|Expired:') : s_('Profiles|Expires:')
Edited by Jiaan Louw