Warning, /graphics/krita/3rdparty/ext_frameworks/0001-ki18n-fix-loading-catalogs-with-patched-gettext.patch is written in an unsupported language. File is not indexed.
0001 From e23fa45015f7df6ed2e2f830dfb36aaffee2432a Mon Sep 17 00:00:00 2001
0002 From: Alvin Wong <alvin@alvinhc.com>
0003 Date: Tue, 15 Jun 2021 16:43:02 +0000
0004 Subject: [PATCH 1/3] ki18n: fix loading catalogs with patched gettext
0005
0006 ---
0007 src/i18n/kcatalog.cpp | 7 +++++++
0008 1 file changed, 7 insertions(+)
0009
0010 diff --git a/src/i18n/kcatalog.cpp b/src/i18n/kcatalog.cpp
0011 index 2bd9432..6bd728b 100644
0012 --- a/src/i18n/kcatalog.cpp
0013 +++ b/src/i18n/kcatalog.cpp
0014 @@ -143,8 +143,15 @@ KCatalog::KCatalog(const QByteArray &domain, const QString &language_)
0015 : d(new KCatalogPrivate)
0016 {
0017 d->domain = domain;
0018 +#if defined(_WIN32) && defined(__WIN32_USE_UTF8)
0019 + // Krita uses Microsoft's patched version of gettext to support UTF-8 paths.
0020 + // Convert the paths to UTF-8 prior to sending.
0021 + d->language = language_.toUtf8();
0022 + d->localeDir = catalogLocaleDir(domain, language_).toUtf8();
0023 +#else
0024 d->language = QFile::encodeName(language_);
0025 d->localeDir = QFile::encodeName(catalogLocaleDir(domain, language_));
0026 +#endif
0027
0028 if (!d->localeDir.isEmpty()) {
0029 // Always get translations in UTF-8, regardless of user's environment.
0030 --
0031 2.37.1.windows.1
0032