Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Date in StreamInfoItem with Error from PrettyTime Conversion in German #6050

Open
4 tasks done
jonas-skywalker opened this issue Apr 11, 2021 · 7 comments
Open
4 tasks done
Labels
bug Issue is related to a bug

Comments

@jonas-skywalker
Copy link
Contributor

Checklist

Steps to reproduce the bug

As the Image shows, if you open any View containing several StreamInfos, some of them have a bad PrettyTime conversion.

Expected behavior

In German (and other languages), the date is expressed with a certain gramatical case. So if the video was made 2 months ago, the date would have to be translated to "vor 2 Monaten". This suffix only appears with the plural of the word so "1 month ago" would translate to "vor 1 Monat" without the n.

Actual behaviour

The upload date is wrongly declinated in a way that it also receives the case suffix if the unit for the date is singular.
"1 month ago" -> "vor 1 Monatn"
This actually only happens with part of the dates as seen in the example picture.

Screenshots/Screen recordings

MonatnDateIssue

Logs

No Logs available

Device info

  • Android version/Custom ROM version: Android 10
  • Device model: Android Emulator (Nexus 5X)
@jonas-skywalker jonas-skywalker added the bug Issue is related to a bug label Apr 11, 2021
@jonas-skywalker
Copy link
Contributor Author

I am submitting this issue here because I think this might be related to NewPipe itself because the issue really boils down to the used PrettyTime package. I tested the behaviour myself using only the package and strangely could not reproduce the errror so I am suspecting there could be a bug here. Maybe if somebody has some insight to what could be the problem I would love to fix this issue myself!

@jonas-skywalker jonas-skywalker changed the title Upload Date in StreamInfoItem with Error from PrettyDate Conversion in German Upload Date in StreamInfoItem with Error from PrettyTime Conversion in German Apr 11, 2021
@peat80
Copy link

peat80 commented Apr 11, 2021

Screenshot_20210411_155708_org schabi newpipe

Can confirm this behaviour for days too. (1 Tag > 1 Tagn)

@triallax
Copy link
Contributor

triallax commented Aug 17, 2021

My gut tells me this is a PrettyTime issue and not a NewPipe one. In each screenshot posted in this issue, there is a date with one day/month that is shown correctly (first item in both screenshots in fact). I suspect that it might be because it's more than one day but less than two for the other items or something like that?

Edit: I noticed that this issue not applying to all dates was noted before. Silly mistake, but my point is the same.

@triallax
Copy link
Contributor

Also, I am unable to reproduce this issue now. Can you check if it's still present in the latest version (0.21.8)?

@peat80
Copy link

peat80 commented Aug 18, 2021

Screenshot_20210818_135720_org schabi newpipe

Still present here for me on nightly build 233.

@triallax
Copy link
Contributor

triallax commented Aug 18, 2021

I dug a little into PrettyTime's code, and it seems like my hunch was mostly right (I think something like rounding is happening internally here). I'll post what I found on the corresponding issue on PrettyTime's repo.

@triallax
Copy link
Contributor

triallax commented Dec 1, 2021

The corresponding issue on PrettyTime's repo is ocpsoft/prettytime#218.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug
Projects
None yet
Development

No branches or pull requests

3 participants