-
Notifications
You must be signed in to change notification settings - Fork 70
Add language choice for installation #664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
7a5785e
80207df
29d2aaf
ca5453e
a193e33
800fe77
c1aaaf3
da63516
131e1e3
f72c772
4dc15d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,6 +140,17 @@ then | |
| exec_occ maintenance:repair | ||
| fi | ||
|
|
||
| # Fix warning "Your installation has no default phone region set" | ||
| if [ "$(exec_occ config:system:get default_phone_region)" == "" ]; then | ||
| config_locale=$(exec_occ config:system:get default_locale) | ||
| if [ "$config_locale" == "" ]; then | ||
| # If it's not set in config use "US" as default | ||
| config_locale="US" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not FR by default?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not any other code. It would be more logical that the user chooses from a drop down list at the installation or change it in the app panel
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are talking about a default value set if there was no previous value set.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @ericgaspar,
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's then change the default language to |
||
| fi | ||
| country=$(echo "$config_locale" | awk -F'_' '{print $2}') | ||
| exec_occ config:system:set default_phone_region --value="$country" | ||
| fi | ||
|
|
||
| # Upgrade may fail if this app is enabled | ||
| # Take all apps enabled, and check if mail is one of them | ||
| # Then temporary disable the mail app | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be just $language here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, Nextcloud's
default_languageuses ISO_639-1 language codes such asenfor English, see https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#default-languageThat's why we need to cut the first part from
$language, e.g. takeenfromen_US.