After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753072 - Gettext module should bind setlocale()
Gettext module should bind setlocale()
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2015-07-30 18:27 UTC by Philip Chimento
Modified: 2015-09-22 18:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gettext: Add a binding for setlocale() (6.47 KB, patch)
2015-07-30 18:27 UTC, Philip Chimento
committed Details | Review
gettext: Don't use non-standard LC_* macros on non-glibc systems (3.18 KB, patch)
2015-08-01 15:29 UTC, Ting-Wei Lan
none Details | Review
gettext: Don't use non-standard LC_* macros (2.81 KB, patch)
2015-09-22 18:40 UTC, Ting-Wei Lan
committed Details | Review

Description Philip Chimento 2015-07-30 18:27:09 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().
Comment 1 Philip Chimento 2015-07-30 18:27:14 UTC
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.
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-07-30 19:21:23 UTC
Review of attachment 308480 [details] [review]:

Looks good.
Comment 3 Philip Chimento 2015-07-31 02:53:09 UTC
Attachment 308480 [details] pushed as c371c5a - gettext: Add a binding for setlocale()
Comment 4 Ting-Wei Lan 2015-08-01 15:28:11 UTC
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.
Comment 5 Ting-Wei Lan 2015-08-01 15:29:10 UTC
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.
Comment 6 Philip Chimento 2015-08-01 16:20:22 UTC
Review of attachment 308610 [details] [review]:

Thank you for fixing this. This looks correct to me, though I'm not a GJS reviewer.
Comment 7 Ting-Wei Lan 2015-09-22 18:40:54 UTC
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.
Comment 8 Jasper St. Pierre (not reading bugmail) 2015-09-22 18:43:04 UTC
Attachment 311899 [details] pushed as 5b92e7e - gettext: Don't use non-standard LC_* macros