Fixes for more hours

This commit is contained in:
Htylol 2025-03-05 01:34:21 +05:00
parent c8e835bc95
commit 43630f44d5

@ -1280,9 +1280,9 @@ seconds_to_time () {
hours=""
elif [[ $hours =~ ^1$ ]] ; then
hours="$hours ${translations[hour]} ${translations[and]} "
elif [[ $hours =~ ^([2-4]|2[2-4])$ ]] && [[ $LANGUAGE == ru ]] ; then
elif [[ $hours =~ [2-4]$ && ! $hours =~ ^1[2-4]$ ]] && [[ $LANGUAGE == ru ]] ; then
hours="$hours часа ${translations[and]} "
elif [[ $hours =~ ^21$ ]] && [[ $LANGUAGE == ru ]] ; then
elif [[ $hours =~ 1$ && ! $hours =~ 11$ ]] && [[ $LANGUAGE == ru ]] ; then
hours="$hours ${translations[hour]} ${translations[and]} "
else
hours="$hours ${translations[hours]} ${translations[and]} "