Merge tag 'v1.6.0rc4' into sync/upstream-1.6.0rc4
Conflicts:
app/javascript/mastodon/features/getting_started/index.js
app/javascript/packs/public.js
app/javascript/styles/components.scss
This commit is contained in:
@@ -96,12 +96,14 @@ class ActivityPub::TagManager
|
||||
when 'Account'
|
||||
klass.find_local(uri_to_local_id(uri, :username))
|
||||
else
|
||||
klass.find_by(id: uri_to_local_id(uri))
|
||||
StatusFinder.new(uri).status
|
||||
end
|
||||
elsif ::TagManager.instance.local_id?(uri)
|
||||
klass.find_by(id: ::TagManager.instance.unique_tag_to_local_id(uri, klass.to_s))
|
||||
else
|
||||
klass.find_by(uri: uri.split('#').first)
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,16 @@ class LanguageDetector
|
||||
private
|
||||
|
||||
def detected_language_code
|
||||
result.language.to_sym if detected_language_reliable?
|
||||
iso6391(result.language).to_sym if detected_language_reliable?
|
||||
end
|
||||
|
||||
def iso6391(bcp47)
|
||||
iso639 = bcp47.split('-').first
|
||||
|
||||
# CLD3 returns grandfathered language code for Hebrew
|
||||
return 'he' if iso639 == 'iw'
|
||||
|
||||
ISO_639.find(iso639).alpha2
|
||||
end
|
||||
|
||||
def result
|
||||
|
||||
Reference in New Issue
Block a user