diff options
author | Robert Tari <robert@tari.in> | 2023-11-11 00:43:42 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2023-11-11 00:43:42 +0100 |
commit | 2f04eecf1cd4cf6ff30a024e568a7bc9223a150d (patch) | |
tree | 047fe98918fbb6165b72fd282d3958c88eaf2d7a | |
parent | 9ec76fed5eb2ea45273dbed35a525385d9758175 (diff) | |
download | ayatana-indicator-display-2f04eecf1cd4cf6ff30a024e568a7bc9223a150d.tar.gz ayatana-indicator-display-2f04eecf1cd4cf6ff30a024e568a7bc9223a150d.tar.bz2 ayatana-indicator-display-2f04eecf1cd4cf6ff30a024e568a7bc9223a150d.zip |
src/service.cpp: Fix string array translation
-rw-r--r-- | src/service.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/service.cpp b/src/service.cpp index 121bbac..ff29b4e 100644 --- a/src/service.cpp +++ b/src/service.cpp @@ -40,15 +40,15 @@ typedef struct { guint nTempLow; guint nTempHigh; - gchar *sName; + const gchar *sName; } TempProfile; TempProfile m_lTempProfiles[] = { - {0, 0, _("Manual")}, - {4500, 6500, _("Adaptive (Colder)")}, - {3627, 4913, _("Adaptive")}, - {3058, 4913, _("Adaptive (Warmer)")}, + {0, 0, N_("Manual")}, + {4500, 6500, N_("Adaptive (Colder)")}, + {3627, 4913, N_("Adaptive")}, + {3058, 4913, N_("Adaptive (Warmer)")}, {0, 0, NULL} }; #endif @@ -625,7 +625,8 @@ private: while (m_lTempProfiles[nProfile].sName != NULL) { gchar *sAction = g_strdup_printf ("indicator.profile::%u", nProfile); - GMenuItem *pItemProfile = g_menu_item_new (m_lTempProfiles[nProfile].sName, sAction); + gchar *sName = gettext (m_lTempProfiles[nProfile].sName); + GMenuItem *pItemProfile = g_menu_item_new (sName, sAction); g_free(sAction); g_menu_append_item (pMenuProfiles, pItemProfile); g_object_unref (pItemProfile); |