diff options
author | Felipe Borges <felipeborges@gnome.org> | 2023-05-03 12:29:09 +0200 |
---|---|---|
committer | Felipe Borges <felipeborges@gnome.org> | 2023-05-04 10:06:26 +0000 |
commit | 6179d585a658d5bb090da8396d1829f0720c7cf5 (patch) | |
tree | 17f61913426ddf60ca9956009f12fa2b13209562 | |
parent | 2d310918fa5e2e42dff1ee60d0ece5d4b7f6b23d (diff) | |
download | gnome-control-center-6179d585a658d5bb090da8396d1829f0720c7cf5.tar.gz |
color: Make it easier to translate panel description string
This helps translators understand what are the placeholders in
the visible string.
+#. Translators: This will be presented as the text of a link to the documentation
+#. translators: Text used in link to privacy policy
+#: panels/color/cc-color-panel.c:2021
+#: panels/diagnostics/cc-diagnostics-panel.c:137
+msgid "Learn more"
+#. Translators: %s is a link to the documentation with the label "Learn more"
+#: panels/color/cc-color-panel.c:2023
+msgid "Each device needs an up to date color profile to be color managed. %s"
-rw-r--r-- | panels/color/cc-color-panel.c | 10 | ||||
-rw-r--r-- | panels/color/cc-color-panel.ui | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/panels/color/cc-color-panel.c b/panels/color/cc-color-panel.c index 002b21cb7..e573ad1a4 100644 --- a/panels/color/cc-color-panel.c +++ b/panels/color/cc-color-panel.c @@ -64,6 +64,7 @@ struct _CcColorPanel GtkTreeModel *liststore_assign; GtkTreeModel *liststore_calib_kind; GtkTreeModel *liststore_calib_sensor; + AdwPreferencesGroup *pref_group_devices; GtkWidget *toolbar_devices; GtkWidget *toolbutton_device_calibrate; GtkWidget *toolbutton_device_default; @@ -1923,6 +1924,7 @@ cc_color_panel_class_init (CcColorPanelClass *klass) gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_assign); gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_calib_kind); gtk_widget_class_bind_template_child (widget_class, CcColorPanel, liststore_calib_sensor); + gtk_widget_class_bind_template_child (widget_class, CcColorPanel, pref_group_devices); gtk_widget_class_bind_template_child (widget_class, CcColorPanel, toolbar_devices); gtk_widget_class_bind_template_child (widget_class, CcColorPanel, toolbutton_device_calibrate); gtk_widget_class_bind_template_child (widget_class, CcColorPanel, toolbutton_device_default); @@ -1998,6 +2000,8 @@ cc_color_panel_init (CcColorPanel *prefs) GtkTreeModel *model_filter; GtkTreeSelection *selection; GtkTreeViewColumn *column; + g_autofree gchar *learn_more_link = NULL; + g_autofree gchar *panel_description = NULL; g_resources_register (cc_color_get_resource ()); @@ -2013,6 +2017,12 @@ cc_color_panel_init (CcColorPanel *prefs) prefs->settings = g_settings_new (GCM_SETTINGS_SCHEMA); prefs->settings_colord = g_settings_new (COLORD_SETTINGS_SCHEMA); + /* Translators: This will be presented as the text of a link to the documentation */ + learn_more_link = g_strdup_printf ("<a href='help:gnome-help/color-whyimportant'>%s</a>", _("Learn more")); + /* Translators: %s is a link to the documentation with the label "Learn more" */ + panel_description = g_strdup_printf (_("Each device needs an up to date color profile to be color managed. %s"), learn_more_link); + adw_preferences_group_set_description (prefs->pref_group_devices, panel_description); + /* assign buttons */ g_signal_connect_object (prefs->toolbutton_profile_add, "clicked", G_CALLBACK (gcm_prefs_profile_add_cb), prefs, G_CONNECT_SWAPPED); diff --git a/panels/color/cc-color-panel.ui b/panels/color/cc-color-panel.ui index bd3b2a110..b7cecdd2a 100644 --- a/panels/color/cc-color-panel.ui +++ b/panels/color/cc-color-panel.ui @@ -418,9 +418,7 @@ <child> <object class="GtkBox" id="hbox3"> <child> - <object class="AdwPreferencesGroup"> - <property name="description" translatable="yes">Each device needs an up to date color profile to be color managed. <a href='help:gnome-help/color-whyimportant'>Learn more</a></property> - </object> + <object class="AdwPreferencesGroup" id="pref_group_devices"/> </child> </object> </child> |