Commit Graph

11 Commits (d031cd2998925ecffe74de767139e8b15969c308)

Author SHA1 Message Date
Mathias Merscher 588ff5f512 ISO-8859-15 locale normalization in locale_gen module
Signed-off-by: Mathias Merscher <Mathias.Merscher@dg-i.net>
2016-12-08 11:33:02 -05:00
Matt Martz 42bca5398b Use try/finally with file opening to close the file 2016-12-08 11:32:36 -05:00
Matt Martz 8bd5757720 Fix up modules that have python24 syntax error 2016-12-08 11:32:36 -05:00
Toshio Kuratomi 77041aec47 remove non-ascii quotes from message string
Fixes https://github.com/ansible/ansible/pull/8564
2016-12-08 11:32:30 -05:00
Richard Gray e6bf26967c Set default for locale_gen state parameter
Fix the state parameter for the locale_gen module to be non-mandatory
with a default value of 'present', as indicated by the module
documentation.
2016-12-08 11:32:27 -05:00
Sterfield 02587fba94 Missing import re
I don't even know how it magically worked, but the fact is the code was
correct, and ran OK without the import re.
2016-12-08 11:32:26 -05:00
Sterfield a674cb06e7 Now allow every type of locales + archlinux fix
The previous version of this code was supporting only locales using the
format "<language>_<territory>.<charset>". But all the locales that
doesn't have this format were not installable (such as "fr_FR" or
"fr_FR@euro").
Also, if an invalid locales was provided, the module kept sending a
"changed" status.

Now :
 * if the user provides an invalid locales, the module failed. Locales
   are verified using /etc/locale.gen or /usr/share/i18n/SUPPORTED if
   Ubuntu
 * Every types of valid locales are now supported.
 * The locale module was not working on Archlinux, as there's no space
   between the "#" and the locale. This is now supported. Credits goes
   to danderson189, this is his code.

This module was tested on debian jessie, ubuntu 14 LTS and last
Archlinux.
2016-12-08 11:32:26 -05:00
Hiroshi Umehara 6c6b9d2b4d Generalize locale name normalization 2016-12-08 11:32:24 -05:00
Hiroshi Umehara 0ac3592b92 Add EUC-JP locale name normalization
The function normalizes checks for UTF-8, but the same issue exists for
other locales as well.  This fix adds normalization for EUC-JP, a Japanese
locale.
2016-12-08 11:32:24 -05:00
Baptiste Mispelon 7a60427749 Fixed typo in locale_gen documentation. 2016-12-08 11:32:19 -05:00
Michael DeHaan 5879c503bb File extensions! 2016-12-08 11:32:18 -05:00