[PATCH] Check whether keyboard translations are stale (#972236)

David Shea dshea at redhat.com
Thu Sep 12 15:39:04 UTC 2013


On 09/12/2013 11:28 AM, David Shea wrote:
> ---
>   pyanaconda/keyboard.py | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
> index 5b1643c..5f423c6 100644
> --- a/pyanaconda/keyboard.py
> +++ b/pyanaconda/keyboard.py
> @@ -371,11 +371,17 @@ class XklWrapper(object):
>       """
>   
>       _instance = None
> +    _instance_lang = None
>   
>       @staticmethod
>       def get_instance():
> +        # If the language has changed, we need to grab new strings
> +        if os.environ["LANG"] != XklWrapper._instance_lang:
> +            XklWrapper._instance = None
> +
>           if not XklWrapper._instance:
>               XklWrapper._instance = XklWrapper()
> +            XklWrapper._instance_lang = os.environ["LANG"]
>   
>           return XklWrapper._instance
>   
Actually, I'm going to NAK this one. I just tried with Spanish and 
accented characters aren't showing up, so there's a problem with getting 
the right character encoding out of Xkl


More information about the anaconda-patches mailing list