wifi: Set hotspot dialog title in C source

Setting markup within UI file might be bad as some translators
might break those markups.

Setting it in C source allows to exclude the markups from being
translated, and thus to not confuse translators.

642be83798 (note_608677)
This commit is contained in:
Mohammed Sadiq 2019-09-23 13:31:38 +05:30
parent 48a45d51fa
commit 82f13e848a
2 changed files with 5 additions and 2 deletions

View file

@ -447,7 +447,12 @@ cc_wifi_hotspot_dialog_class_init (CcWifiHotspotDialogClass *klass)
static void
cc_wifi_hotspot_dialog_init (CcWifiHotspotDialog *self)
{
g_autofree gchar *title = NULL;
gtk_widget_init_template (GTK_WIDGET (self));
title = g_strdup_printf ("<big><b>%s</b></big>", _("Turn On Wi-Fi Hotspot?"));
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (self), title);
}
CcWifiHotspotDialog *

View file

@ -3,8 +3,6 @@
<template class="CcWifiHotspotDialog" parent="GtkMessageDialog">
<property name="modal">1</property>
<property name="destroy-with-parent">1</property>
<property name="text" translatable="yes" comments="Translate the text only">&lt;big&gt;&lt;b&gt;Turn On Wi-Fi Hotspot?&lt;/b&gt;&lt;/big&gt;</property>
<property name="use-markup">1</property>
<property name="message-type">other</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete"/>