From d2619e0b53aeed2949ed0e492c5fbedcb8d9a820 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Fri, 10 Feb 2017 22:37:11 +0100
Subject: [PATCH] Site title is now a setting

---
 app/views/admin/settings/index.html.haml | 6 +++++-
 app/views/layouts/application.html.haml  | 2 +-
 config/locales/en.yml                    | 2 +-
 config/settings.yml                      | 1 +
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/app/views/admin/settings/index.html.haml b/app/views/admin/settings/index.html.haml
index 5b482213ba..1429dbd9ee 100644
--- a/app/views/admin/settings/index.html.haml
+++ b/app/views/admin/settings/index.html.haml
@@ -15,6 +15,10 @@
       %td= best_in_place @settings['site_contact_username'], :value, url: admin_setting_path(@settings['site_contact_username']), place_holder: 'Enter a username'
     %tr
       %td= best_in_place @settings['site_contact_email'], :value, url: admin_setting_path(@settings['site_contact_email']), place_holder: 'Enter a public e-mail address'
+    %tr
+      %td
+        %strong Site title
+      %td= best_in_place @settings['site_title'], :value, url: admin_setting_path(@settings['site_title'])
     %tr
       %td
         %strong Site description
@@ -33,4 +37,4 @@
         Displayed on extended information page
         %br/
         You can use HTML tags
-      %td= best_in_place @settings['site_extended_description'], :value, as: :textarea, url: admin_setting_path(@settings['site_extended_description'])
\ No newline at end of file
+      %td= best_in_place @settings['site_extended_description'], :value, as: :textarea, url: admin_setting_path(@settings['site_extended_description'])
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index e122e1c55f..7eae6982bd 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -13,7 +13,7 @@
 
     %title
       = "#{yield(:page_title)} - " if content_for?(:page_title)
-      Mastodon
+      = Setting.site_title
 
     = stylesheet_link_tag 'application', media: 'all'
     = csrf_meta_tags
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 018c923df2..c6c7c236e7 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -10,7 +10,7 @@ en:
     get_started: Get started
     learn_more: Learn more
     links: Links
-    other_instances: Other Instances
+    other_instances: Other instances
     source_code: Source code
     status_count_after: statuses
     status_count_before: Who authored
diff --git a/config/settings.yml b/config/settings.yml
index a78bd067d5..71ce12e632 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -1,5 +1,6 @@
 # config/app.yml for rails-settings-cached
 defaults: &defaults
+  site_title: 'Mastodon'
   site_description: ''
   site_extended_description: ''
   site_contact_username: ''
-- 
GitLab