mirror of https://github.com/go-gitea/gitea.git
Allow custom locale
parent
39931f8e00
commit
7b03b1df0e
12
cmd/web.go
12
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)")
|
log.Fatal(4, "Macaron version is too old, did you forget to update?(github.com/Unknwon/macaron)")
|
||||||
}
|
}
|
||||||
i18nVer := git.MustParseVersion(i18n.Version())
|
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)")
|
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,
|
IndentJSON: macaron.Env != macaron.PROD,
|
||||||
}))
|
}))
|
||||||
m.Use(i18n.I18n(i18n.Options{
|
m.Use(i18n.I18n(i18n.Options{
|
||||||
SubURL: setting.AppSubUrl,
|
SubURL: setting.AppSubUrl,
|
||||||
Langs: setting.Langs,
|
Directory: path.Join(setting.ConfRootPath, "locale"),
|
||||||
Names: setting.Names,
|
CustomDirectory: path.Join(setting.CustomPath, "conf/locale"),
|
||||||
Redirect: true,
|
Langs: setting.Langs,
|
||||||
|
Names: setting.Names,
|
||||||
|
Redirect: true,
|
||||||
}))
|
}))
|
||||||
m.Use(cache.Cacher(cache.Options{
|
m.Use(cache.Cacher(cache.Options{
|
||||||
Adapter: setting.CacheAdapter,
|
Adapter: setting.CacheAdapter,
|
||||||
|
|
|
@ -88,6 +88,7 @@ img.avatar-100 {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
width: 120%;
|
width: 120%;
|
||||||
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
#footer-lang .drop-down li > a {
|
#footer-lang .drop-down li > a {
|
||||||
padding: 3px 9px;
|
padding: 3px 9px;
|
||||||
|
|
|
@ -102,6 +102,7 @@ clear: both;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
width: 120%;
|
width: 120%;
|
||||||
|
min-width: 100px;
|
||||||
li > a {
|
li > a {
|
||||||
padding: 3px 9px;
|
padding: 3px 9px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue