summaryrefslogtreecommitdiff
path: root/portato/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/windows')
-rw-r--r--portato/gui/windows/gettext.pyx18
1 files changed, 18 insertions, 0 deletions
diff --git a/portato/gui/windows/gettext.pyx b/portato/gui/windows/gettext.pyx
new file mode 100644
index 0000000..c8174e8
--- /dev/null
+++ b/portato/gui/windows/gettext.pyx
@@ -0,0 +1,18 @@
+cdef extern from "langinfo.h":
+ char* nl_langinfo (int item)
+ cdef enum:
+ CODESET
+
+cdef extern from "libintl.h":
+ char * textdomain (char* domain)
+ char * bindtextdomain (char* domain, char* dir)
+ char * bind_textdomain_codeset (char* domain, char* codeset)
+
+def set_gtk_gettext (char* domain, char* dir):
+ textdomain(domain)
+ bindtextdomain(domain, dir)
+
+ old_charset = nl_langinfo(CODESET)
+ bind_textdomain_codeset(domain, "UTF-8")
+
+ return old_charset
ref='/feed2imap-go.git/commit/pkg/config/yaml_test.go?id=12f131ca8552cde283353672a6b8aa67b7defe20&follow=1'>Fix/improve testsRené 'Necoro' Neumann1-59/+104 2023-04-22Improve error handlingRené 'Necoro' Neumann1-1/+11 2023-04-21Fix workflow: '1.20' needs to be quotedRené 'Necoro' Neumann2-2/+2