mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-17 04:09:07 +02:00
[client] Reuse existing sessionExpired label for expired tray row
Drop the newly added tray.session.expired string and render the expired tray row with the existing tray.status.sessionExpired label, which is already translated in every locale and short enough for the tray.
This commit is contained in:
@@ -35,10 +35,6 @@
|
||||
"message": "Session expired",
|
||||
"description": "Tray status: the authenticated session expired; the user must sign in again."
|
||||
},
|
||||
"tray.session.expired": {
|
||||
"message": "Session expired \u2014 sign in again",
|
||||
"description": "Tray row shown once the session deadline has passed. Clicking it opens the sign-in flow. Keep short."
|
||||
},
|
||||
"tray.session.expiresIn": {
|
||||
"message": "Session expires in {remaining}",
|
||||
"description": "Tray row showing time left before the session expires. {remaining} is a human-readable duration such as '5 minutes', built from the tray.session.unit.* strings. Keep {remaining} unchanged."
|
||||
|
||||
@@ -93,7 +93,7 @@ func (t *Tray) refreshSessionExpiresLabel() {
|
||||
func (t *Tray) sessionRowLabel(deadline time.Time) string {
|
||||
remaining := time.Until(deadline)
|
||||
if remaining <= 0 {
|
||||
return t.loc.T("tray.session.expired")
|
||||
return t.loc.T("tray.status.sessionExpired")
|
||||
}
|
||||
return t.loc.T("tray.session.expiresIn", "remaining", t.formatSessionRemaining(remaining))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user