summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-10-09 18:35:09 -0400
committerUnknwon <joe2010xtmf@163.com>2014-10-09 18:35:09 -0400
commit7b03b1df0efab201b48001200b17ed3390fa83da (patch)
treec9cc6030c51dc3ca072297cd0ad02ce1ced5e2b6 /cmd
parent39931f8e001af113d3ea0905a79f152fb93f70ec (diff)
downloadgitea-7b03b1df0efab201b48001200b17ed3390fa83da.tar.gz
gitea-7b03b1df0efab201b48001200b17ed3390fa83da.zip
Allow custom locale
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 9f2ec8b824..77260b7241 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -67,7 +67,7 @@ func checkVersion() {
log.Fatal(4, "Macaron version is too old, did you forget to update?(github.com/Unknwon/macaron)")
}
i18nVer := git.MustParseVersion(i18n.Version())
- if i18nVer.LessThan(git.MustParseVersion("0.0.1")) {
+ if i18nVer.LessThan(git.MustParseVersion("0.0.2")) {
log.Fatal(4, "i18n version is too old, did you forget to update?(github.com/macaron-contrib/i18n)")
}
}
@@ -92,10 +92,12 @@ func newMacaron() *macaron.Macaron {
IndentJSON: macaron.Env != macaron.PROD,
}))
m.Use(i18n.I18n(i18n.Options{
- SubURL: setting.AppSubUrl,
- Langs: setting.Langs,
- Names: setting.Names,
- Redirect: true,
+ SubURL: setting.AppSubUrl,
+ Directory: path.Join(setting.ConfRootPath, "locale"),
+ CustomDirectory: path.Join(setting.CustomPath, "conf/locale"),
+ Langs: setting.Langs,
+ Names: setting.Names,
+ Redirect: true,
}))
m.Use(cache.Cacher(cache.Options{
Adapter: setting.CacheAdapter,