Localizations for most server-side strings

This commit is contained in:
Eugen Rochko 2016-11-15 23:56:03 +01:00
parent 3ce6ac0ce2
commit 546c4718e7
33 changed files with 296 additions and 220 deletions

View file

@ -8,7 +8,7 @@ class NotificationMailer < ApplicationMailer
@status = status
return unless @me.user.settings(:notification_emails).mention
mail to: @me.user.email, subject: "You were mentioned by #{@status.account.acct}"
mail to: @me.user.email, subject: I18n.t('notification_mailer.mention.subject', name: @status.account.acct)
end
def follow(followed_account, follower)
@ -16,7 +16,7 @@ class NotificationMailer < ApplicationMailer
@account = follower
return unless @me.user.settings(:notification_emails).follow
mail to: @me.user.email, subject: "#{@account.acct} is now following you"
mail to: @me.user.email, subject: I18n.t('notification_mailer.follow.subject', name: @account.acct)
end
def favourite(target_status, from_account)
@ -25,7 +25,7 @@ class NotificationMailer < ApplicationMailer
@status = target_status
return unless @me.user.settings(:notification_emails).favourite
mail to: @me.user.email, subject: "#{@account.acct} favourited your status"
mail to: @me.user.email, subject: I18n.t('notification_mailer.favourite.subject', name: @account.acct)
end
def reblog(target_status, from_account)
@ -34,6 +34,6 @@ class NotificationMailer < ApplicationMailer
@status = target_status
return unless @me.user.settings(:notification_emails).reblog
mail to: @me.user.email, subject: "#{@account.acct} reblogged your status"
mail to: @me.user.email, subject: I18n.t('notification_mailer.reblog.subject', name: @account.acct)
end
end

View file

@ -6,24 +6,15 @@
= image_tag 'logo.png'
Mastodon
%p
Mastodon is a
%em free, open-source
social network server. A
%em decentralized
alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Anyone can run Mastodon and participate in the
%em social network
seamlessly.
%p
%em= Rails.configuration.x.local_domain
is a Mastodon instance.
%p= t('about.about_mastodon').html_safe
%p= t('about.about_instance', instance: Rails.configuration.x.local_domain).html_safe
.screenshot= image_tag 'screenshot.png'
.actions
.info
= link_to 'Terms', terms_path
= link_to 'Source code', 'https://github.com/Gargron/mastodon'
= link_to t('about.terms'), terms_path
= link_to t('about.source_code'), 'https://github.com/Gargron/mastodon'
= link_to 'Get started', new_user_registration_path, class: 'button'
= link_to 'Log in', new_user_session_path, class: 'button'
= link_to t('about.get_started'), new_user_registration_path, class: 'button'
= link_to t('auth.login'), new_user_session_path, class: 'button'

View file

@ -2,9 +2,9 @@
- if user_signed_in? && current_account.id != @account.id
.controls
- if current_account.following?(@account)
= link_to 'Unfollow', unfollow_account_path(@account), data: { method: :post }, class: 'button'
= link_to t('accounts.unfollow'), unfollow_account_path(@account), data: { method: :post }, class: 'button'
- else
= link_to 'Follow', follow_account_path(@account), data: { method: :post }, class: 'button'
= link_to t('accounts.follow'), follow_account_path(@account), data: { method: :post }, class: 'button'
.avatar= image_tag @account.avatar.url(:large)
%h1.name
@ -17,13 +17,13 @@
.details-counters
.counter{ class: active_nav_class(account_url(@account)) }
= link_to account_url(@account) do
%span.counter-label Posts
%span.counter-label= t('accounts.posts')
%span.counter-number= @account.statuses.count
.counter{ class: active_nav_class(following_account_url(@account)) }
= link_to following_account_url(@account) do
%span.counter-label Following
%span.counter-label= t('accounts.following')
%span.counter-number= @account.following.count
.counter{ class: active_nav_class(followers_account_url(@account)) }
= link_to followers_account_url(@account) do
%span.counter-label Followers
%span.counter-label= t('accounts.followers')
%span.counter-number= @account.followers.count

View file

@ -1 +1 @@
%p.nothing-here There is nothing here!
%p.nothing-here= t('accounts.nothing_here')

View file

@ -1,6 +1,5 @@
- content_for :page_title do
People who follow
= display_name(@account)
= t('accounts.people_who_follow', name: display_name(@account))
= render partial: 'header'

View file

@ -1,7 +1,5 @@
- content_for :page_title do
People whom
= display_name(@account)
follows
= t('accounts.people_followed_by', name: display_name(@account))
= render partial: 'header'

View file

@ -2,4 +2,4 @@
---
Mastodon notifications from <%= Rails.configuration.x.local_domain %>
<%= t('application_mailer.signature', instance: Rails.configuration.x.local_domain) %>

View file

@ -1,5 +1,5 @@
<%= display_name(@me) %>,
Your status was favourited by <%= @account.acct %>:
<%= t('notification_mailer.favourite.body', name: @account.acct) %>
<%= render partial: 'status' %>

View file

@ -1,5 +1,5 @@
<%= display_name(@me) %>,
<%= @account.acct %> is now following you!
<%= t('notification_mailer.follow.body', name: @account.acct) %>
<%= web_url("accounts/#{@account.id}") %>

View file

@ -1,5 +1,5 @@
<%= display_name(@me) %>,
You were mentioned by <%= @status.account.acct %> in:
<%= t('notification_mailer.mention.body', name: @status.account.acct) %>
<%= render partial: 'status' %>

View file

@ -1,5 +1,5 @@
<%= display_name(@me) %>,
Your status was reblogged by <%= @account.acct %>:
<%= t('notification_mailer.reblog.body', name: @account.acct) %>
<%= render partial: 'status' %>

View file

@ -1,11 +1,11 @@
- content_for :page_title do
= t('doorkeeper.authorizations.new.title')
.oauth-prompt
%h2
Application
%strong=@pre_auth.client.name
requests access to your account
%h2= t('doorkeeper.authorizations.new.prompt', name: @pre_auth.client.name)
%p
It will be able to
= t('doorkeeper.authorizations.new.able_to')
= @pre_auth.scopes.map { |scope| t(scope, scope: [:doorkeeper, :scopes]) }.map { |s| "<strong>#{s}</strong>"}.to_sentence.html_safe
= form_tag oauth_authorization_path, method: :post, class: 'simple_form' do

View file

@ -1,5 +1,5 @@
.entry.entry-favourite
.content
%strong= favourite.account.acct
favourited a post by
= t('stream_entries.favourited')
%strong= favourite.status.account.acct

View file

@ -1,5 +1,5 @@
.entry.entry-follow
.content
%strong= link_to follow.account.acct, account_path(follow.account)
is now following
= t('stream_entries.is_now_following')
%strong= link_to follow.target_account.acct, TagManager.instance.url_for(follow.target_account)