Improvements to battery reporting script (#19087)
### Link to issue number:
Fixes #9003.
### Summary of the issue:
Battery time script was reporting redundant "0 hours" and "0 minutes",
and using plural forms for single hours and minutes.
### Description of user facing changes:
NVDA will no longer speak remaining time when it reaches zero, for both
hours and minutes.
### Description of developer facing changes:
None.
### Description of development approach:
- Added logic to skip time reporting when both hours and minutes are
zero
- Separated hour and minute handling to only display non-zero values
- Used proper singular/plural forms via ngettext for 1 hour/1 minute
cases
### Testing strategy:
Manually tested running from source.
### Known issues with pull request:
None.
### Code Review Checklist:
<!--
This checklist is a reminder of things commonly forgotten in a new PR.
Authors, please do a self-review of this pull-request.
Check items to confirm you have thought about the relevance of the item.
Where items are missing (eg unit / system tests), please explain in the
PR.
To check an item `- [ ]` becomes `- [x]`, note spacing.
You can also check the checkboxes after the PR is created.
A detailed explanation of this checklist is available here:
https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/githubPullRequestTemplateExplanationAndExamples.md#code-review-checklist
-->
- [x] Documentation:
- Change log entry
- User Documentation
- Developer / Technical Documentation
- Context sensitive help for GUI changes
- [x] Testing:
- Unit tests
- System (end to end) tests
- Manual testing
- [x] UX of all users considered:
- Speech
- Braille
- Low Vision
- Different web browsers
- Localization in other languages / culture than English
- [x] API is compatible with existing add-ons.
- [x] Security precautions taken.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>