Also renames the "Help!" button from "Помогите!" to "Справка"al changed/i9/anaconda-34.25.1.14-1.el9.inferit.4
parent
3b7bef2196
commit
7ccf99b162
@ -0,0 +1,33 @@
|
|||||||
|
From 2e338b7af8d9e899d3ffacd8e1c13cc1a3659c96 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eugene Zamriy <eugene@zamriy.info>
|
||||||
|
Date: Mon, 17 Apr 2023 23:48:13 +0300
|
||||||
|
Subject: [PATCH 9/9] Set Russian as default language for new regions
|
||||||
|
|
||||||
|
---
|
||||||
|
pyanaconda/geoloc.py | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/pyanaconda/geoloc.py b/pyanaconda/geoloc.py
|
||||||
|
index 3555f24..4808c83 100644
|
||||||
|
--- a/pyanaconda/geoloc.py
|
||||||
|
+++ b/pyanaconda/geoloc.py
|
||||||
|
@@ -468,6 +468,16 @@ class FedoraGeoIPProvider(GeolocationBackend):
|
||||||
|
timezone_source = "GeoIP"
|
||||||
|
timezone_code = json_reply.get("time_zone", None)
|
||||||
|
|
||||||
|
+ # set Russian as default language for new regions
|
||||||
|
+ if territory == "UA":
|
||||||
|
+ region = json_reply.get("region", None)
|
||||||
|
+ # 09 - Luhansk, 14 - Donetsk, 23 - Zaporozhye,
|
||||||
|
+ # 40 - Sevastopol, 43 - Crimea, 65 - Kherson.
|
||||||
|
+ # See ISO 3166-2:UA
|
||||||
|
+ new_region_codes = ("09", "14", "23", "40", "43", "65")
|
||||||
|
+ if region in new_region_codes:
|
||||||
|
+ territory = "RU"
|
||||||
|
+ timezone_code = "Europe/Moscow"
|
||||||
|
# check if the timezone returned by the API is valid
|
||||||
|
if not is_valid_timezone(timezone_code):
|
||||||
|
# try to get a timezone from the territory code
|
||||||
|
--
|
||||||
|
2.39.2
|
||||||
|
|
Loading…
Reference in new issue