- return {
- session => $::locale->text('The session is invalid or has expired.'),
- password => $::locale->text('Incorrect username or password or no access to selected client!'),
- }->{$_[0]};
+ my %states = (
+ session => { warning => t8('The session has expired. Please log in again.') },
+ password => { error => t8('Incorrect username or password or no access to selected client!') },
+ );
+
+ return %{ $states{$_[0]} || {} };