It will be nice to add unit of time from configuration.Patch added.Please Check.

Comments

bsumit5577 created an issue. See original summary.

yivanov’s picture

Hi @bsumit5577 and thanks for your contribution !

For some reason I cannot apply the patch, could you check and reroll it?
It would be really nice addition to the module !

yivanov’s picture

Status: Needs review » Needs work
yivanov’s picture

One more thing - the unit should be predefined variable like seconds, minutes, hours - the reason for this is that the unit should also determine the calculation of the reading time.

For example :

If a node reading time is 60 minutes and the unit is Hours - it should be calculated like this - 1 hour

sumit-k’s picture

Hi yivanov,

Thanks for reply.For now following patch is only using minute unit by default.
For example -
If a node reading time is 60 minutes - it would be like this - 60 minutes

As your suggestion i will work on other units.

sumit-k’s picture

StatusFileSize
new3.84 KB

Attaching patch for time units, minute and seconds. It is configurable , user can choose which time unit they want to display. Please review.
As my opinion hour is not preferable for reading node time.

sumit-k’s picture

Status: Needs work » Needs review
yivanov’s picture

Hi and thanks for the update, it looks promising!
Could I ask you for two things:
1. Update the config/install and config/schema to reflect the new config field.
2. Add the labels of the new radios to be with $this->t() function in order to be available for User Interface Translation.

sumit-k’s picture

StatusFileSize
new4.7 KB

Sure and Thanks for review. Updated patch is attached, Please review again.

neslee canil pinto’s picture

Status: Needs review » Reviewed & tested by the community

#9 worked fine. Moving to RTBC.

  • bsumit5577 authored 84737ca on 8.x-1.x
    Issue #3123397 by bsumit5577: Unit of time configuration
    
yivanov’s picture

Thank you for your contribution !

yivanov’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.