From 4b4ffb264681c52d121117a8b46f571b18028d3a Mon Sep 17 00:00:00 2001 From: tituspijean Date: Fri, 4 Jun 2021 18:32:45 +0200 Subject: [PATCH 1/2] Require specific version for language extensions --- manifest.json | 2 +- scripts/install | 6 +++--- scripts/upgrade | 11 ++++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/manifest.json b/manifest.json index 42fd680..71daed1 100644 --- a/manifest.json +++ b/manifest.json @@ -7,7 +7,7 @@ "fr": "Un forum de nouvelle génération, simplement.", "de": "Forum der nächsten Generation leicht gemacht." }, - "version": "0.1.0.16~ynh4", + "version": "0.1.0.16~ynh5", "url": "http://flarum.org/", "upstream": { "license": "MIT", diff --git a/scripts/install b/scripts/install index 5289f0f..8bfc12c 100644 --- a/scripts/install +++ b/scripts/install @@ -172,15 +172,15 @@ ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../c case $language in fr) 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" sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name ;; de) 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\" - activate_flarum_extension $db_name "cbmainz-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 "kakifrucht-de" sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name ;; diff --git a/scripts/upgrade b/scripts/upgrade index e61817b..b9b2bdf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -210,19 +210,20 @@ fi case $language in fr) 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" 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) 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\" - activate_flarum_extension $db_name "cbmainz-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 "kakifrucht-de" 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 + ynh_print_info "You may need to manually enable your language extension in Flarum's admin panel." # Clear cache From a98e0b70dc20ba552135fad8bf7dc9e46dbd4049 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 4 Jun 2021 16:33:11 +0000 Subject: [PATCH 2/2] Auto-update README --- README.md | 24 ++++++------------------ README_fr.md | 36 ++++++++++++++---------------------- 2 files changed, 20 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 17aaa0d..f8a6776 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ - - ---- -