🩹 Singular/plural forms for time counts.#1217
Merged
Lissy93 merged 3 commits intoLissy93:masterfrom Jun 10, 2023
Merged
Conversation
✅ Deploy Preview for dashy-dev ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Changes preview: |
Lissy93
approved these changes
Jun 10, 2023
Owner
Lissy93
left a comment
There was a problem hiding this comment.
Thanks @altearius - looks great :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to Dashy! So that your PR can be handled effectively, please populate the following fields (delete sections that are not applicable)
Category:
Feature
Overview
The
getTimeDifferenceutility function presently returns values using the plural forms of whatever noun is chooses, disregarding the actual count.If merged, this PR will update the
getTimeDifferenceto use the singular form of the respective noun if there is only a single item of that unit. For instance, instead of1 weeksit will return1 week.I have reviewed the usage of the
getTimeDifferencefunction in the following places:src/components/Widgets/DroneCi.vuesrc/components/Widgets/GlAlerts.vuesrc/utils/MiscHelpers.jsAnd I have not identified any potential issues.
N.B. - I suggest that this code should largely be replaced with a dependency, perhaps pretty-ms, but I do not feel empowered to make such a change, at least not without approval of a maintainer.
Issue Number (if applicable) #00
None
New Vars (if applicable)
None
Screenshot (if applicable)
Code Quality Checklist (Please complete)