25562e0d54
* added pagination * cleanup * indentation fix * fix * Loads theme from context * Basic theme switching working * working properly * Fuck golint tbqh * united language and theme into one settings page * made the settings page a little nicer * fixed it so it works properly now * removed parts of inline js and fixed bug * removed remains of other theme switching method * fixed very minor bug * fix
19 lignes
431 o
Go
19 lignes
431 o
Go
package publicSettings
|
|
|
|
import (
|
|
"path"
|
|
"testing"
|
|
|
|
"github.com/NyaaPantsu/nyaa/config"
|
|
)
|
|
|
|
func TestInitI18n(t *testing.T) {
|
|
conf := config.DefaultI18nConfig
|
|
conf.TranslationsDirectory = path.Join("..", "..", conf.TranslationsDirectory)
|
|
var retriever UserRetriever // not required during initialization
|
|
|
|
err := InitI18n(conf, retriever)
|
|
if err != nil {
|
|
t.Errorf("failed to initialize language translations: %v", err)
|
|
}
|
|
}
|