commit: 029f2c4545de617f82c1dfaea3543a9bd75ebcab
parent: b3e7beb7c561ca54e8eb43613535ff1350968a99
Author: Eugen Rochko <eugen@zeonfederated.com>
Date: Mon, 24 Jul 2017 17:15:15 +0200
Redesign /terms page (#4338)
* Redesign /terms page
* Fix tests
* Remove unused keys
Diffstat:
37 files changed, 22 insertions(+), 180 deletions(-)
diff --git a/app/views/about/_contact.html.haml b/app/views/about/_contact.html.haml
@@ -13,7 +13,7 @@
%span.username @#{contact.contact_account.acct}
- else
.owner
- .avatar= image_tag full_asset_url('avatars/original/missing.png')
+ .avatar= image_tag full_asset_url('avatars/original/missing.png', skip_pipeline: true)
.name
%span.display_name= t 'about.contact_missing'
%span.username= t 'about.contact_unavailable'
diff --git a/app/views/about/_links.html.haml b/app/views/about/_links.html.haml
@@ -1,12 +0,0 @@
-.panel
- .panel-header= t 'about.links'
- .panel-list
- %ul
- - if user_signed_in?
- %li= link_to t('about.get_started'), root_path
- - else
- - if instance.open_registrations
- %li= link_to t('about.get_started'), new_user_registration_path
- %li= link_to t('auth.login'), new_user_session_path
- %li= link_to t('about.terms'), terms_path
- %li= link_to t('about.source_code'), 'https://github.com/tootsuite/mastodon'
diff --git a/app/views/about/_version.html.haml b/app/views/about/_version.html.haml
@@ -1,4 +0,0 @@
-.panel
- .panel-header= t 'about.version'
- .panel-body
- %strong= version.version_number
diff --git a/app/views/about/terms.html.haml b/app/views/about/terms.html.haml
@@ -1,8 +1,23 @@
- content_for :page_title do
= t('terms.title', instance: site_hostname)
-.wrapper
- - if @instance_presenter.site_terms.present?
- = raw @instance_presenter.site_terms
- - else
- = t('terms.body_html')
+.landing-page
+ .header-wrapper.compact
+ .header
+ .container.links
+ .brand
+ = link_to root_url do
+ = image_tag asset_pack_path('logo_full.svg'), alt: 'Mastodon'
+
+ %ul.nav
+ %li
+ - if user_signed_in?
+ = link_to t('settings.back'), root_url, class: 'webapp-btn'
+ - else
+ = link_to t('auth.login'), new_user_session_path, class: 'webapp-btn'
+ %li= link_to t('about.about_this'), about_more_path
+ %li= link_to t('about.other_instances'), 'https://joinmastodon.org/'
+
+ .extended-description
+ .container
+ = @instance_presenter.site_terms.html_safe.presence || t('terms.body_html')
diff --git a/config/locales/ar.yml b/config/locales/ar.yml
@@ -8,13 +8,10 @@ ar:
description_headline: ما هو %{domain}?
domain_count_after: خوادم أخرى
domain_count_before: متصل بـ
- get_started: إبدأ الآن
- links: الروابط
other_instances: خوادم أخرى
source_code: الشفرة المصدرية
status_count_after: منشورا
status_count_before: نشروا
- terms: شروط الاستعمال
user_count_after: مستخدم
user_count_before: يستضيف
accounts:
diff --git a/config/locales/bg.yml b/config/locales/bg.yml
@@ -8,13 +8,10 @@ bg:
description_headline: Какво е %{domain}?
domain_count_after: други инстанции
domain_count_before: Свързани към
- get_started: Първи стъпки
- links: Връзки
other_instances: Други инстанции
source_code: Програмен код
status_count_after: публикации
status_count_before: Написали
- terms: Условия
user_count_after: потребители
user_count_before: Дом на
accounts:
diff --git a/config/locales/ca.yml b/config/locales/ca.yml
@@ -8,16 +8,12 @@ ca:
description_headline: Què es %{domain}?
domain_count_after: altres instàncies
domain_count_before: Connectat a
- get_started: Començar
- links: Vincles
other_instances: Altres instàncies
source_code: Codi font
status_count_after: estats
status_count_before: Que han escrit
- terms: Termes
user_count_after: usuaris registrats
user_count_before: Tenim
- version: Versió
accounts:
follow: Seguir
followers: Seguidors
diff --git a/config/locales/de.yml b/config/locales/de.yml
@@ -8,16 +8,12 @@ de:
description_headline: Was ist %{domain}?
domain_count_after: andere Instanzen
domain_count_before: Verbunden mit
- get_started: Erste Schritte
- links: Links
other_instances: Andere Instanzen
source_code: Quellcode
status_count_after: Beiträge verfassten
status_count_before: die
- terms: AGB
user_count_after: Benutzer
user_count_before: Heimat für
- version: Version
accounts:
follow: Folgen
followers: Folgende
diff --git a/config/locales/en.yml b/config/locales/en.yml
@@ -24,18 +24,14 @@ en:
within_reach_title: Always within reach
find_another_instance: Find another instance
generic_description: "%{domain} is one server in the network"
- get_started: Get started
hosted_on: Mastodon hosted on %{domain}
learn_more: Learn more
- links: Links
other_instances: Instance list
source_code: Source code
status_count_after: statuses
status_count_before: Who authored
- terms: Terms
user_count_after: users
user_count_before: Home to
- version: Version
what_is_mastodon: What is Mastodon?
accounts:
follow: Follow
diff --git a/config/locales/eo.yml b/config/locales/eo.yml
@@ -7,13 +7,10 @@ eo:
description_headline: Kio estas %{domain}?
domain_count_after: aliaj aperaĵoj
domain_count_before: Konektita al
- get_started: Komenci
- links: Ligiloj
other_instances: Aliaj aperaĵoj
source_code: Fontkodo
status_count_after: mesaĝoj
status_count_before: Kiu publikigis
- terms: Terms
user_count_after: uzantoj
user_count_before: Hejmo de
accounts:
diff --git a/config/locales/es.yml b/config/locales/es.yml
@@ -8,13 +8,10 @@ es:
description_headline: "¿Qué es %{domain}?"
domain_count_after: otras instancias
domain_count_before: Conectado a
- get_started: Comenzar
- links: Enlaces
other_instances: Otras instancias
source_code: Código fuente
status_count_after: estados
status_count_before: Que han escrito
- terms: Términos
user_count_after: usuarios registrados
user_count_before: Tenemos
accounts:
diff --git a/config/locales/fa.yml b/config/locales/fa.yml
@@ -8,16 +8,12 @@ fa:
description_headline: "%{domain} چیست؟"
domain_count_after: سرور دیگر
domain_count_before: متصل به
- get_started: آغاز کنید
- links: پیوندها
other_instances: سرورهای دیگر
source_code: کدهای منبع
status_count_after: چیز نوشتهاند
status_count_before: که جمعاً
- terms: شرایط استفاده
user_count_after: کاربر
user_count_before: دارای
- version: نسخه
accounts:
follow: پی بگیرید
followers: پیگیران
diff --git a/config/locales/fi.yml b/config/locales/fi.yml
@@ -7,13 +7,10 @@ fi:
description_headline: Mikä on %{domain}?
domain_count_after: muuhun palvelimeen
domain_count_before: Yhdistyneenä
- get_started: Aloita käyttö
- links: Linkit
other_instances: Muut palvelimet
source_code: Lähdekoodi
status_count_after: statusta
status_count_before: Ovat luoneet
- terms: Ehdot
user_count_after: käyttäjälle
user_count_before: Koti
accounts:
diff --git a/config/locales/fr.yml b/config/locales/fr.yml
@@ -19,18 +19,14 @@ fr:
within_reach_title: Toujours à portée de main
find_another_instance: Trouver une autre instance
generic_description: "%{domain} est seulement un serveur du réseau"
- get_started: Rejoindre le réseau
hosted_on: Instance Mastodon hébergée par %{domain}
learn_more: En savoir plus
- links: Liens
other_instances: Liste des instances
source_code: Code source
status_count_after: posts
status_count_before: Ayant publié
- terms: Conditions d’utilisation
user_count_after: utilisateur⋅ice⋅s
user_count_before: Abrite
- version: Version
what_is_mastodon: Qu’est-ce que Mastodon ?
accounts:
follow: Suivre
diff --git a/config/locales/he.yml b/config/locales/he.yml
@@ -8,16 +8,12 @@ he:
description_headline: מהו %{domain}?
domain_count_after: שרתים אחרים
domain_count_before: מחובר אל
- get_started: בואו נתחיל
- links: קישורים
other_instances: שרתים אחרים
source_code: קוד מקור
status_count_after: הודעות
status_count_before: שכתבו
- terms: תנאים
user_count_after: משתמשים
user_count_before: ביתם של
- version: גרסה
accounts:
follow: לעקוב
followers: עוקבים
diff --git a/config/locales/hr.yml b/config/locales/hr.yml
@@ -8,13 +8,10 @@ hr:
description_headline: Što je %{domain}?
domain_count_after: druge instance
domain_count_before: Spojen na
- get_started: Započni
- links: Linkovi
other_instances: Druge instance
source_code: Izvorni kod
status_count_after: statusi
status_count_before: Tko je autor
- terms: Uvjeti
user_count_after: korisnici
user_count_before: Home to
accounts:
diff --git a/config/locales/hu.yml b/config/locales/hu.yml
@@ -2,9 +2,7 @@
hu:
about:
about_mastodon_html: Mastodon egy <em>szabad, nyílt forráskódú</em> szociális hálózati kiszolgálo. Egy <em>központosítatlan</em> alternatíva a kereskedelmi platformokra, elkerüli a kommunikációd monopolizációját veszélyét. Bárki futtathatja a Mastodon-t és részt vehet a <em>szociális hálózatban</em>.
- get_started: Első lépések
source_code: Forráskód
- terms: Feltételek
accounts:
follow: Követés
followers: Követők
@@ -32,7 +30,7 @@ hu:
validation_errors:
one: Valami nincs rendjén! Kérlek tekintsd meg a hibát alant
other: Valami nincs rendjén! Kérlek tekintsd meg a %{count} darab hibát alant.
- landing_strip_html: <strong>%{name}</strong> is a user on %{link_to_root_path}. You can follow them or interact with them if you have an account anywhere in the fediverse.
+ landing_strip_html: "<strong>%{name}</strong> is a user on %{link_to_root_path}. You can follow them or interact with them if you have an account anywhere in the fediverse."
landing_strip_signup_html: If you don't, you can <a href="%{sign_up_path}">sign up here</a>.
notification_mailer:
favourite:
diff --git a/config/locales/id.yml b/config/locales/id.yml
@@ -8,16 +8,12 @@ id:
description_headline: Apa itu %{domain}?
domain_count_after: server lain
domain_count_before: Terhubung dengan
- get_started: Mulai
- links: Link
other_instances: Server lain
source_code: Kode sumber
status_count_after: status
status_count_before: Yang telah menulis
- terms: Ketentuan
user_count_after: pengguna
user_count_before: Tempat bernaung bagi
- version: Versi
accounts:
follow: Ikuti
followers: Pengikut
diff --git a/config/locales/io.yml b/config/locales/io.yml
@@ -8,13 +8,10 @@ io:
description_headline: Quo esas %{domain}?
domain_count_after: altra instaluri
domain_count_before: Konektita ad
- get_started: Komencar
- links: Ligili
other_instances: Altra instaluri
source_code: Fontkodexo
status_count_after: mesaji
status_count_before: Qua publikigis
- terms: Terms
user_count_after: uzeri
user_count_before: Hemo di
accounts:
diff --git a/config/locales/it.yml b/config/locales/it.yml
@@ -8,13 +8,10 @@ it:
description_headline: Cos'è %{domain}?
domain_count_after: altri server
domain_count_before: Connesso a
- get_started: Inizia
- links: Links
other_instances: Altri server
source_code: Codice sorgente
status_count_after: status
status_count_before: Che hanno pubblicato
- terms: Termini di Utilizzo
user_count_after: utenti
user_count_before: Casa di
accounts:
diff --git a/config/locales/ja.yml b/config/locales/ja.yml
@@ -19,18 +19,14 @@ ja:
within_reach_title: いつでも身近に
find_another_instance: 他のインスタンスを探す
generic_description: "%{domain} は、Mastodon インスタンスの一つです。"
- get_started: 参加する
hosted_on: Mastodon hosted on %{domain}
learn_more: もっと詳しく
- links: リンク
other_instances: 他のインスタンス
source_code: ソースコード
status_count_after: トゥート
status_count_before: トゥート数
- terms: プライバシーポリシー
user_count_after: 人
user_count_before: ユーザー数
- version: バージョン
what_is_mastodon: Mastodon とは?
accounts:
follow: フォロー
diff --git a/config/locales/ko.yml b/config/locales/ko.yml
@@ -8,16 +8,12 @@ ko:
description_headline: "%{domain} 는 무엇인가요?"
domain_count_after: 개의 인스턴스
domain_count_before: 연결됨
- get_started: 참가하기
- links: 링크
other_instances: 다른 인스턴스
source_code: 소스 코드
status_count_after: Toot
status_count_before: Toot 수
- terms: 개인 정보 보호 정책
user_count_after: 명
user_count_before: 사용자 수
- version: 버전
accounts:
follow: 팔로우
followers: 팔로워
diff --git a/config/locales/nl.yml b/config/locales/nl.yml
@@ -8,13 +8,10 @@ nl:
description_headline: Wat is %{domain}?
domain_count_after: andere servers
domain_count_before: Verbonden met
- get_started: Beginnen
- links: Links
other_instances: Andere servers
source_code: Broncode
status_count_after: toots
status_count_before: Zij schreven
- terms: Voorwaarden
user_count_after: gebruikers
user_count_before: Thuisbasis van
accounts:
diff --git a/config/locales/no.yml b/config/locales/no.yml
@@ -8,16 +8,12 @@
description_headline: Hva er %{domain}?
domain_count_after: andre instanser
domain_count_before: Koblet til
- get_started: Kom i gang
- links: Lenker
other_instances: Andre instanser
source_code: Kildekode
status_count_after: statuser
status_count_before: Som skrev
- terms: Betingelser
user_count_after: brukere
user_count_before: Her bor
- version: Versjon
accounts:
follow: Følg
followers: Følgere
diff --git a/config/locales/oc.yml b/config/locales/oc.yml
@@ -8,16 +8,12 @@ oc:
description_headline: Qué es %{domain} ?
domain_count_after: autras instàncias
domain_count_before: Connectat a
- get_started: Venètz al malhum
- links: Ligams
other_instances: Autras instàncias
source_code: Còdi font
status_count_after: estatuts
status_count_before: qu’an escrich
- terms: Tèrmes
user_count_after: personas
user_count_before: Ostal de
- version: Version
accounts:
follow: Sègre
followers: Seguidors
diff --git a/config/locales/pl.yml b/config/locales/pl.yml
@@ -19,18 +19,14 @@ pl:
within_reach_title: Zawsze w Twoim zasięgu
find_another_instance: Znajdź inną instancję
generic_description: "%{domain} jest jednym z serwerów sieci"
- get_started: Rozpocznijmy!
hosted_on: Mastodon uruchomiony na %{domain}
learn_more: Dowiedz się więcej
- links: Odnośniki
other_instances: Lista instancji
source_code: Kod źródłowy
status_count_after: wpisów
status_count_before: Są autorami
- terms: Regulamin
user_count_after: użytkowników
user_count_before: Z serwera korzysta
- version: Wersja
what_is_mastodon: Czym jest Mastodon?
accounts:
follow: Śledź
diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml
@@ -8,16 +8,12 @@ pt-BR:
description_headline: O que é %{domain}?
domain_count_after: outras instâncias
domain_count_before: Conectado a
- get_started: Comece aqui
- links: Links
other_instances: Outras instâncias
source_code: Source code
status_count_after: status
status_count_before: Quem autorizou
- terms: Termos
user_count_after: usuários
user_count_before: Lugar de
- version: Versão
accounts:
follow: Seguir
followers: Seguidores
diff --git a/config/locales/pt.yml b/config/locales/pt.yml
@@ -8,16 +8,12 @@ pt:
description_headline: O que é o %{domain}?
domain_count_after: outras instâncias
domain_count_before: Ligado a
- get_started: Começar
- links: Links
other_instances: Outras instâncias
source_code: Código fonte
status_count_after: publicações
status_count_before: Que fizeram
- terms: Termos
user_count_after: utilizadores
user_count_before: Casa para
- version: Versão
accounts:
follow: Seguir
followers: Seguidores
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
@@ -8,16 +8,12 @@ ru:
description_headline: Что такое %{domain}?
domain_count_after: другими узлами
domain_count_before: Связан с
- get_started: Начать
- links: Ссылки
other_instances: Другие узлы
source_code: Исходный код
status_count_after: статусов
status_count_before: Опубликовано
- terms: Условия
user_count_after: пользователей
user_count_before: Здесь живет
- version: Версия
accounts:
follow: Подписаться
followers: Подписчики
diff --git a/config/locales/th.yml b/config/locales/th.yml
@@ -8,16 +8,12 @@ th:
description_headline: โดเมนคือ %{domain} ?
domain_count_after: อินซะแตนซ์อื่นๆ
domain_count_before: เชื่อมต่อกับ
- get_started: เริ่มกันเลย
- links: ลิงก์
other_instances: อินซะแตนซ์อื่นๆ
source_code: ซอร์สโค๊ด
status_count_after: สถานะ
status_count_before: Who authored
- terms: เงื่อนไข
user_count_after: ผู้ใช้
user_count_before: Home to
- version: เวอร์ชั่น
accounts:
follow: ติดตาม
followers: ผู้ติดตาม
diff --git a/config/locales/tr.yml b/config/locales/tr.yml
@@ -8,16 +8,12 @@ tr:
description_headline: Peki %{domain} nedir?
domain_count_after: sunucu var.
domain_count_before: Bağlı olduğu
- get_started: Kayıt ol
- links: Bağlantılar
other_instances: Diğer sunucular
source_code: Kaynak kodu
status_count_after: adet gönderi yazıldı.
status_count_before: Şu ana kadar
- terms: Kullanım koşulları
user_count_after: kullanıcı var.
user_count_before: Kayıtlı
- version: Sürüm
accounts:
follow: Takip et
followers: Takipçiler
diff --git a/config/locales/uk.yml b/config/locales/uk.yml
@@ -8,16 +8,12 @@ uk:
description_headline: Що таке %{domain}?
domain_count_after: іншими інстанціями
domain_count_before: Зв'язаний з
- get_started: Почати
- links: Посилання
other_instances: Інші інстанції
source_code: Вихідний код
status_count_after: статусів
status_count_before: Опубліковано
- terms: Умови
user_count_after: користувачів
user_count_before: Тут живе
- version: Версія
accounts:
follow: Підписатися
followers: Підписники
diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml
@@ -8,16 +8,12 @@ zh-CN:
description_headline: 关于 %{domain}
domain_count_after: 个其它实例
domain_count_before: 现已接入
- get_started: 上手使用
- links: 链接
other_instances: 其它实例
source_code: 源码
status_count_after: 条嘟文
status_count_before: 他们共嘟出了
- terms: 条款
user_count_after: 位用户
user_count_before: 这里共注册有
- version: 版本
accounts:
follow: 关注
followers: 粉丝
diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml
@@ -8,16 +8,12 @@ zh-HK:
description_headline: 關於 %{domain}
domain_count_after: 個其他服務站
domain_count_before: 已連接至
- get_started: 立即登記
- links: 連結
other_instances: 其他服務站
source_code: 源代碼
status_count_after: 篇文章
status_count_before: 他們共發佈了
- terms: 使用條款
user_count_after: 位使用者
user_count_before: 這裏共註冊有
- version: 版本
accounts:
follow: 關注
followers: 關注者
diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml
@@ -8,13 +8,10 @@ zh-TW:
description_headline: 關於 %{domain}
domain_count_after: 個服務站相連
domain_count_before: 與其他
- get_started: 立即註冊
- links: 連結
other_instances: 其他服務站
source_code: 原始碼
status_count_after: 篇文章
status_count_before: 他們共發佈了
- terms: 使用條款
user_count_after: 位註冊使用者
user_count_before: 這裡共有
accounts:
diff --git a/spec/views/about/_contact.html.haml_spec.rb b/spec/views/about/_contact.html.haml_spec.rb
@@ -31,12 +31,5 @@ describe 'about/_contact.html.haml' do
expect(rendered).to have_content('admin@example.com')
end
-
- it 'does not show info when email is missing' do
- contact = double(site_contact_email: nil, contact_account: nil)
- render 'about/contact', contact: contact
-
- expect(rendered).not_to have_content(I18n.t('about.business_email'))
- end
end
end
diff --git a/spec/views/about/_links.html.haml_spec.rb b/spec/views/about/_links.html.haml_spec.rb
@@ -1,38 +0,0 @@
-# frozen_string_literal: true
-
-require 'rails_helper'
-
-describe 'about/_links.html.haml' do
- context 'when signed in' do
- before do
- allow(view).to receive(:user_signed_in?).and_return(true)
- end
-
- it 'does not show sign in link' do
- render 'about/links', instance: InstancePresenter.new
-
- expect(rendered).to have_content(I18n.t('about.get_started'))
- expect(rendered).not_to have_content(I18n.t('auth.login'))
- end
- end
-
- context 'when signed out' do
- before do
- allow(view).to receive(:user_signed_in?).and_return(false)
- end
-
- it 'shows get started link when registrations are allowed' do
- render 'about/links', instance: double(open_registrations: true)
-
- expect(rendered).to have_content(I18n.t('about.get_started'))
- expect(rendered).to have_content(I18n.t('auth.login'))
- end
-
- it 'hides get started link when registrations are closed' do
- render 'about/links', instance: double(open_registrations: false)
-
- expect(rendered).not_to have_content(I18n.t('about.get_started'))
- expect(rendered).to have_content(I18n.t('auth.login'))
- end
- end
-end