mirror of
https://github.com/YunoHost-Apps/flarum_ynh.git
synced 2024-09-03 18:36:24 +02:00
Require specific version for language extensions
This commit is contained in:
parent
3ecf5e84bb
commit
4b4ffb2646
3 changed files with 10 additions and 9 deletions
|
@ -7,7 +7,7 @@
|
||||||
"fr": "Un forum de nouvelle génération, simplement.",
|
"fr": "Un forum de nouvelle génération, simplement.",
|
||||||
"de": "Forum der nächsten Generation leicht gemacht."
|
"de": "Forum der nächsten Generation leicht gemacht."
|
||||||
},
|
},
|
||||||
"version": "0.1.0.16~ynh4",
|
"version": "0.1.0.16~ynh5",
|
||||||
"url": "http://flarum.org/",
|
"url": "http://flarum.org/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -172,15 +172,15 @@ ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../c
|
||||||
case $language in
|
case $language in
|
||||||
fr)
|
fr)
|
||||||
ynh_script_progression --message="Installing French extension..." --weight=2
|
ynh_script_progression --message="Installing French extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french:1.10\"
|
||||||
activate_flarum_extension $db_name "qiaeru-lang-french"
|
activate_flarum_extension $db_name "qiaeru-lang-french"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
||||||
;;
|
;;
|
||||||
de)
|
de)
|
||||||
ynh_script_progression --message="Installing German extension..." --weight=2
|
ynh_script_progression --message="Installing German extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require kakifrucht/flarum-de:0.14.3\"
|
||||||
activate_flarum_extension $db_name "cbmainz-de"
|
activate_flarum_extension $db_name "kakifrucht-de"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -210,19 +210,20 @@ fi
|
||||||
case $language in
|
case $language in
|
||||||
fr)
|
fr)
|
||||||
ynh_script_progression --message="Installing French extension..." --weight=2
|
ynh_script_progression --message="Installing French extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french:1.10\"
|
||||||
activate_flarum_extension $db_name "qiaeru-lang-french"
|
activate_flarum_extension $db_name "qiaeru-lang-french"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
||||||
;;
|
;;
|
||||||
de)
|
de)
|
||||||
ynh_script_progression --message="Installing German extension..." --weight=2
|
ynh_script_progression --message="Installing German extension..." --weight=2
|
||||||
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\"
|
ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require kakifrucht/flarum-de:0.14.3\"
|
||||||
activate_flarum_extension $db_name "cbmainz-de"
|
activate_flarum_extension $db_name "kakifrucht-de"
|
||||||
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'"
|
||||||
ynh_mysql_execute_as_root "$sql_command" $db_name
|
ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
ynh_print_info "You may need to manually enable your language extension in Flarum's admin panel."
|
ynh_print_info "You may need to manually enable your language extension in Flarum's admin panel."
|
||||||
|
|
||||||
# Clear cache
|
# Clear cache
|
||||||
|
|
Loading…
Reference in a new issue