Set Russian as default language for new regions

Also renames the "Help!" button from "Помогите!" to "Справка"
al changed/i9/anaconda-34.25.1.14-1.el9.inferit.4
Eugene Zamriy 2 years ago
parent 3b7bef2196
commit 7ccf99b162
Signed by: ezamriy
GPG Key ID: 7EBF95C7DCFA496C

@ -1,16 +1,16 @@
From f869c30184686ba4f3901a013c5b94deb408e295 Mon Sep 17 00:00:00 2001
From e02c546fc470816562c2572313a623fc313ca25f Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <eugene@zamriy.info>
Date: Fri, 14 Apr 2023 18:23:29 +0300
Subject: [PATCH 8/8] Replace Fedora references and update translations
Subject: [PATCH 8/9] Replace Fedora references and update translations
---
data/liveinst/gnome/fedora-welcome.desktop | 3 +-
data/liveinst/gnome/fedora-welcome.js | 6 +--
docs/intro.rst | 4 +-
docs/iscsi.rst | 2 +-
po/ru.po | 44 +++++++++++-----------
po/ru.po | 46 +++++++++++-----------
pyanaconda/core/constants.py | 4 +-
6 files changed, 32 insertions(+), 31 deletions(-)
6 files changed, 33 insertions(+), 32 deletions(-)
diff --git a/data/liveinst/gnome/fedora-welcome.desktop b/data/liveinst/gnome/fedora-welcome.desktop
index 60e5c38..90f5678 100644
@ -84,7 +84,7 @@ index 847078d..6d9c4b3 100644
diff --git a/po/ru.po b/po/ru.po
index e461fe9..f78c790 100644
index e461fe9..fcf49d1 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -987,7 +987,7 @@ msgid ""
@ -171,6 +171,15 @@ index e461fe9..f78c790 100644
"покинуть программу установки."
#: pyanaconda/ui/gui/spokes/lib/accordion.py:423
@@ -3699,7 +3699,7 @@ msgstr[2] "Выбраны {} устройств _хранения"
#: pyanaconda/ui/gui/__init__.py:365 widgets/src/BaseWindow.c:151
msgid "Help!"
-msgstr "Помогите!"
+msgstr "Справка"
#: pyanaconda/ui/gui/__init__.py:870
msgctxt "GUI|Yes No Dialog"
@@ -7442,25 +7442,25 @@ msgstr "Установить Live CD на жёсткий диск"
#: data/liveinst/gnome/fedora-welcome.desktop:3

@ -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

@ -1,7 +1,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 34.25.1.14
Release: 1%{?dist}.inferit.3
Release: 1%{?dist}.inferit.4
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -21,6 +21,7 @@ Patch1005: 0005-Set-default-timezone-to-Europe-Moscow.patch
Patch1006: 0006-Add-MSVSphere-product-config.patch
Patch1007: 0007-Set-Russian-language-as-default.patch
Patch1008: 0008-Replace-Fedora-references-and-update-translations.patch
Patch1009: 0009-Set-Russian-as-default-language-for-new-regions.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -421,6 +422,10 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{_prefix}/libexec/anaconda/dd_*
%changelog
* Mon Apr 17 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 34.25.1.14-1.inferit.4
- Set Russian as default language for new regions
- Updated Russian translation patch
* Sun Apr 16 2023 Eugene Zamriy <ezamriy@msvsphere.ru> - 34.25.1.14-1.inferit.3
- Updated Russian translation patch

Loading…
Cancel
Save