GNOME Bugzilla – Bug 753072
Gettext module should bind setlocale()
Last modified: 2015-09-22 18:43:06 UTC
Sometimes Gettext-using programs need to call setlocale(). This patch adds a binding in the Gettext module as Gettext.setlocale(), and adds a Gettext.LocaleCategory object to bind the LC_... constants that get passed as the first argument to setlocale().
Created attachment 308480 [details] [review] gettext: Add a binding for setlocale() This adds a Gettext.setlocale() binding for the setlocale() function, which is sometimes needed in programs that use Gettext. Also adds a Gettext.LocaleCategory enum which contains all the LC_... values from locale.h, for use as the first parameter of this function.
Review of attachment 308480 [details] [review]: Looks good.
Attachment 308480 [details] pushed as c371c5a - gettext: Add a binding for setlocale()
Attachment 308480 [details] causes compilation error on non-glibc systems because LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME, LC_PAPER, LC_TELEPHONE are glibc extensions.
Created attachment 308610 [details] [review] gettext: Don't use non-standard LC_* macros on non-glibc systems LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME, LC_PAPER, LC_TELEPHONE are glibc extensions. We cannot expect them to exist on every systems.
Review of attachment 308610 [details] [review]: Thank you for fixing this. This looks correct to me, though I'm not a GJS reviewer.
Created attachment 311899 [details] [review] gettext: Don't use non-standard LC_* macros LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_NAME, LC_PAPER, LC_TELEPHONE are glibc extensions. We cannot expect them to exist on every system.
Attachment 311899 [details] pushed as 5b92e7e - gettext: Don't use non-standard LC_* macros