propellor-5.3.3: property-based host configuration management in haskell

Maintainer | Sean Whitton <spwhitton@spwhitton.name>
Safe Haskell | None
Language | Haskell98

Propellor.Property.Locale

Description

Synopsis

- type Locale = String
- type LocaleVariable = String
- selectedFor :: Locale -> [LocaleVariable] -> RevertableProperty DebianLike DebianLike
- isSelectedFor :: Locale -> [LocaleVariable] -> IO Bool
- available :: Locale -> RevertableProperty DebianLike DebianLike

# Documentation

type Locale = String Source #

type LocaleVariable = String Source #

selectedFor :: Locale -> [LocaleVariable] -> RevertableProperty DebianLike DebianLike Source #

Select a locale for a list of global locale variables.

A locale variable is of the form `LC_BLAH`, `LANG` or `LANGUAGE`. See `locale(5)`. One might say

     & "en_GB.UTF-8" `Locale.selectedFor` ["LC_PAPER", "LC_MONETARY"]

to select the British English locale for paper size and currency conventions.

Note that reverting this property does not make a locale unavailable. That's because it might be required for other Locale.selectedFor statements.

isSelectedFor :: Locale -> [LocaleVariable] -> IO Bool Source #

available :: Locale -> RevertableProperty DebianLike DebianLike Source #

Ensures a locale is generated (or, if reverted, ensure it's not).

Fails if a locale is not available to be generated. That is, a commented out entry for the locale and an accompanying charset must be present in etclocale.gen.

Per Debian bug #684134 we cannot ensure a locale is generated by means of Apt.reConfigure. So localeAvailable edits etclocale.gen manually.