installer: Simplify locale dialogs.

* gnu/installer/newt/locale.scm (run-language-page): Simplify text.
(run-territory-page): Likewise.
(run-codeset-page): Likewise.
(run-locale-page): Don't call 'run-codeset-page' when "UTF-8" is among
the codesets of LOCALES.
This commit is contained in:
Ludovic Courtès 2019-04-07 12:11:55 +02:00
parent b596c5fbc1
commit 04d0aa9905
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 15 deletions

View File

@ -33,14 +33,8 @@
(let ((title (G_ "Locale language"))) (let ((title (G_ "Locale language")))
(run-listbox-selection-page (run-listbox-selection-page
#:title title #:title title
#:info-text (G_ "Choose the locale's language to be used for the \ #:info-text (G_ "Choose the language to use for the \
installation process. A locale is a regional variant of your language \ installation process and for the installed system.")
encompassing number, date and currency format, among other details.
Based on the language you choose, you will possibly be asked to \
select a locale's territory, codeset and modifier in the next \
steps. The locale will also be used as the default one for the \
installed system.")
#:info-textbox-width 70 #:info-textbox-width 70
#:listbox-items languages #:listbox-items languages
#:listbox-item->text language->text #:listbox-item->text language->text
@ -56,8 +50,7 @@ installed system.")
(let ((title (G_ "Locale location"))) (let ((title (G_ "Locale location")))
(run-listbox-selection-page (run-listbox-selection-page
#:title title #:title title
#:info-text (G_ "Choose your locale's location. This is a shortlist of \ #:info-text (G_ "Choose a territory for this language.")
locations based on the language you selected.")
#:listbox-items territories #:listbox-items territories
#:listbox-item->text territory->text #:listbox-item->text territory->text
#:button-text (G_ "Back") #:button-text (G_ "Back")
@ -71,8 +64,7 @@ locations based on the language you selected.")
(let ((title (G_ "Locale codeset"))) (let ((title (G_ "Locale codeset")))
(run-listbox-selection-page (run-listbox-selection-page
#:title title #:title title
#:info-text (G_ "Choose your locale's codeset. If UTF-8 is available, \ #:info-text (G_ "Choose the locale encoding.")
it should be preferred.")
#:listbox-items codesets #:listbox-items codesets
#:listbox-item->text identity #:listbox-item->text identity
#:listbox-default-item "UTF-8" #:listbox-default-item "UTF-8"
@ -191,9 +183,11 @@ glibc locale string and return it."
;; narrow down the search of a locale. ;; narrow down the search of a locale.
(break-on-locale-found locales) (break-on-locale-found locales)
;; Otherwise, ask for a codeset. ;; Otherwise, choose a codeset.
(run-codeset-page (let ((codesets (delete-duplicates (map locale-codeset locales))))
(delete-duplicates (map locale-codeset locales))))))) (if (member "UTF-8" codesets)
"UTF-8" ;don't even ask
(run-codeset-page codesets)))))))
(installer-step (installer-step
(id 'modifier) (id 'modifier)
(compute (compute