Koka / gettext-rs

GNU Gettext FFI binding for Rust
51 stars 25 forks source link

Fix the locale codes #109

Closed ajtribick closed 12 months ago

ajtribick commented 12 months ago

Resolves #107

Since the values of the various LC_ constants vary from system to system, get them from libc instead of hardcoding particular values.

Furthermore, since some systems (e.g. Windows) do not have LC_MESSAGES, use the libintl.h fallback value of 1729 on these systems and treat it as LC_ALL when passed to setlocale().

Also fixes a couple of unused import/macro warnings in the tests, plus allows them to build on Windows since the symbol