mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
Add language setting
This commit is contained in:
parent
2d4f739dac
commit
ae944ef929
6 changed files with 30 additions and 3 deletions
|
@ -99,6 +99,18 @@ $config['des_key'] = '__DESKEY__';
|
|||
// skin name: folder from skins/
|
||||
$config['skin'] = 'elastic';
|
||||
|
||||
// ----------------------------------
|
||||
// USER INTERFACE
|
||||
// ----------------------------------
|
||||
|
||||
// the default locale setting (leave empty for auto-detection)
|
||||
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
|
||||
$config['language'] = __LANGUAGE__;
|
||||
|
||||
// use this format for date display (date or strftime format)
|
||||
$config['date_format'] = 'd-m-Y';
|
||||
|
||||
|
||||
// Enable YunoHost users search in the address book.
|
||||
$config['ldap_public']['yunohost'] = array(
|
||||
'name' => 'YunoHost Users',
|
||||
|
|
|
@ -43,6 +43,16 @@
|
|||
"example": "/webmail",
|
||||
"default": "/webmail"
|
||||
},
|
||||
{
|
||||
"name": "language",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Choose the application language",
|
||||
"fr": "Choisissez la langue de l'application"
|
||||
},
|
||||
"choices": ["fr_FR", "en-GB"],
|
||||
"default": "fr_FR"
|
||||
},
|
||||
{
|
||||
"name": "with_carddav",
|
||||
"type": "boolean",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
# Package dependencies
|
||||
extra_php_dependencies="php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-curl"
|
||||
extra_php_dependencies="php-pear php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-curl"
|
||||
|
||||
# Plugins version
|
||||
contextmenu_version=2.3
|
||||
|
|
|
@ -24,6 +24,7 @@ domain=$YNH_APP_ARG_DOMAIN
|
|||
path_url=$YNH_APP_ARG_PATH
|
||||
with_carddav=$YNH_APP_ARG_WITH_CARDDAV
|
||||
with_enigma=$YNH_APP_ARG_WITH_ENIGMA
|
||||
language=$YNH_APP_ARG_LANGUAGE
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -47,6 +48,7 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
|
|||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=with_carddav --value=$with_carddav
|
||||
ynh_app_setting_set --app=$app --key=with_enigma --value=$with_enigma
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
|
||||
#=================================================
|
||||
# STANDARD MODIFICATIONS
|
||||
|
@ -127,6 +129,7 @@ ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_ra
|
|||
ynh_replace_string --match_string="__DBUSER__" --replace_string="$db_name" --target_file="$rc_conf"
|
||||
ynh_replace_string --match_string="__DBPASS__" --replace_string="$db_pwd" --target_file="$rc_conf"
|
||||
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$rc_conf"
|
||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
|
||||
|
||||
#=================================================
|
||||
# INSTALL ADDITIONAL PLUGINS
|
||||
|
|
|
@ -77,7 +77,7 @@ chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
|||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
|
|
@ -23,6 +23,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
|||
with_carddav=$(ynh_app_setting_get --app=$app --key=with_carddav)
|
||||
with_enigma=$(ynh_app_setting_get --app=$app --key=with_enigma)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
|
@ -129,7 +130,7 @@ ynh_system_user_create --username=$app
|
|||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
|
@ -153,6 +154,7 @@ then
|
|||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
ynh_replace_string --match_string="__DBPASS__" --replace_string="$db_pwd" --target_file="$rc_conf"
|
||||
ynh_replace_string --match_string="__DBNAME__" --replace_string="$db_name" --target_file="$rc_conf"
|
||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
|
||||
|
||||
#=================================================
|
||||
# UPDATE DEPENDENCIES WITH COMPOSER
|
||||
|
|
Loading…
Reference in a new issue