]> source.dussan.org Git - gitea.git/commitdiff
Allow custom locale
authorUnknwon <joe2010xtmf@163.com>
Thu, 9 Oct 2014 22:35:09 +0000 (18:35 -0400)
committerUnknwon <joe2010xtmf@163.com>
Thu, 9 Oct 2014 22:35:09 +0000 (18:35 -0400)
cmd/web.go
public/ng/css/gogs.css
public/ng/less/gogs/base.less

index 9f2ec8b8245a95d12ce7563cc2f624fd5fcb6449..77260b72414c8803ebd79b29276efdfa13adf082 100644 (file)
@@ -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,
index feb21c97c272b56027abc050895b13b67023da48..af95092f95ae8a6114e1058fd57116db6205a464 100644 (file)
@@ -88,6 +88,7 @@ img.avatar-100 {
   z-index: 100;
   font-size: 12px;
   width: 120%;
+  min-width: 100px;
 }
 #footer-lang .drop-down li > a {
   padding: 3px 9px;
index f715ed0630e5e262bc63ac1086c18dc2a2eb2212..de1781a449bf4970d5175967ceb70066cf122c1f 100644 (file)
@@ -102,6 +102,7 @@ clear: both;
         z-index: 100;
         font-size: 12px;
         width: 120%;
+        min-width: 100px;
         li > a {
             padding: 3px 9px;
         }