Usage of Class JiraDurationUtils.PrettyDurationFormatter with Spanish I18nHelper

We are using the class JiraDurationUtils.PrettyDurationFormatter to formats time duration to “pretty” format, such as 3 weeks, 2 days, 1 hour, 15 minutes.
This value is formatted according to system or user’s locale, we are trying in Spanish, we want this value such as “2 días, 1 hora, 15 minutos”.
We are sending spanish I18nHelper:

But the class JiraDurationUtils.PrettyDurationFormatter always returns in English.
Is this a bug in Jira?

Thanks in advance,
Best Regards,

I found the issue.
I had to put the Locale as a format parameter.
Something like that:
JiraDurationUtils.PrettyDurationFormatter(hoursPerDay, daysPerWeek, i18nBean)
.format(field, i18nBean.getLocale());
And it works for the user locale language.

best regards.