Skip to content

Not localised uptime days,hours,mins strings #592

@oleua

Description

@oleua

The uptime info contains not localised strings "days", "hours", "minutes", "seconds"
image

It comes from this function:

private function formatUptime(int $uptime): string {
                if ($uptime === -1) {
                        return 'Unknown';
                }

                try {
                        $boot = new \DateTime($uptime . ' seconds ago');
                } catch (\Exception $e) {
                        return 'Unknown';
                }

                $interval = $boot->diff(new \DateTime());
                if ($interval->days > 0) {
                        return $interval->format('%a days, %h hours, %i minutes, %s seconds');
                }
                return $interval->format('%h hours, %i minutes, %s seconds');
        }

So, localisation tags are to be added there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions