* Add T field to template variables
* Remove languages.SetTranslationFromRequest
* Add Tfunc on handlers
* Remove T and Ts from template_functions
* Update templates
Change the templates to use the local Tfunc, instead of the global one.
Also changed the signature of the fields on template_variables.go, so that
they return a template.HTML to avoid escaping problems.
* Remove unnecessary variable
* Keep naming consistent
* Remove execute bit from files
* Default to DefaultLanguage (without passing it to the func)
* Remove commented code
* Use Content-Type to get language json
* Lines of 400 characters is dumb
* Update new repo in README
* Remove useless script since we fallback to a defaultlang
* Fix fallback language panic
* Fix uninitialized MaxPerPage when not in querystr
The issue was that the req.MaxPerPage was not set (default to 0) when
the query string didn't include "max". This makes the server query the
whole db since the resulting limit is 0.
* Fix creating empty torrents (only worked once)
* Lines of 400 characters is still dumb
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 search category filter when subcategory's length exceeds 1 character
* Changed the subcategory's length check to not let the possibility to overflow
- 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
I managed to screw up in the last update. Normal is 0 and remake is 1, so that makes the "goodness" order of statuses non-monotonic, so I can't use the greater sign for filtering out remakes...
When in a user page and clicked on more torrents, show a list navigable
of the user torrent
On that list, we can make advance search (categories, order, ...)
Moderation search reimplemented
Clicking on user (id) in the torrent list redirect to the list of the
user torrents
Ability to search within the user torrents
Greater-than symbols were being filtered out by the sanitizer as they were saved to the database. Hopefully this will fix 'em. I considered using regexp, but thought that would be complete overkill.
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.