Redesign /terms page (#4338)

* Redesign /terms page

* Fix tests

* Remove unused keys
This commit is contained in:
Eugen Rochko 2017-07-24 17:15:15 +02:00 committed by GitHub
parent b3e7beb7c5
commit 029f2c4545
37 changed files with 22 additions and 180 deletions

View File

@ -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'

View File

@ -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'

View File

@ -1,4 +0,0 @@
.panel
.panel-header= t 'about.version'
.panel-body
%strong= version.version_number

View File

@ -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')

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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: پیگیران

View File

@ -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:

View File

@ -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 dutilisation
user_count_after: utilisateur⋅ice⋅s
user_count_before: Abrite
version: Version
what_is_mastodon: Quest-ce que Mastodon?
accounts:
follow: Suivre

View File

@ -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: עוקבים

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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: フォロー

View File

@ -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: 팔로워

View File

@ -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:

View File

@ -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

View File

@ -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: quan escrich
terms: Tèrmes
user_count_after: personas
user_count_before: Ostal de
version: Version
accounts:
follow: Sègre
followers: Seguidors

View File

@ -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ź

View File

@ -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

View File

@ -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

View File

@ -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: Подписчики

View File

@ -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: ผู้ติดตาม

View File

@ -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

View File

@ -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: Підписники

View File

@ -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: 粉丝

View File

@ -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: 關注者

View File

@ -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:

View File

@ -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

View File

@ -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