You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.4 KiB
35 lines
1.4 KiB
11 months ago
|
From ff1ffae621a47d4e04744d1088168bbb1c29bd0d Mon Sep 17 00:00:00 2001
|
||
|
From: tigro <tigro@msvsphere-os.ru>
|
||
|
Date: Tue, 19 Dec 2023 12:03:49 +0300
|
||
|
Subject: [PATCH 08/11] Set Russian as default language for new regions
|
||
|
|
||
|
---
|
||
|
pyanaconda/geoloc.py | 11 +++++++++++
|
||
|
1 file changed, 11 insertions(+)
|
||
|
|
||
|
diff --git a/pyanaconda/geoloc.py b/pyanaconda/geoloc.py
|
||
|
index 4873ea0..a9aa117 100644
|
||
|
--- a/pyanaconda/geoloc.py
|
||
|
+++ b/pyanaconda/geoloc.py
|
||
|
@@ -483,6 +483,17 @@ 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.43.0
|
||
|
|