diff --git a/SOURCES/0001-Added-description-of-standart-repos.patch b/SOURCES/0001-Added-description-of-standart-repos.patch new file mode 100644 index 0000000..f8fb41a --- /dev/null +++ b/SOURCES/0001-Added-description-of-standart-repos.patch @@ -0,0 +1,159 @@ +From 31b639413a37f2fd1759c39b75760163a91fb6c0 Mon Sep 17 00:00:00 2001 +From: Alexey Berezhok +Date: Tue, 5 Dec 2023 17:29:48 +0300 +Subject: [PATCH] Added description of standart repos + +--- + po/ru.po | 41 ++++++++++++++++++++++++++++++ + src/gs-repo-row.c | 63 +++++++++++++++++++++++++++++++++++++++++------ + 2 files changed, 96 insertions(+), 8 deletions(-) + +diff --git a/po/ru.po b/po/ru.po +index a80f80e..3df5754 100644 +--- a/po/ru.po ++++ b/po/ru.po +@@ -3134,6 +3134,47 @@ msgctxt "repo-row" + msgid "%s • %s" + msgstr "%s • %s" + ++#. TRANSLATORS: additional repo description 1; ++#: src/gs-repo-row.c:249 ++msgid "AppStream repo" ++msgstr "Репозиторий стандартных приложений" ++ ++#. TRANSLATORS: additional repo description 2; ++#: src/gs-repo-row.c:252 ++msgid "BaseOS repo" ++msgstr "Базовый репозиторий" ++ ++#. TRANSLATORS: additional repo description 3; ++#: src/gs-repo-row.c:255 ++msgid "CRB repo" ++msgstr "Репозиторий для разработчиков" ++ ++#. TRANSLATORS: additional repo description 4; ++#: src/gs-repo-row.c:258 ++msgid "Extras repo" ++msgstr "Репозиторий с дополнительными приложениями" ++ ++#. TRANSLATORS: additional repo description 5; ++#: src/gs-repo-row.c:261 ++msgid "HighAvailability repo" ++msgstr "Репозиторий со служюами высокой доступности" ++ ++#. TRANSLATORS: additional repo description 6; ++#: src/gs-repo-row.c:264 ++msgid "NFV repo" ++msgstr "Репозиторий с пакетами для концепции NFV" ++ ++#. TRANSLATORS: additional repo description 7; ++#: src/gs-repo-row.c:267 ++msgid "ResilientStorage repo" ++msgstr "Репозиторий для кластерных хранилищ" ++ ++#. TRANSLATORS: additional repo description 8; ++#: src/gs-repo-row.c:270 ++msgid "RT repo" ++msgstr "Репозиторий с пакетами ядра реального времени" ++ ++ + #. TRANSLATORS: lighthearted star rating description; + #. * A really bad application + #: src/gs-review-dialog.c:82 +diff --git a/src/gs-repo-row.c b/src/gs-repo-row.c +index 4bdf07b..4775db3 100644 +--- a/src/gs-repo-row.c ++++ b/src/gs-repo-row.c +@@ -189,12 +189,15 @@ get_repo_installed_text (GsApp *repo) + apps_text, addons_text); + } + ++gchar *get_msvsphere_description(const gchar *repo_name); ++ + static void + gs_repo_row_set_repo (GsRepoRow *self, GsApp *repo) + { + GsRepoRowPrivate *priv = gs_repo_row_get_instance_private (self); + GsPlugin *plugin; + g_autofree gchar *comment = NULL; ++ g_autofree gchar *msvdescr = NULL; + const gchar *tmp; + + g_assert (priv->repo == NULL); +@@ -214,14 +217,20 @@ gs_repo_row_set_repo (GsRepoRow *self, GsApp *repo) + + gtk_widget_set_visible (priv->hostname_label, FALSE); + +- tmp = gs_app_get_url (repo, AS_URL_KIND_HOMEPAGE); +- if (tmp != NULL && *tmp != '\0') { +- g_autoptr(SoupURI) uri = NULL; +- +- uri = soup_uri_new (tmp); +- if (uri && soup_uri_get_host (uri) != NULL && *soup_uri_get_host (uri) != '\0') { +- gtk_label_set_label (GTK_LABEL (priv->hostname_label), soup_uri_get_host (uri)); +- gtk_widget_set_visible (priv->hostname_label, TRUE); ++ msvdescr = get_msvsphere_description(gs_app_get_name (repo)); ++ if (msvdescr){ ++ gtk_label_set_label (GTK_LABEL (priv->hostname_label), msvdescr); ++ gtk_widget_set_visible (priv->hostname_label, TRUE); ++ } else { ++ tmp = gs_app_get_url (repo, AS_URL_KIND_HOMEPAGE); ++ if (tmp != NULL && *tmp != '\0') { ++ g_autoptr(SoupURI) uri = NULL; ++ ++ uri = soup_uri_new (tmp); ++ if (uri && soup_uri_get_host (uri) != NULL && *soup_uri_get_host (uri) != '\0') { ++ gtk_label_set_label (GTK_LABEL (priv->hostname_label), soup_uri_get_host (uri)); ++ gtk_widget_set_visible (priv->hostname_label, TRUE); ++ } + } + } + +@@ -242,6 +251,44 @@ gs_repo_row_set_repo (GsRepoRow *self, GsApp *repo) + refresh_ui (self); + } + ++gchar *get_msvsphere_description(const gchar *repo_name){ ++ if (g_strstr_len(repo_name, 9, "MSVSphere") != NULL) { ++ if (g_strstr_len(repo_name, 32, "AppStream")) { ++ /* TRANSLATORS: additional repo description 1 */ ++ return g_strdup(_("AppStream repo")); ++ } ++ if (g_strstr_len(repo_name, 32, "BaseOS") != NULL) { ++ /* TRANSLATORS: additional repo description 2 */ ++ return g_strdup(_("BaseOS repo")); ++ } ++ if (g_strstr_len(repo_name, 32, "CRB") != NULL) { ++ /* TRANSLATORS: additional repo description 3 */ ++ return g_strdup(_("CRB repo")); ++ } ++ if (g_strstr_len(repo_name, 32, "Extras") != NULL) { ++ /* TRANSLATORS: additional repo description 4 */ ++ return g_strdup(_("Extras repo")); ++ } ++ if (g_strstr_len(repo_name, 32, "HighAvailability") != NULL) { ++ /* TRANSLATORS: additional repo description 5 */ ++ return g_strdup(_("HighAvailability repo")); ++ } ++ if (g_strstr_len(repo_name, 32, "NFV") != NULL) { ++ /* TRANSLATORS: additional repo description 6 */ ++ return g_strdup(_("NFV repo")); ++ } ++ if (g_strstr_len(repo_name, 32, "ResilientStorage") != NULL) { ++ /* TRANSLATORS: additional repo description 7 */ ++ return g_strdup(_("ResilientStorage repo")); ++ } ++ if (g_strstr_len(repo_name, 32, "RT") != NULL) { ++ /* TRANSLATORS: additional repo description 8 */ ++ return g_strdup(_("RT repo")); ++ } ++ } ++ return NULL; ++} ++ + GsApp * + gs_repo_row_get_repo (GsRepoRow *self) + { +-- +2.39.3 + diff --git a/SPECS/gnome-software.spec b/SPECS/gnome-software.spec index 4537d3e..3d88ae2 100644 --- a/SPECS/gnome-software.spec +++ b/SPECS/gnome-software.spec @@ -12,7 +12,7 @@ Name: gnome-software Version: 41.5 -Release: 3%{?dist}.inferit +Release: 3%{?dist}.inferit.1 Summary: A software center for GNOME License: GPLv2+ @@ -24,6 +24,7 @@ Patch02: 0006-optional-repos-cannot-be-disabled.patch Patch03: 0007-compulsory-only-for-repos.patch Patch04: 0008-gs-removal-dialog-crrect-property-name.patch Patch05: 0009-hide-some-errors.patch +Patch100: 0001-Added-description-of-standart-repos.patch BuildRequires: appstream-devel >= %{appstream_version} BuildRequires: gcc @@ -204,6 +205,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %{_datadir}/gtk-doc/html/gnome-software %changelog +* Tue Dec 05 2023 Alexey Berezhok - 41.5-3.inferit.1 +- Added description of standart repos + * Tue Nov 14 2023 Arkady L. Shane - 41.5-3.inferit - Set msvsphere-9 as official repo