From 562250246c01838793c7cbf92392cf44cd8d50f7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 31 Aug 2018 11:16:19 +0200 Subject: Add Welsh language option (#8536) --- app/helpers/settings_helper.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/helpers') diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index 14ca2333e..ae915abf6 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -8,6 +8,7 @@ module SettingsHelper bg: 'Български', ca: 'Català', co: 'Corsu', + cy: 'Cymraeg', da: 'Dansk', de: 'Deutsch', el: 'Ελληνικά', -- cgit From 45c0f5433ca6aead4ff2ab27cf4b7b0dbd074d7f Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 31 Aug 2018 20:33:01 +0200 Subject: Do not show follow button on moved or memorial accounts (#8546) This restores the logic from before the public profile redesign. Fixes #8503 --- app/helpers/stream_entries_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb index 187bfe4a0..ac655f622 100644 --- a/app/helpers/stream_entries_helper.rb +++ b/app/helpers/stream_entries_helper.rb @@ -22,12 +22,12 @@ module StreamEntriesHelper link_to account_unfollow_path(account), class: 'button logo-button button--destructive', data: { method: :post } do safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.unfollow')]) end - else + elsif !(account.memorial? || account.moved?) link_to account_follow_path(account), class: 'button logo-button', data: { method: :post } do safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')]) end end - else + elsif !(account.memorial? || account.moved?) link_to account_remote_follow_path(account), class: 'button logo-button modal-button', target: '_new' do safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')]) end -- cgit From e9268117241be756c3172083e48e932cad96c3e9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 2 Sep 2018 19:10:32 +0200 Subject: Fix nil error in admin_account_link_to helper (#8578) Fix #8573 --- app/helpers/admin/account_moderation_notes_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/admin/account_moderation_notes_helper.rb b/app/helpers/admin/account_moderation_notes_helper.rb index 49e764cef..25586fbba 100644 --- a/app/helpers/admin/account_moderation_notes_helper.rb +++ b/app/helpers/admin/account_moderation_notes_helper.rb @@ -2,6 +2,8 @@ module Admin::AccountModerationNotesHelper def admin_account_link_to(account) + return if account.nil? + link_to admin_account_path(account.id), class: name_tag_classes(account) do safe_join([ image_tag(account.avatar.url, width: 15, height: 15, alt: display_name(account), class: 'avatar'), @@ -11,6 +13,8 @@ module Admin::AccountModerationNotesHelper end def admin_account_inline_link_to(account) + return if account.nil? + link_to admin_account_path(account.id), class: name_tag_classes(account, true) do content_tag(:span, account.acct, class: 'username') end -- cgit From 14a300b4282356100d4ca2c0858ed49e5ee76932 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 2 Sep 2018 22:31:53 +0200 Subject: Enable ro and ta locales in Rails (#8583) * Enable ro and ta locales in Rails * Add Tamil and Romanian to language dropdown --- app/helpers/settings_helper.rb | 2 ++ config/application.rb | 3 +++ 2 files changed, 5 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb index ae915abf6..fc03fcf82 100644 --- a/app/helpers/settings_helper.rb +++ b/app/helpers/settings_helper.rb @@ -35,12 +35,14 @@ module SettingsHelper pl: 'Polszczyzna', pt: 'Português', 'pt-BR': 'Português do Brasil', + ro: 'Limba română', ru: 'Русский', sk: 'Slovenčina', sl: 'Slovenščina', sr: 'Српски', 'sr-Latn': 'Srpski (latinica)', sv: 'Svenska', + ta: 'தமிழ்', te: 'తెలుగు', th: 'ภาษาไทย', tr: 'Türkçe', diff --git a/config/application.rb b/config/application.rb index af023b0db..24f75d3a2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -69,12 +69,14 @@ module Mastodon :pl, :pt, :'pt-BR', + :ro, :ru, :sk, :sl, :sr, :'sr-Latn', :sv, + :ta, :te, :th, :tr, @@ -85,6 +87,7 @@ module Mastodon ] config.i18n.default_locale = ENV['DEFAULT_LOCALE']&.to_sym + unless config.i18n.available_locales.include?(config.i18n.default_locale) config.i18n.default_locale = :en end -- cgit