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 774464 - Use ISO_CODES_PREFIX when calling bindtextdomain for ISO_*_DOMAIN
Use ISO_CODES_PREFIX when calling bindtextdomain for ISO_*_DOMAIN
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: I18N
git master
Other FreeBSD
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-15 10:47 UTC by Ting-Wei Lan
Modified: 2016-11-15 13:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use ISO_CODES_PREFIX to find localedir of iso-codes (1.30 KB, patch)
2016-11-15 10:55 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-11-15 10:47:09 UTC
In lib/ephy-langs.c, function ephy_langs_bind_iso_domains:

    bindtextdomain (ISO_639_DOMAIN, LOCALEDIR);
    bind_textdomain_codeset (ISO_639_DOMAIN, "UTF-8");

    bindtextdomain (ISO_3166_DOMAIN, LOCALEDIR);
    bind_textdomain_codeset (ISO_3166_DOMAIN, "UTF-8");

This will not work if iso-codes and epiphany are installed in different prefixes.
Comment 1 Ting-Wei Lan 2016-11-15 10:55:19 UTC
Created attachment 339910 [details] [review]
Use ISO_CODES_PREFIX to find localedir of iso-codes

This commit makes it possible to find translation data of iso-codes when
epiphany and iso-codes are installed in different prefixes, which is
common in JHBuild environments.

We hardcode share/locale here because iso-codes.pc doesn't have the path
of localedir written in it and most users and distributions don't modify
the path of localedir.
Comment 2 Michael Catanzaro 2016-11-15 13:38:50 UTC
Review of attachment 339910 [details] [review]:

Shame
Comment 3 Ting-Wei Lan 2016-11-15 13:58:31 UTC
Attachment 339910 [details] pushed as c1db7fb - Use ISO_CODES_PREFIX to find localedir of iso-codes