From bd1538ad305dabcdafb0d9015a6a768823f31609 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABl=20Bonithon?= <gael@xfce.org>
Date: Mon, 10 Feb 2025 19:31:42 +0100
Subject: [PATCH] xfce-rc: Fix C locale handling

As gettext does: if the C locale is encountered in LANGUAGE, return the
untranslated value.

Fixes: #29
---
 libxfce4util/xfce-rc-simple.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libxfce4util/xfce-rc-simple.c b/libxfce4util/xfce-rc-simple.c
index fc57f57..54e5ca3 100644
--- a/libxfce4util/xfce-rc-simple.c
+++ b/libxfce4util/xfce-rc-simple.c
@@ -1037,6 +1037,10 @@ _xfce_rc_simple_read_entry (const XfceRc *rc,
       for (gchar **p = (rc->languages != NULL) ? rc->languages : locale_languages;
            *p != NULL; p++)
         {
+          /* return untranslated value if we encounter the C locale */
+          if (g_strcmp0 (*p, "C") == 0)
+            break;
+
           best_match = XFCE_LOCALE_NO_MATCH;
           best_value = NULL;
 
-- 
GitLab