Skip to content

Commit

Permalink
Add languauge_detection to instance features
Browse files Browse the repository at this point in the history
Signed-off-by: marcin mikołajczak <[email protected]>
  • Loading branch information
mkljczk committed Jul 31, 2024
1 parent 1f63fbd commit 038c6aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/pleroma/language/language_detector.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
defmodule Pleroma.Language.LanguageDetector do
@words_threshold 4

def configured? do
provider = get_provider()

!!provider and provider.configured?
end

def missing_dependencies do
provider = get_provider()

Expand Down
3 changes: 3 additions & 0 deletions lib/pleroma/web/mastodon_api/views/instance_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ defmodule Pleroma.Web.MastodonAPI.InstanceView do
if Pleroma.Language.Translation.configured?() do
"translation"
end,
if Pleroma.Language.LanguageDetector.configured?() do
"language_detection"
end,
"events",
"multitenancy"
]
Expand Down

0 comments on commit 038c6aa

Please sign in to comment.