From 97be39350ee096d95d97ac486ceb7b6ced392dac Mon Sep 17 00:00:00 2001 From: Felipe Borges Date: Wed, 5 Nov 2025 13:22:29 +0100 Subject: [PATCH] Add subscription manager and additional translation strings These strings are imported from RHEL10. We also adapt the dialog to use the modern strings so that we can reuse their translations. Includes translations for the supported locales: fr, ja, ko, and zh_CN. See also https://issues.redhat.com/browse/GLOBAL-7287 Resolves: RHEL-4111 --- gnome-control-center.spec | 9 +- ...ption-manager-and-extra-translations.patch | 1056505 ++++++++++++++ 2 files changed, 1056513 insertions(+), 1 deletion(-) create mode 100644 subscription-manager-and-extra-translations.patch diff --git a/gnome-control-center.spec b/gnome-control-center.spec index 3441405..214ed72 100644 --- a/gnome-control-center.spec +++ b/gnome-control-center.spec @@ -14,7 +14,7 @@ Name: gnome-control-center Version: 40.0 -Release: 42%{?dist} +Release: 43%{?dist} Summary: Utilities to configure the GNOME desktop License: GPLv2+ and CC-BY-SA @@ -83,6 +83,9 @@ Patch24: po-update-keyboard-zh_CN-translations.patch Patch25: power-handle-unknown-power-profile.patch +# https://issues.redhat.com/browse/RHEL-4111 +Patch26: subscription-manager-and-extra-translations.patch + BuildRequires: chrpath BuildRequires: cups-devel BuildRequires: desktop-file-utils @@ -272,6 +275,10 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gnome-control-center %dir %{_datadir}/gnome/wm-properties %changelog +* Wed Nov 05 2025 Felipe Borges - 40.0.43 +- Add translations to subscription manager interface + Resolves: RHEL-4111 + * Thu Aug 14 2025 Felipe Borges - 40.0-42 - Fix crash with non-supported tuned-ppd profiles diff --git a/subscription-manager-and-extra-translations.patch b/subscription-manager-and-extra-translations.patch new file mode 100644 index 0000000..20e0057 --- /dev/null +++ b/subscription-manager-and-extra-translations.patch @@ -0,0 +1,1056505 @@ +From 0fcdedfb27a939b4829817eec81c163b0c673388 Mon Sep 17 00:00:00 2001 +From: Felipe Borges +Date: Wed, 5 Nov 2025 12:11:50 +0100 +Subject: [PATCH 1/2] subman: Use newer strings + +The ones we have translations for. +--- + panels/info-overview/cc-info-overview-panel.c | 2 +- + .../info-overview/cc-info-overview-panel.ui | 2 +- + .../cc-subscription-details-dialog.c | 23 +--- + .../cc-subscription-details-dialog.ui | 102 +----------------- + .../cc-subscription-register-dialog.c | 2 +- + .../cc-subscription-register-dialog.ui | 24 ++--- + 6 files changed, 21 insertions(+), 134 deletions(-) + +diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c +index 8c5f92e64..1d676f74f 100644 +--- a/panels/info-overview/cc-info-overview-panel.c ++++ b/panels/info-overview/cc-info-overview-panel.c +@@ -846,7 +846,7 @@ reload_subscription_status (CcInfoOverviewPanel *self) + else + cc_list_row_set_secondary_label (self->software_updates_row, _("System is registered but is unable to receive all software updates.")); + +- cc_list_row_set_secondary_label (self->subscription_row, _("Registered System")); ++ cc_list_row_set_secondary_label (self->subscription_row, _("Active")); + g_object_set_data (G_OBJECT (self->subscription_row), "is-registered", GINT_TO_POINTER (TRUE)); + } + else +diff --git a/panels/info-overview/cc-info-overview-panel.ui b/panels/info-overview/cc-info-overview-panel.ui +index 089a2d865..b35418477 100644 +--- a/panels/info-overview/cc-info-overview-panel.ui ++++ b/panels/info-overview/cc-info-overview-panel.ui +@@ -183,7 +183,7 @@ + + + True +- Subscription ++ Registration + System Not Registered + go-next-symbolic + +diff --git a/panels/info-overview/cc-subscription-details-dialog.c b/panels/info-overview/cc-subscription-details-dialog.c +index 69d8eed7a..7ebd6db68 100644 +--- a/panels/info-overview/cc-subscription-details-dialog.c ++++ b/panels/info-overview/cc-subscription-details-dialog.c +@@ -55,7 +55,6 @@ struct _CcSubscriptionDetailsDialog + GtkRevealer *notification_revealer; + GtkLabel *error_label; + GtkStack *stack; +- GtkStack *status_stack; + GtkBox *products_box1; + GtkBox *products_box2; + GtkBox *products_box3; +@@ -119,14 +118,6 @@ static GtkWidget * + add_product (CcSubscriptionDetailsDialog *self, ProductData *product, GsdSubmanSubscriptionStatus status) + { + GtkGrid *product_grid; +- const gchar *status_text; +- +- if (g_strcmp0 (product->status, "subscribed") == 0) +- status_text = _("Subscribed"); +- else if (status == GSD_SUBMAN_SUBSCRIPTION_STATUS_DISABLED) +- status_text = _("No Specific Subscription"); +- else +- status_text = _("Not Subscribed"); + + product_grid = GTK_GRID (gtk_grid_new ()); + gtk_grid_set_column_spacing (product_grid, 12); +@@ -135,11 +126,10 @@ add_product (CcSubscriptionDetailsDialog *self, ProductData *product, GsdSubmanS + gtk_widget_set_margin_bottom (GTK_WIDGET (product_grid), 12); + gtk_widget_show (GTK_WIDGET (product_grid)); + +- add_product_row (product_grid, _("Product Name"), product->product_name, 0); ++ add_product_row (product_grid, _("Name"), product->product_name, 0); + add_product_row (product_grid, _("Product ID"), product->product_id, 1); + add_product_row (product_grid, _("Version"), product->version, 2); + add_product_row (product_grid, _("Arch"), product->arch, 3); +- add_product_row (product_grid, _("Status"), status_text, 4); + + if (product->starts[0] != '\0' && product->ends[0] != '\0') + { +@@ -212,7 +202,7 @@ dialog_reload (CcSubscriptionDetailsDialog *self) + case DIALOG_STATE_UNREGISTER: + gtk_header_bar_set_show_close_button (header, FALSE); + +- gtk_window_set_title (GTK_WINDOW (self), _("Unregister System")); ++ gtk_window_set_title (GTK_WINDOW (self), _("Remove Registration")); + gtk_widget_set_sensitive (GTK_WIDGET (self->header_unregister_button), TRUE); + + gtk_widget_show (GTK_WIDGET (self->back_button)); +@@ -226,7 +216,7 @@ dialog_reload (CcSubscriptionDetailsDialog *self) + case DIALOG_STATE_UNREGISTERING: + gtk_header_bar_set_show_close_button (header, FALSE); + +- gtk_window_set_title (GTK_WINDOW (self), _("Unregistering System…")); ++ gtk_window_set_title (GTK_WINDOW (self), _("Remove Registration…")); + gtk_widget_set_sensitive (GTK_WIDGET (self->header_unregister_button), FALSE); + + gtk_widget_show (GTK_WIDGET (self->back_button)); +@@ -258,7 +248,6 @@ dialog_reload (CcSubscriptionDetailsDialog *self) + gtk_container_add (GTK_CONTAINER (self->products_box1), w1); + gtk_container_add (GTK_CONTAINER (self->products_box2), w2); + gtk_container_add (GTK_CONTAINER (self->products_box3), w3); +- gtk_stack_set_visible_child_name (self->status_stack, "no-installed-products"); + + gtk_widget_hide (GTK_WIDGET (self->subscribe_button)); + gtk_widget_hide (GTK_WIDGET (self->separator)); +@@ -282,24 +271,20 @@ dialog_reload (CcSubscriptionDetailsDialog *self) + switch (status) + { + case GSD_SUBMAN_SUBSCRIPTION_STATUS_VALID: +- gtk_stack_set_visible_child_name (self->status_stack, "fully-subscribed"); + gtk_widget_hide (GTK_WIDGET (self->subscribe_button)); + break; + + case GSD_SUBMAN_SUBSCRIPTION_STATUS_PARTIALLY_VALID: +- gtk_stack_set_visible_child_name (self->status_stack, "partly-subscribed"); + gtk_widget_show (GTK_WIDGET (self->subscribe_button)); + break; + + case GSD_SUBMAN_SUBSCRIPTION_STATUS_DISABLED: + case GSD_SUBMAN_SUBSCRIPTION_STATUS_NOT_READ: +- gtk_stack_set_visible_child_name (self->status_stack, "subscription-not-needed"); + gtk_widget_hide (GTK_WIDGET (self->subscribe_button)); + break; + + case GSD_SUBMAN_SUBSCRIPTION_STATUS_UNKNOWN: + default: +- gtk_stack_set_visible_child_name (self->status_stack, "not-subscribed"); + gtk_widget_show (GTK_WIDGET (self->subscribe_button)); + break; + } +@@ -320,7 +305,6 @@ parse_product_variant (GVariant *product_variant) + g_variant_dict_lookup (&dict, "product-id", "s", &product->product_id); + g_variant_dict_lookup (&dict, "version", "s", &product->version); + g_variant_dict_lookup (&dict, "arch", "s", &product->arch); +- g_variant_dict_lookup (&dict, "status", "s", &product->status); + g_variant_dict_lookup (&dict, "starts", "s", &product->starts); + g_variant_dict_lookup (&dict, "ends", "s", &product->ends); + +@@ -534,7 +518,6 @@ cc_subscription_details_dialog_class_init (CcSubscriptionDetailsDialogClass *kla + gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, notification_revealer); + gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, error_label); + gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, stack); +- gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, status_stack); + gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, products_box1); + gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, products_box2); + gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, products_box3); +diff --git a/panels/info-overview/cc-subscription-details-dialog.ui b/panels/info-overview/cc-subscription-details-dialog.ui +index 6cdfc1220..bf2f085f8 100644 +--- a/panels/info-overview/cc-subscription-details-dialog.ui ++++ b/panels/info-overview/cc-subscription-details-dialog.ui +@@ -39,7 +39,7 @@ + slide-left-right + + +- _Unregister ++ Remove + True + True + True +@@ -186,102 +186,6 @@ + 32 + 12 + 12 +- +- +- True +- False +- +- +- True +- False +- This system is subscribed to receive software updates. +- 45 +- 45 +- 0 +- start +- True +- +- +- +- fully-subscribed +- +- +- +- +- True +- False +- This system lacks subscriptions to receive updates for some installed software. +- 45 +- 45 +- 0 +- start +- True +- +- +- +- partly-subscribed +- +- +- +- +- True +- False +- This system lacks subscriptions to receive software updates. +- 45 +- 45 +- 0 +- start +- True +- +- +- +- not-subscribed +- +- +- +- +- True +- False +- This system is registered to receive software updates. +- 45 +- 45 +- 0 +- start +- True +- +- +- +- subscription-not-needed +- +- +- +- +- True +- False +- This system has no supported software installed. +- 45 +- 45 +- 0 +- start +- True +- +- +- +- no-installed-products +- +- +- +- + + + True +@@ -300,7 +204,7 @@ + end + + +- _Unregister… ++ Remove Registration… + True + True + True +@@ -388,7 +292,7 @@ + + True + False +- Warning: unregistering this system will result in it no longer receiving software updates. ++ Subscriptions will be removed and the device will no longer receive software updates + 45 + 45 + 0 +diff --git a/panels/info-overview/cc-subscription-register-dialog.c b/panels/info-overview/cc-subscription-register-dialog.c +index 6867a976b..ff5bd98da 100644 +--- a/panels/info-overview/cc-subscription-register-dialog.c ++++ b/panels/info-overview/cc-subscription-register-dialog.c +@@ -85,7 +85,7 @@ dialog_reload (CcSubscriptionRegisterDialog *self) + break; + + case DIALOG_STATE_REGISTERING: +- gtk_window_set_title (GTK_WINDOW (self), _("Registering System…")); ++ gtk_window_set_title (GTK_WINDOW (self), _("Registering")); + gtk_widget_set_sensitive (GTK_WIDGET (self->register_button), FALSE); + + sensitive = FALSE; +diff --git a/panels/info-overview/cc-subscription-register-dialog.ui b/panels/info-overview/cc-subscription-register-dialog.ui +index 21e317b41..0636e2cea 100644 +--- a/panels/info-overview/cc-subscription-register-dialog.ui ++++ b/panels/info-overview/cc-subscription-register-dialog.ui +@@ -34,7 +34,7 @@ + + + +- _Register ++ Register + True + True + True +@@ -156,7 +156,7 @@ + + True + False +- Register this system with Red Hat to receive software updates. ++ Register to receive software updates, content, and services from Red Hat. No cost registrations are available as part of the Red Hat Developer program. + 45 + 45 + 0 +@@ -209,7 +209,7 @@ + + + +- Custom Address ++ Registration Server + True + True + False +@@ -267,7 +267,7 @@ + + True + False +- Registration Type ++ Registration Method + 12 + start + +@@ -286,7 +286,7 @@ + vertical + + +- Red Hat Account ++ Username and password + True + True + False +@@ -299,7 +299,7 @@ + + + +- Activation Keys ++ Activation Key(s) + True + True + False +@@ -352,7 +352,7 @@ + + True + 1 +- _Login ++ Username + True + login_entry +