|
|
@ -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)") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -93,6 +93,8 @@ func newMacaron() *macaron.Macaron { |
|
|
|
})) |
|
|
|
})) |
|
|
|
m.Use(i18n.I18n(i18n.Options{ |
|
|
|
m.Use(i18n.I18n(i18n.Options{ |
|
|
|
SubURL: setting.AppSubUrl, |
|
|
|
SubURL: setting.AppSubUrl, |
|
|
|
|
|
|
|
Directory: path.Join(setting.ConfRootPath, "locale"), |
|
|
|
|
|
|
|
CustomDirectory: path.Join(setting.CustomPath, "conf/locale"), |
|
|
|
Langs: setting.Langs, |
|
|
|
Langs: setting.Langs, |
|
|
|
Names: setting.Names, |
|
|
|
Names: setting.Names, |
|
|
|
Redirect: true, |
|
|
|
Redirect: true, |
|
|
|