]> source.dussan.org Git - gitea.git/commitdiff
Fix home page template regression (#5102)
authorTohka <darktohka@users.noreply.github.com>
Thu, 18 Oct 2018 13:07:30 +0000 (16:07 +0300)
committerLunny Xiao <xiaolunwen@gmail.com>
Thu, 18 Oct 2018 13:07:30 +0000 (21:07 +0800)
Commit 7bb4d610e5cca7ad514e377d2b36254a4cfee5b9 tries to take the app_name from the locale, however, it is a user defined setting. This causes the app name to simply display as `app_name` instead of the correct value.

templates/helper.go automatically injects the AppName variable into every template, so we can safely use that instead.

Signed-off-by: Daniel Derzsi <daniel@tohka.us>
templates/home.tmpl

index 7b7c9533a22a82fbca60c40cbf4d13e46e580d3b..469b47cfa8e9d0f4fd6a4c4397b856f011f6cb29 100644 (file)
@@ -7,7 +7,7 @@
                        </div>
                        <div class="hero">
                                <h1 class="ui icon header title">
-                                       {{.i18n.Tr "app_name"}}
+                                       {{AppName}}
                                </h1>
                                <h2>{{.i18n.Tr "app_desc"}}</h2>
                        </div>