From 15ba98b794bfc976cb528e1faa4b98cb32e1df59 Mon Sep 17 00:00:00 2001 From: Qijia Liu Date: Mon, 27 Jan 2025 00:41:06 -0500 Subject: [PATCH 1/2] define LC_MESSAGES when missing --- src/lib/fcitx-utils/i18nstring.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/fcitx-utils/i18nstring.cpp b/src/lib/fcitx-utils/i18nstring.cpp index da9dfdd60..bbdcf89a2 100644 --- a/src/lib/fcitx-utils/i18nstring.cpp +++ b/src/lib/fcitx-utils/i18nstring.cpp @@ -12,6 +12,10 @@ #include "charutils.h" #include "misc.h" +#ifndef LC_MESSAGES +#define LC_MESSAGES 0 +#endif + namespace fcitx { const std::string &I18NString::match(const std::string &locale_) const { std::string locale = locale_; From ae8c422f986016119997acae2630fb605dd69d96 Mon Sep 17 00:00:00 2001 From: Qijia Liu Date: Mon, 27 Jan 2025 01:09:23 -0500 Subject: [PATCH 2/2] redefine as LC_ALL --- src/lib/fcitx-utils/i18nstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/fcitx-utils/i18nstring.cpp b/src/lib/fcitx-utils/i18nstring.cpp index bbdcf89a2..3d78a18b4 100644 --- a/src/lib/fcitx-utils/i18nstring.cpp +++ b/src/lib/fcitx-utils/i18nstring.cpp @@ -13,7 +13,7 @@ #include "misc.h" #ifndef LC_MESSAGES -#define LC_MESSAGES 0 +#define LC_MESSAGES LC_ALL #endif namespace fcitx {