Adds a new top-level configuration key called "language":
```yaml
wtf:
langauge: "ja-JP"
```
Users can now define which BCP 47 language tag to use to format any
text or numbers that currently support localization. Defaults to
"en-CA".
Acceptible values: any BCP 47 language tag recognized by the Go
"language" package.
Good luck to you figuring out what that cannonical list is. After a
morning of trying to suss it out, I have no idea.
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-986 Wrap the DigitalOcean droplet in our own droplet
This gives us something to build off while still providing the
underlying functionality of the original droplet instance.
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-986 Dynamically display droplet attributes based on defined column names
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-986 Read DigitalOcean column configuration from settings
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-986 Extract the reflection bits into a Reflective package
Signed-off-by: Chris Cummer <chriscummer@me.com>
golangci-lint can run all the currently enabled linters, and as far as I
can tell, does it in under 5 seconds as opposed to over 180 seconds
(compare `time make cilint` and `time make lint`).
Some of the linters that are listed in the "enabled" section but
commented out looked like a good idea to me, and fairly low hanging
fruit to fix, but they are not passing at the moment.
All the linters covered in the current Makefile are run.
TODO:
- replace lint target in Makefile with golangci-lint
- remove .github/workflow/errcheck.yml
* Another actions test
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Add BuildTest action
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Remove lint check for the time being (so many issues)
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix issues found by errcheck
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix errors found by staticcheck
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix issues found by goimports
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Comment out the action for the time being
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix shadowed variables
Signed-off-by: Chris Cummer <chriscummer@me.com>
* go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Remove buildtest.yml
Signed-off-by: Chris Cummer <chriscummer@me.com>
* go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Remove some unnecessary type conversions
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Tidy'd go.mod
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Add gosec to the Makefile
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix some issues found by gosec
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-781 Switch Todoist IDs from `int` to `string`
On platforms that convert an `int` to `int32`, like the Raspberry Pi,
an `int` is not large enough to store Todoist project IDs.
Using a `string` ensures this never becomes a problem.
Fixes#781
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Upgrade godo to latest
* Fix a bunch of issues found by
* Running staticcheck on a codebase for the first time is a sobering experience
* go mod tidy
* More static improvements
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-484 DigitalOcean module stubbed out
* WTF-484 Delete droplets via Ctrl-d
* WTF-484 Rebasing off master after a long time away
* WTF-484 Improve DigitalOcean display
* WTF-484 Can shutdown and restart the selected droplet
* WTF-484 Display info about the selected droplet using the ? key
* WTF-484 Display info about the selected droplet using the Return key
* WTF-484 Greatly improve the utils.Truncate function
* WTF-484 Display a droplet's features in the info modal
* WTF-484 Change reboot key from r to b to not conflict with refresh
* WTF-484 Panic if a keyboard control is mapped to the same character more than once
* WTF-484 Colorize droplet status indicator
* WTF-484 Extract view.InfoTable out into a reusable component
* WTF-657 Add spec coverage for cfg/common_settings.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for cfg/position_validation.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for cfg/validations.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for checklist/checklist.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for checklist/checklist_item.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for utils/conversions.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Get rid of utils.Home() function
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for utils/homedir.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Add spec coverage for utils/text.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
* WTF-657 Clean up utils/utils.go
Signed-off-by: Chris Cummer <chriscummer@me.com>
Allows the user to specify either "12" or "24" to set whether or not to
display times in AM/PM format or 24-hour format.
Example:
gcal:
enabled: true
timeFormat: "12"
refreshInterval: 360
Fixes#665
Issue #600 points out Jenkins module panics occasionally
I noticed that a number of places panic because of JSON parsing
Centralize JSON parsing, have it return an error, and have widgets
report the error