diff options
Diffstat (limited to 'fsmgr.hs')
-rw-r--r-- | fsmgr.hs | 48 |
1 files changed, 47 insertions, 1 deletions
@@ -65,8 +65,54 @@ data AptListCfg = | |||
65 | , translationLang :: String | 65 | , translationLang :: String |
66 | } | 66 | } |
67 | 67 | ||
68 | {- | ||
69 | TODO: language should derive from $LC_MESSAGES as implemented by apt: | ||
70 | |||
71 | Manual page apt.conf(5) | ||
72 | |||
73 | Languages | ||
74 | |||
75 | The Languages subsection controls which Translation files | ||
76 | are downloaded and in which order APT tries to display | ||
77 | the description-translations. APT will try to display | ||
78 | the first available description in the language which is | ||
79 | listed first. Languages can be defined with their short or | ||
80 | long language codes. Note that not all archives provide | ||
81 | Translation files for every language - the long language | ||
82 | codes are especially rare. | ||
83 | |||
84 | The default list includes "environment" and "en". | ||
85 | "environment" has a special meaning here: it will be | ||
86 | replaced at runtime with the language codes extracted from | ||
87 | the LC_MESSAGES environment variable. It will also ensure | ||
88 | that these codes are not included twice in the list. If | ||
89 | LC_MESSAGES is set to "C" only the Translation-en file (if | ||
90 | available) will be used. To force APT to use no Translation | ||
91 | file use the setting Acquire::Languages=none. "none" is | ||
92 | another special meaning code which will stop the search for | ||
93 | a suitable Translation file. This tells APT to download | ||
94 | these translations too, without actually using them unless | ||
95 | the environment specifies the languages. So the following | ||
96 | example configuration will result in the order "en, de" in an | ||
97 | English locale or "de, en" in a German one. Note that "fr" | ||
98 | is downloaded, but not used unless APT is used in a French | ||
99 | locale (where the order would be "fr, de, en"). | ||
100 | |||
101 | Acquire::Languages { "environment"; "de"; "en"; "none"; | ||
102 | "fr"; }; | ||
103 | |||
104 | Note: To prevent problems resulting from APT being executed | ||
105 | in different environments (e.g. by different users or by | ||
106 | other programs) all Translation files which are found in | ||
107 | /var/lib/apt/lists/ will be added to the end of the list | ||
108 | (after an implicit "none"). | ||
109 | |||
110 | -} | ||
111 | language :: String | ||
112 | language = "en" | ||
113 | |||
68 | aptListCfg :: AptListCfg | 114 | aptListCfg :: AptListCfg |
69 | aptListCfg = AptListCfg getDebianCodename debarch "en" | 115 | aptListCfg = AptListCfg getDebianCodename debarch language |
70 | 116 | ||
71 | aptListFiles :: AptListCfg -> [FilePath] | 117 | aptListFiles :: AptListCfg -> [FilePath] |
72 | aptListFiles AptListCfg{..} = | 118 | aptListFiles AptListCfg{..} = |