From 6ce12960954a6b04ab1a60114c989c029e91e5cc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 15 May 2022 16:30:00 +0200 Subject: [PATCH 1/3] Language --- conf/temp.gsconfig.php | 2 +- manifest.json | 9 +++++++++ scripts/install | 10 +++++----- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/conf/temp.gsconfig.php b/conf/temp.gsconfig.php index 5b25a12..bff157f 100644 --- a/conf/temp.gsconfig.php +++ b/conf/temp.gsconfig.php @@ -71,7 +71,7 @@ define('GSDONOTPING', 1); # Set PHP locale # http://php.net/manual/en/function.setlocale.php -etlocale(LC_ALL, 'en_US'); +etlocale(LC_ALL, '__LANGUAGE__'); # Define default timezone of server, accepts php timezone string # valid timeszones can be found here http://www.php.net/manual/en/timezones.php diff --git a/manifest.json b/manifest.json index 72f66f5..9a18fae 100644 --- a/manifest.json +++ b/manifest.json @@ -44,6 +44,15 @@ "name": "is_public", "type": "boolean", "default": true + } { + "name": "language", + "type": "string", + "ask": { + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["de_DE", "fr_FR", "en_US", "nl_NL"], + "default": "fr_FR" } ] } diff --git a/scripts/install b/scripts/install index 0586710..5757c3f 100755 --- a/scripts/install +++ b/scripts/install @@ -27,7 +27,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -language=en_US +language=$YNH_APP_ARG_LANGUAGE timezone="$(cat /etc/timezone)" phpversion=$YNH_PHP_VERSION @@ -102,12 +102,12 @@ ynh_add_fpm_config #================================================= # ADD A CONFIGURATION #================================================= -# ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -# ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$final_path/gsconfig.php" +ynh_add_config --template="../conf/temp.gsconfig.php" --destination="$final_path/temp.gsconfig.php" -# chmod 655 "$final_path/gsconfig.php" -# chown $app:$app "$final_path/gsconfig.php" +# chmod 655 "$final_path/temp.gsconfig.php" +# chown $app:$app "$final_path/temp.gsconfig.php" #================================================= # SETUP SSOWAT From e72376f83c94cae16771b36754271e9806a98981 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 15 May 2022 16:31:31 +0200 Subject: [PATCH 2/3] Update manifest.json --- manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 9a18fae..98626e4 100644 --- a/manifest.json +++ b/manifest.json @@ -44,7 +44,8 @@ "name": "is_public", "type": "boolean", "default": true - } { + }, + { "name": "language", "type": "string", "ask": { From efb9f94c9271859cd0b4dce5dc3b88d94f36d025 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 15 May 2022 16:32:13 +0200 Subject: [PATCH 3/3] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 98626e4..672a9db 100644 --- a/manifest.json +++ b/manifest.json @@ -52,7 +52,7 @@ "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["de_DE", "fr_FR", "en_US", "nl_NL"], + "choices": ["de_DE", "en_US", "fr_FR", "nl_NL"], "default": "fr_FR" } ]