From 1e33c42064a7f0c06308eeab8184544ecf008960 Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Thu, 31 Mar 2022 11:34:57 -0500 Subject: [PATCH] Fix dog locale, move closer to upstream 3.5.0 --- app/controllers/auth/registrations_controller.rb | 1 - app/helpers/languages_helper.rb | 6 +++--- app/helpers/statuses_helper.rb | 8 -------- .../features/compose/components/search_results.js | 10 ---------- app/services/activitypub/process_account_service.rb | 2 -- config/application.rb | 7 +++---- config/initializers/source.rb | 9 --------- config/locales/dog.yml | 8 ++++---- 8 files changed, 10 insertions(+), 41 deletions(-) delete mode 100644 config/initializers/source.rb diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb index 6ce733f25..1c3adbd78 100644 --- a/app/controllers/auth/registrations_controller.rb +++ b/app/controllers/auth/registrations_controller.rb @@ -50,7 +50,6 @@ class Auth::RegistrationsController < Devise::RegistrationsController resource.registration_form_time = session[:registration_form_time] resource.sign_up_ip = request.remote_ip - resource.current_sign_in_ip = request.remote_ip if resource.current_sign_in_ip.nil? resource.build_account if resource.account.nil? end diff --git a/app/helpers/languages_helper.rb b/app/helpers/languages_helper.rb index 6adc0cc28..70a04fd08 100644 --- a/app/helpers/languages_helper.rb +++ b/app/helpers/languages_helper.rb @@ -2,9 +2,6 @@ module LanguagesHelper ISO_639_1 = { - squeak: ["Squeak", "Squeak"].freeze, - dog: ["Dog", "Dog"].freeze, - lion: ["Lion", "Lion"].freeze, aa: ['Afar', 'Afaraf'].freeze, ab: ['Abkhaz', 'аҧсуа бызшәа'].freeze, ae: ['Avestan', 'avesta'].freeze, @@ -38,6 +35,7 @@ module LanguagesHelper cy: ['Welsh', 'Cymraeg'].freeze, da: ['Danish', 'dansk'].freeze, de: ['German', 'Deutsch'].freeze, + dog: ["Dog", "Dog"].freeze, dv: ['Divehi', 'Dhivehi'].freeze, dz: ['Dzongkha', 'རྫོང་ཁ'].freeze, ee: ['Ewe', 'Eʋegbe'].freeze, @@ -99,6 +97,7 @@ module LanguagesHelper lb: ['Luxembourgish', 'Lëtzebuergesch'].freeze, lg: ['Ganda', 'Luganda'].freeze, li: ['Limburgish', 'Limburgs'].freeze, + lion: ["Lion", "Lion"].freeze, ln: ['Lingala', 'Lingála'].freeze, lo: ['Lao', 'ພາສາ'].freeze, lt: ['Lithuanian', 'lietuvių kalba'].freeze, @@ -152,6 +151,7 @@ module LanguagesHelper sn: ['Shona', 'chiShona'].freeze, so: ['Somali', 'Soomaaliga'].freeze, sq: ['Albanian', 'Shqip'].freeze, + squeak: ["Squeak", "Squeak"].freeze, sr: ['Serbian', 'српски језик'].freeze, ss: ['Swati', 'SiSwati'].freeze, st: ['Southern Sotho', 'Sesotho'].freeze, diff --git a/app/helpers/statuses_helper.rb b/app/helpers/statuses_helper.rb index 0e0f2849c..f75da4489 100644 --- a/app/helpers/statuses_helper.rb +++ b/app/helpers/statuses_helper.rb @@ -65,14 +65,6 @@ module StatusesHelper embedded_view? ? '_blank' : nil end - def acct(account) - if account.local? - "@#{account.acct}@#{Rails.configuration.x.local_domain}" - else - "@#{account.acct}" - end - end - def text_formatting_classes case current_user&.setting_strip_formatting when 'none', nil diff --git a/app/javascript/mastodon/features/compose/components/search_results.js b/app/javascript/mastodon/features/compose/components/search_results.js index 04aa75bb4..9b3d01cfd 100644 --- a/app/javascript/mastodon/features/compose/components/search_results.js +++ b/app/javascript/mastodon/features/compose/components/search_results.js @@ -103,16 +103,6 @@ class SearchResults extends ImmutablePureComponent {
-
- -
-
- ); - } else if(results.get('statuses') && results.get('statuses').size === 0 && !searchEnabled && !(searchTerm.startsWith('@') || searchTerm.startsWith('#') || searchTerm.includes(' '))) { - statuses = ( -
-
-
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index 80a3c4593..ec5140720 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -16,8 +16,6 @@ class ActivityPub::ProcessAccountService < BaseService @domain = domain @collections = {} - return if auto_suspend? - RedisLock.acquire(lock_options) do |lock| if lock.acquired? @account = Account.remote.find_by(uri: @uri) if @options[:only_key] diff --git a/config/application.rb b/config/application.rb index 0dfaf8741..c26c69cec 100644 --- a/config/application.rb +++ b/config/application.rb @@ -70,10 +70,6 @@ module Mastodon # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] config.i18n.available_locales = [ :af, - :dog, - :lion, - :squeak, - :en, :ar, :ast, :bg, @@ -86,6 +82,7 @@ module Mastodon :cy, :da, :de, + :dog, :el, :en, :eo, @@ -116,6 +113,7 @@ module Mastodon :kn, :ko, :ku, + :lion, :lt, :lv, :mk, @@ -137,6 +135,7 @@ module Mastodon :sk, :sl, :sq, + :squeak, :sr, :'sr-Latn', :sv, diff --git a/config/initializers/source.rb b/config/initializers/source.rb deleted file mode 100644 index 3b77c80c9..000000000 --- a/config/initializers/source.rb +++ /dev/null @@ -1,9 +0,0 @@ -# frozen_string_literal: true -module Mastodon - module Version - module_function - def source_base_url - 'https://git.asonix.dog/asonix/mastodon' - end - end -end diff --git a/config/locales/dog.yml b/config/locales/dog.yml index 7c6e07bc0..0db355ca5 100644 --- a/config/locales/dog.yml +++ b/config/locales/dog.yml @@ -1277,11 +1277,11 @@ dog: decimal_units: format: "%n%u" units: - bildog: B - mildog: M - quadrildog: Q + billion: B + million: M + quadrillion: Q thousand: K - trildog: T + trillion: T unit: '' otp_authentication: code_hint: Enter the code generated by your authenticator app to confirm