fix pluralization in correspondence clock (closes #5336)

This commit is contained in:
Niklas Fiekas 2019-08-26 18:12:50 +02:00
parent d47035b4d9
commit 3cffe94883

View file

@ -21,8 +21,8 @@ function formatClockTime(trans: Trans, time: Millis) {
// days : hours
const days = date.getUTCDate() - 1;
hours = date.getUTCHours();
str += (days === 1 ? trans('oneDay') : trans('nbDays', days)) + ' ';
if (hours !== 0) str += trans('nbHours', hours);
str += (days === 1 ? trans('oneDay') : trans.plural('nbDays', days)) + ' ';
if (hours !== 0) str += trans.plural('nbHours', hours);
} else if (time >= 3600 * 1000) {
// hours : minutes
hours = date.getUTCHours();