This consolidates the places where a default language has to be set.
- Removed import of the 'userService' package into the 'languages' util
package
This was required to prevent a cyclic import between the two packages.
- Added a 'UserRetriever' interface to read the language setting of users
inside the 'languages' package
- Fixed an error in the spanish and chinese translation file
- Refactored reading the translation files
Instead of ignoring errors in the non-default language files
the error will now be returned and the remaining files will
not be loaded.
- Added a unit test to check if all translation files are valid
- Added an i18n config to specify the translations dir and the
default language
This allows users to change the default logging verbosity (errors)
to either *detailed* (prints SQL statements) or *silent*.
Also added support for using a custom logger function.
- Fixed the gorm unit test that checks the automigrations
They will actually fail if any errors were logged now.
- Added a postgres unit test
Currently disabled because it would need a running local
postgres db and a change to the .travis.yml file to work
inside the CI build.
This makes systemd not put unit into fail mode when stopping
INFO:
* make sure to use signals.RegisterCloser for everything that should be closed on interrupt
* for any net.Listeners created make sure to wrap them with network.WrapListener and register with signals.RegisterCloser
* Checkpoint: it builds
The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.
* Style changes and old code removal in router
Router needs a lot of work done to its (lack of) error handling.
* Dead code removal and style changes
Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.
* Finish dead code removal and style changes
Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.
* Fix accidental find-and-replace
* Style, error checking, saftey, bug fix changes
* Redo error checking erased during merge
* Re-add merge-erased fix. Make Safe safe.