[PATCH 04/14] Specify also query script when getting locale's native name

Vratislav Podzimek vpodzime at redhat.com
Wed Sep 25 17:27:47 UTC 2013


When getting native name for some locale we want to get it for the right
language, right territory and also script, so that we get e.g. 'Srpski
(Latinica)' for 'sr_RS at latin' instead of the cyrilic (default) version.

Related: rhbz#1006458
(cherry-picked 10d29e1d11f9238e4772b03a67a787964d60a134 from master)

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/localization.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/localization.py b/pyanaconda/localization.py
index fe6229f..f3ef182 100644
--- a/pyanaconda/localization.py
+++ b/pyanaconda/localization.py
@@ -205,7 +205,8 @@ def get_native_name(locale):
     name = langtable.language_name(languageId=parts["language"],
                                    territoryId=parts.get("territory", ""),
                                    scriptId=parts.get("script", ""),
-                                   languageIdQuery=parts["language"])
+                                   languageIdQuery=parts["language"],
+                                   scriptIdQuery=parts.get("script", ""))
 
     return _upcase_first_letter(name)
 
-- 
1.7.11.7



More information about the anaconda-patches mailing list