[locale] Update documentation to mention *fixed* style

This commit is contained in:
Adriaan de Groot 2020-06-03 15:11:19 +02:00
parent ac2a9c569e
commit 67d7c700fd
2 changed files with 28 additions and 17 deletions

View File

@ -30,14 +30,18 @@ zone: "New_York"
# #
# GeoIP needs a working Internet connection. # GeoIP needs a working Internet connection.
# This can be managed from `welcome.conf` by adding # This can be managed from `welcome.conf` by adding
# internet to the list of required conditions. # internet to the list of required conditions. (The welcome
# module can also do its own GeoIP lookups, independently
# of the lookup done here. The lookup in the welcome module
# is used to establish language; this one is for timezone).
# #
# The configuration # The configuration is in three parts:
# is in three parts: a *style*, which can be "json" or "xml" # - a *style*, which can be "json" or "xml" depending on the
# depending on the kind of data returned by the service, and # kind of data returned by the service, and
# a *url* where the data is retrieved, and an optional *selector* # - a *url* where the data is retrieved, and
# to pick the right field out of the returned data (e.g. field # - an optional *selector*
# name in JSON or element name in XML). # to pick the right field out of the returned data (e.g. field
# name in JSON or element name in XML).
# #
# The default selector (when the setting is blank) is picked to # The default selector (when the setting is blank) is picked to
# work with existing JSON providers (which use "time_zone") and # work with existing JSON providers (which use "time_zone") and
@ -45,8 +49,8 @@ zone: "New_York"
# #
# If the service configured via *url* uses # If the service configured via *url* uses
# a different attribute name (e.g. "timezone") in JSON or a # a different attribute name (e.g. "timezone") in JSON or a
# different element tag (e.g. "<Time_Zone>") in XML, set this # different element tag (e.g. "<Time_Zone>") in XML, set the
# string to the name or tag to be used. # selector to the name or tag to be used.
# #
# In JSON: # In JSON:
# - if the string contains "." characters, this is used as a # - if the string contains "." characters, this is used as a
@ -58,7 +62,10 @@ zone: "New_York"
# - all elements with the named tag (e.g. all TimeZone) elements # - all elements with the named tag (e.g. all TimeZone) elements
# from the document are checked; the first one with non-empty # from the document are checked; the first one with non-empty
# text value is used. # text value is used.
# # Special case:
# - the *style* "fixed" is also supported. This ignores the data
# returned from the URL (but the URL must still be valid!)
# and just returns the value of the *selector*.
# #
# An HTTP(S) request is made to *url*. The request should return # An HTTP(S) request is made to *url*. The request should return
# valid data in a suitable format, depending on *style*; # valid data in a suitable format, depending on *style*;
@ -67,9 +74,6 @@ zone: "New_York"
# does not follow the conventions of "suitable data" described # does not follow the conventions of "suitable data" described
# below, *selector* may be used to pick different data. # below, *selector* may be used to pick different data.
# #
# Note that this example URL works, but the service is shutting
# down in June 2018.
#
# Suitable JSON data looks like # Suitable JSON data looks like
# ``` # ```
# {"time_zone":"America/New_York"} # {"time_zone":"America/New_York"}
@ -84,9 +88,6 @@ zone: "New_York"
# - backslashes are removed # - backslashes are removed
# - spaces are replaced with _ # - spaces are replaced with _
# #
# Legacy settings "geoipStyle", "geoipUrl" and "geoipSelector"
# in the top-level are still supported, but I'd advise against.
#
# To disable GeoIP checking, either comment-out the entire geoip section, # To disable GeoIP checking, either comment-out the entire geoip section,
# or set the *style* key to an unsupported format (e.g. `none`). # or set the *style* key to an unsupported format (e.g. `none`).
# Also, note the analogous feature in src/modules/welcome/welcome.conf. # Also, note the analogous feature in src/modules/welcome/welcome.conf.
@ -95,3 +96,12 @@ geoip:
style: "json" style: "json"
url: "https://geoip.kde.org/v1/calamares" url: "https://geoip.kde.org/v1/calamares"
selector: "" # leave blank for the default selector: "" # leave blank for the default
# For testing purposes, you could use *fixed* style, to see how Calamares
# behaves in a particular zone:
#
# geoip:
# style: "fixed"
# url: "https://geoip.kde.org/v1/calamares" # Still needs to be valid!
# selector: "America/Vancouver" # this is the selected zone
#

View File

@ -64,7 +64,8 @@ requirements:
# #
# To disable GeoIP checking, either comment-out the entire geoip section, # To disable GeoIP checking, either comment-out the entire geoip section,
# or set the *style* key to an unsupported format (e.g. `none`). # or set the *style* key to an unsupported format (e.g. `none`).
# Also, note the analogous feature in src/modules/locale/locale.conf. # Also, note the analogous feature in `src/modules/locale/locale.conf`,
# which is where you will find complete documentation.
# #
geoip: geoip:
style: "none" style: "none"