Allow configuration of supported languages during instance gen
This commit is contained in:
parent
dddc104fb5
commit
033e5e27d6
2 changed files with 14 additions and 0 deletions
|
@ -23,6 +23,7 @@ def run(["gen" | rest]) do
|
||||||
instance_name: :string,
|
instance_name: :string,
|
||||||
admin_email: :string,
|
admin_email: :string,
|
||||||
notify_email: :string,
|
notify_email: :string,
|
||||||
|
languages: :string,
|
||||||
dbhost: :string,
|
dbhost: :string,
|
||||||
dbname: :string,
|
dbname: :string,
|
||||||
dbuser: :string,
|
dbuser: :string,
|
||||||
|
@ -83,6 +84,14 @@ def run(["gen" | rest]) do
|
||||||
email
|
email
|
||||||
)
|
)
|
||||||
|
|
||||||
|
languages =
|
||||||
|
get_option(
|
||||||
|
options,
|
||||||
|
:languages,
|
||||||
|
"Which languages do you want to support in your instance? (comma separated)",
|
||||||
|
"en"
|
||||||
|
)
|
||||||
|
|
||||||
indexable =
|
indexable =
|
||||||
get_option(
|
get_option(
|
||||||
options,
|
options,
|
||||||
|
@ -223,6 +232,10 @@ def run(["gen" | rest]) do
|
||||||
port: port,
|
port: port,
|
||||||
email: email,
|
email: email,
|
||||||
notify_email: notify_email,
|
notify_email: notify_email,
|
||||||
|
languages:
|
||||||
|
languages
|
||||||
|
|> String.split(",", trim: true)
|
||||||
|
|> Enum.map(fn lang -> String.trim(lang) end),
|
||||||
name: name,
|
name: name,
|
||||||
dbhost: dbhost,
|
dbhost: dbhost,
|
||||||
dbname: dbname,
|
dbname: dbname,
|
||||||
|
|
|
@ -21,6 +21,7 @@ config :pleroma, :instance,
|
||||||
email: "<%= email %>",
|
email: "<%= email %>",
|
||||||
notify_email: "<%= notify_email %>",
|
notify_email: "<%= notify_email %>",
|
||||||
limit: 5000,
|
limit: 5000,
|
||||||
|
languages: <%= inspect(languages) %>,
|
||||||
registrations_open: true
|
registrations_open: true
|
||||||
|
|
||||||
config :pleroma, :media_proxy,
|
config :pleroma, :media_proxy,
|
||||||
|
|
Loading…
Reference in a new issue