FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

PublishedText gets created using only one method. (toLocaleDateString…

Open MaxWienold opened this issue 2 years ago • 2 comments

…) (#2439)


The Published on String is now created in a (more) concise way

Important note We may remove your pull request if you do not use this provided PR template correctly.

Pull Request Type Please select what type of pull request this is:

  • [X] Bugfix
  • [ ] Feature Implementation
  • [ ] Documentation
  • [ ] Other

Related issue closes #2439

Description There were two methods and two variables for creating the published ... min/hours/days string. One that was written in utils and the Date.toLocaleString. As well there were many conditionals that should produce all the same result. Should this solution be viable, the translation String and the utils method could also be purged. Edit: I realized that the real bug lay in that toLocalePublicationString relied on the api giving back a string in english. But apparently the locale is handled differently and is not affected by the language settings. So i think, it is more reliable to determine unit and number based on the published timestamp.

Testing (for code that is not small enough to be easily understandable) I tried different language settings on different Pages.

Desktop (please complete the following information):

  • OS: Debian
  • OS Version: 11
  • FreeTube version: latest

Additional context I noticed that the recommended videos have no publication data associated.

MaxWienold avatar Aug 20 '22 12:08 MaxWienold

Just some minor changes

ChunkyProgrammer avatar Sep 09 '22 18:09 ChunkyProgrammer

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Sep 21 '22 07:09 github-actions[bot]

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Oct 20 '22 02:10 github-actions[bot]

This PR was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Nov 04 '22 02:11 github-actions[bot]