[PATCH 3/3] Set seen for lang from option & use constant for default

Martin Kolman mkolman at gmail.com
Thu Apr 11 13:39:34 UTC 2013


If the language was set from boot option, set the seen flag for it to
True. Also set use the DEFAULT_LANG constant for the default language,
that is set if parsing the option fails.

Signed-off-by: Martin Kolman <mkolman at gmail.com>
---
 anaconda | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/anaconda b/anaconda
index fab30d6..993ec68 100755
--- a/anaconda
+++ b/anaconda
@@ -940,8 +940,8 @@ if __name__ == "__main__":
         # Given something other than the long format we prefer?  We need to
         # dig through supported translations to figure out what the user
         # meant.
+        foundLang = False
         if not opts.lang in langObj.translations:
-            foundLang = False
 
             for trans in langObj.translations.keys():
                 if opts.lang in expand_langs(trans):
@@ -950,10 +950,13 @@ if __name__ == "__main__":
                     break
 
             if not foundLang:
-                opts.lang = "en_US.UTF-8"
+                opts.lang = constants.DEFAULT_LANG
 
         langObj.set_install_lang(opts.lang)
         ksdata.lang.lang = opts.lang
+        # report if a language specified by the user
+        # or a default was used
+        ksdata.lang.seen = foundLang
 
     import blivet
     blivet.enable_installer_mode()
-- 
1.8.1.4



More information about the anaconda-patches mailing list