I think this should go to rhel7-branch as well.
Vratislav Podzimek (1): Setup language early to a value we can figure out
anaconda | 9 ++++++--- pyanaconda/ui/gui/hubs/progress.py | 10 ++-------- 2 files changed, 8 insertions(+), 11 deletions(-)
We need to setup language early for the user interface to run properly.
Related: rhbz#997397
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- anaconda | 9 ++++++--- pyanaconda/ui/gui/hubs/progress.py | 10 ++-------- 2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/anaconda b/anaconda index 2467eea..fd8e2fe 100755 --- a/anaconda +++ b/anaconda @@ -970,13 +970,16 @@ if __name__ == "__main__":
from pyanaconda import localization # Set the language before loading an interface, when it may be too late. - if opts.lang: - locales = localization.get_language_locales(opts.lang) + requested_lang = opts.lang or ksdata.lang.lang + if requested_lang: + locales = localization.get_language_locales(requested_lang) if locales: localization.setup_locale(locales[0], ksdata.lang) ksdata.lang.seen = True else: - log.error("Invalid locale '%s' given on command line", opts.lang) + log.error("Invalid locale '%s' given on command line or in kickstart", requested_lang) + else: + localization.setup_locale(constants.DEFAULT_LANG)
import blivet blivet.enable_installer_mode() diff --git a/pyanaconda/ui/gui/hubs/progress.py b/pyanaconda/ui/gui/hubs/progress.py index 1394e2f..5fbac49 100644 --- a/pyanaconda/ui/gui/hubs/progress.py +++ b/pyanaconda/ui/gui/hubs/progress.py @@ -31,7 +31,7 @@ from pyanaconda.i18n import _ from pyanaconda.localization import expand_langs from pyanaconda.product import productName from pyanaconda.flags import flags -from pyanaconda.constants import THREAD_INSTALL, THREAD_CONFIGURATION, DEFAULT_LANG +from pyanaconda.constants import THREAD_INSTALL, THREAD_CONFIGURATION from pykickstart.constants import KS_SHUTDOWN, KS_REBOOT
from pyanaconda.ui.gui.hubs import Hub @@ -146,13 +146,7 @@ class ProgressHub(Hub):
# We first look for rnotes in paths containing the language, then in # directories without the language component. You know, just in case. - try: - langs = expand_langs(os.environ["LANG"]) + [""] - except KeyError: - # if for some reason LANG isn't set to anything, set it to - # the default value - os.environ["LANG"] = DEFAULT_LANG - langs = expand_langs(os.environ["LANG"]) + [""] + langs = expand_langs(os.environ["LANG"]) + [""]
paths = ["/tmp/updates/pixmaps/rnotes/%s/", "/tmp/product/pixmaps/rnotes/%s/",
On Thu, Aug 29, 2013 at 01:38:58PM +0200, Vratislav Podzimek wrote:
I think this should go to rhel7-branch as well.
Yes, I agree, just remember to tag it (think it was #997397). Ack on the patch--thanks.
Vratislav Podzimek (1): Setup language early to a value we can figure out
anaconda | 9 ++++++--- pyanaconda/ui/gui/hubs/progress.py | 10 ++-------- 2 files changed, 8 insertions(+), 11 deletions(-)
-- 1.7.11.7
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
On Tue, 2013-09-03 at 10:24 -0400, Samantha N. Bueno wrote:
On Thu, Aug 29, 2013 at 01:38:58PM +0200, Vratislav Podzimek wrote:
I think this should go to rhel7-branch as well.
Yes, I agree, just remember to tag it (think it was #997397). Ack on the patch--thanks.
The tag is there (as Related), but this patch doesn't apply to rhel7-branch, because that branch still have the old, scary localization.py module. I'd really like to replace it with the new one from the master branch and avoid maintaining the scary code for a decade, but I'm not sure bug #997397 is the right "official reason" to do that. Any suggestions?
On Wed, Sep 04, 2013 at 11:49:03AM +0200, Vratislav Podzimek wrote:
On Tue, 2013-09-03 at 10:24 -0400, Samantha N. Bueno wrote:
On Thu, Aug 29, 2013 at 01:38:58PM +0200, Vratislav Podzimek wrote:
I think this should go to rhel7-branch as well.
Yes, I agree, just remember to tag it (think it was #997397). Ack on the patch--thanks.
The tag is there (as Related), but this patch doesn't apply to rhel7-branch, because that branch still have the old, scary localization.py module. I'd really like to replace it with the new one from the master branch and avoid maintaining the scary code for a decade, but I'm not sure bug #997397 is the right "official reason" to do that. Any suggestions?
Whoops, didn't see the tag. ;) Hrm. I agree, I don't think #997397 is a good official reason for overhauling localization.py. Those patches introduce quite a significant change; I think probably the best thing would be to file a new bug against 7.0 and tag the commits against that once you cherry-pick them over.
Samantha
anaconda-patches@lists.fedorahosted.org