Allow configuration of supported languages during instance gen

This commit is contained in:
itepechi 2023-08-05 04:49:52 +09:00
parent dddc104fb5
commit 033e5e27d6
2 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
instance_name: :string,
admin_email: :string,
notify_email: :string,
languages: :string,
dbhost: :string,
dbname: :string,
dbuser: :string,
@ -83,6 +84,14 @@ defmodule Mix.Tasks.Pleroma.Instance do
email
)
languages =
get_option(
options,
:languages,
"Which languages do you want to support in your instance? (comma separated)",
"en"
)
indexable =
get_option(
options,
@ -223,6 +232,10 @@ defmodule Mix.Tasks.Pleroma.Instance do
port: port,
email: email,
notify_email: notify_email,
languages:
languages
|> String.split(",", trim: true)
|> Enum.map(fn lang -> String.trim(lang) end),
name: name,
dbhost: dbhost,
dbname: dbname,

View File

@ -21,6 +21,7 @@ config :pleroma, :instance,
email: "<%= email %>",
notify_email: "<%= notify_email %>",
limit: 5000,
languages: <%= inspect(languages) %>,
registrations_open: true
config :pleroma, :media_proxy,