Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Graphe des révisions

22 commits

Auteur SHA1 Message Date
akuma06
354e7aaea0 Better to check user.ID, to be sure not anon 2017-05-21 02:12:29 +02:00
Ramon Dantas
1968d2ae54 Move translation func to template variables (#652)
* 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
2017-05-21 08:38:28 +10:00
tomleb
babf0a37f0 Cleanups and fixes (#623)
* 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
2017-05-19 12:55:59 +10:00
PantsuDev
70f87e7aac finish repo transfer 2017-05-17 15:58:40 +10:00
Atvaark
cd844aec45 Replace 'en-us' literals with the default language
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
2017-05-14 22:10:07 +02:00
Atvaark
6e546facc0 Fix i18n file errors
- 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
2017-05-13 22:52:17 +02:00
ElegantMonkey
dfd9caeb31 Add language selector without login 2017-05-12 19:17:34 -03:00
Eliot Whalan
521064b946 Add vary accept-language header 2017-05-11 23:12:19 +10:00
akuma06
9f2d0f1962 New translation function and time depends on translation 2017-05-11 13:15:52 +02:00
Ramon Dantas
c84140964b Add language selector (#298) 2017-05-10 14:45:39 -05:00
Chris MacLeod
c9b72206a5 Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* 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.
2017-05-09 21:34:40 -05:00
ElegantMonkey
f1f86e8d6d Fallback to default language when a translation is missing 2017-05-09 15:25:56 -03:00
akuma06
8aa8a0593c Added delete account and edit profile 2017-05-09 17:47:12 +02:00
Austin
81fa4aed00 what in import duplication 2017-05-08 21:07:43 -05:00
akuma06
84cf511fe3 Fixed User
Profile Page, badge menu, every thing before previous commit (except
email)
Added Logout
2017-05-09 03:37:12 +02:00
ElegantMonkey
caa3168c90 Revert changes to translation.go 2017-05-08 20:44:41 -03:00
sfan5
e3a271cca7 Revert "Added Profile page"
This reverts commit 5860cf1d79.
2017-05-08 22:50:25 +02:00
akuma06
cdf8cccc8d Added Profile page 2017-05-08 18:56:40 +02:00
ElegantMonkey
2b2086b8b3 Remove unneeded import 2017-05-07 18:08:38 -03:00
ElegantMonkey
b10cdde34a Read the user language preferences from the HTTP request 2017-05-07 18:05:41 -03:00
akuma06
00b08b71cd Multi language support User Registration page finished 2017-05-07 03:34:16 +02:00
akuma06
f88b4656a1 Fixed Typo + Added multi language support
Multi language for User package
2017-05-07 02:32:32 +02:00