about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-09-05 11:36:41 +0200
committerThibaut Girka <thib@sitedethib.com>2019-09-05 11:36:41 +0200
commit5088eb8388fbfcb210a518f918ae5332e6d3979e (patch)
tree20b9394200b79e7eefc234cc50b0f3650e9afc1d /app/helpers
parent0128509605ed90ee5a29d6af2347ab32bd46aeb9 (diff)
parente265b8887dbd883bc7ca04832dc67ffe46966889 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/instance_helper.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/instance_helper.rb b/app/helpers/instance_helper.rb
index dd0b25f3e..daacb535b 100644
--- a/app/helpers/instance_helper.rb
+++ b/app/helpers/instance_helper.rb
@@ -8,4 +8,16 @@ module InstanceHelper
   def site_hostname
     @site_hostname ||= Addressable::URI.parse("//#{Rails.configuration.x.local_domain}").display_uri.host
   end
+
+  def description_for_sign_up
+    prefix = begin
+      if @invite.present?
+        I18n.t('auth.description.prefix_invited_by_user', name: @invite.user.account.username)
+      else
+        I18n.t('auth.description.prefix_sign_up')
+      end
+    end
+
+    safe_join([prefix, I18n.t('auth.description.suffix')], ' ')
+  end
 end