diff options
author | Vratislav Podzimek <vpodzime@redhat.com> | 2013-01-08 11:14:34 +0100 |
---|---|---|
committer | Vratislav Podzimek <vpodzime@redhat.com> | 2013-01-15 14:08:43 +0100 |
commit | 7c88c8797a16f0cc1fd48c654305ad73f5c96ed8 (patch) | |
tree | 3614b1f1101f8e8e7666693fb443598f3cfee976 /pyanaconda | |
parent | 21075558d2406070fd85e313c10f51156e0a0395 (diff) | |
download | anaconda-7c88c8797a16f0cc1fd48c654305ad73f5c96ed8.tar.gz anaconda-7c88c8797a16f0cc1fd48c654305ad73f5c96ed8.tar.xz anaconda-7c88c8797a16f0cc1fd48c654305ad73f5c96ed8.zip |
Use DEFAULT_LANG instead of magic value "en_US.UTF-8"
Also fix the comment above the DEFAULT_LANG constant.
Diffstat (limited to 'pyanaconda')
-rw-r--r-- | pyanaconda/constants.py | 2 | ||||
-rw-r--r-- | pyanaconda/localization.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py index ab92a0a39..ad2737aed 100644 --- a/pyanaconda/constants.py +++ b/pyanaconda/constants.py @@ -86,7 +86,7 @@ ISO_DIR = MOUNT_DIR + "/isodir" INSTALL_TREE = MOUNT_DIR + "/source" BASE_REPO_NAME = "anaconda" -# NOTE: this should be LANG.CODESET, e.g. en_US.UTF-8 +# NOTE: this should be LANG_TERRITORY.CODESET, e.g. en_US.UTF-8 DEFAULT_LANG = "en_US.UTF-8" DRACUT_SHUTDOWN_EJECT = "/run/initramfs/usr/lib/dracut/hooks/shutdown/99anaconda-eject.sh" diff --git a/pyanaconda/localization.py b/pyanaconda/localization.py index 01115c042..672e35c53 100644 --- a/pyanaconda/localization.py +++ b/pyanaconda/localization.py @@ -27,6 +27,7 @@ import re import babel +from pyanaconda.constants import DEFAULT_LANG LOCALE_PREFERENCES = {} @@ -353,8 +354,8 @@ class Language(object): self.translations = {repr(locale):locale for locale in get_available_translations()} self.locales = {repr(locale):locale for locale in get_all_locales()} - self.preferred_translation = self.translations['en_US.UTF-8'] - self.preferred_locales = [self.locales['en_US.UTF-8']] + self.preferred_translation = self.translations[DEFAULT_LANG] + self.preferred_locales = [self.locales[DEFAULT_LANG]] self.preferred_locale = self.preferred_locales[0] self.all_preferences = preferences |