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 770403 - Glom translations cannot get locale path on Mac OS X
Glom translations cannot get locale path on Mac OS X
Status: RESOLVED OBSOLETE
Product: glom
Classification: Other
Component: general
1.28.x
Other Mac OS
: Normal normal
: ---
Assigned To: Murray Cumming
Murray Cumming
Depends on:
Blocks:
 
 
Reported: 2016-08-25 16:29 UTC by m.rick.mac
Modified: 2021-07-05 10:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Translation settings unavailable. (92.63 KB, image/png)
2016-09-30 18:59 UTC, m.rick.mac
Details
Locales settings not working well on numbers (6.09 KB, image/png)
2016-09-30 19:00 UTC, m.rick.mac
Details
Language auto-detection in Xubuntu 15.04 (61.67 KB, image/png)
2016-10-02 21:38 UTC, m.rick.mac
Details
entering a number before the formatting is applied (5.35 KB, image/png)
2016-10-02 21:46 UTC, m.rick.mac
Details
The same number with de formatting applied (5.50 KB, image/png)
2016-10-02 21:48 UTC, m.rick.mac
Details

Description m.rick.mac 2016-08-25 16:29:39 UTC
Glom try to get the language settings and locales by Glibc and path /usr/share/i18n/locales for Glibc into Glom to access translations. On Mac OS X, the path is /usr/share/locale

I tried to set the environment variable to export I18NPATH="/usr/share/locale" but glom will still force using /usr/share/i18n/locales for Glibc

DEBUG: User=glom_default_developer_user _is_ in the developer group on the server.
Glib::ustring Glom::IsoCodes::get_locale_name(const Glib::ustring &): Could not open (or read) glibc locales directory: /usr/share/i18n/locales/Error: Error opening directory '/usr/share/i18n/locales/': No such file or directory
void Glom::ComboBox_Locale::set_selected_locale(const Glib::ustring &): locale not found in list: fr_FR, list size=0
Glib::ustring Glom::IsoCodes::get_locale_name(const Glib::ustring &): Could not open (or read) glibc locales directory: /usr/share/i18n/locales/Error: Error opening directory '/usr/share/i18n/locales/': No such file or directory
Glib::ustring Glom::IsoCodes::get_locale_name(const Glib::ustring &): Could not open (or read) glibc locales directory: /usr/share/i18n/locales/Error: Error opening directory '/usr/share/i18n/locales/': No such file or directory
void Glom::ComboBox_Locale::set_selected_locale(const Glib::ustring &): locale not found in list: fr_FR, list size=0
Dialog_IdentifyOriginal::load_from_document
Glib::ustring Glom::IsoCodes::get_locale_name(const Glib::ustring &): Could not open (or read) glibc locales directory: /usr/share/i18n/locales/Error: Error opening directory '/usr/share/i18n/locales/': No such file or directory
void Glom::ComboBox_Locale::set_selected_locale(const Glib::ustring &): locale not found in list: fr_FR, list size=0
Comment 1 Murray Cumming 2016-09-29 09:04:44 UTC
Indeed. /usr/share/i18n/locales was hard coded in the source code, which should never have happened.

Did the test_iso_codes test work for you, during make check? That should have caught this problem. It does need some other locales (German, for instance) to be installed.

This commit should fix it:
https://git.gnome.org/browse/glom/commit/?id=7d880162fd6db1900408de1c0f93ba78caf55c5a
Comment 2 Murray Cumming 2016-09-29 09:27:06 UTC
Actually, I reverted that because that would get a different path: /usr/share/locale.

Does this cause an actual problem in the application? For instance, when choosing "Translations" from the "Developer" menu, do you see a list of languages in the "Target Language" combo box?
Comment 3 Murray Cumming 2016-09-29 09:30:41 UTC
By the way, your /usr/share/locale on MacOS is not what we are looking for. We want the actual locale files for the whole system, not just the translations for an application. For instance, this is what we want on Linux:

$ more /usr/share/i18n/locales/en_US 
escape_char /
comment_char %
% Locale for English locale in the USA
% Contributed by Ulrich Drepper <drepper@redhat.com>, 2000

LC_IDENTIFICATION
title      "English locale for the USA"
source     "Free Software Foundation, Inc."
address    "http:////www.gnu.org//software//libc//"



I do wonder if we really need to check for the installed locales at all.
Comment 4 m.rick.mac 2016-09-30 18:58:18 UTC
Yes it's a problem because the language cannot be recognized and the locales settings are not working well because of this, like the translations for example. The thousands separator is not working and the currency symbol is not set correctly. In French for example, the thousands are separated by a space and the currency symbol is placed after the amount.
Comment 5 m.rick.mac 2016-09-30 18:59:11 UTC
Created attachment 336695 [details]
Translation settings unavailable.
Comment 6 m.rick.mac 2016-09-30 19:00:35 UTC
Created attachment 336696 [details]
Locales settings not working well on numbers

The locale should be French.
- The coma is OK.
- No thousands separators.
- Wrong position for the currency symbol.
Comment 7 m.rick.mac 2016-09-30 20:15:55 UTC
On Mac OS X the locales are managed by softwares in a ~.lproj folder, not by the whole system.
/usr/share/locale on MacOS is the equivalent of the $LANG variable settings that can handle the previous described wrong behavior.

Which value do you need? I will see if there is an equivalent one.
Comment 8 Murray Cumming 2016-10-02 14:51:34 UTC
(In reply to m.rick.mac from comment #5)
> Created attachment 336695 [details]
> Translation settings unavailable.

This message should indeed cause that problem. We need the equivalent of /usr/share/i18n/locales/ .

> Locales settings not working well on numbers

> The locale should be French.
> - The coma is OK.
> - No thousands separators.
> - Wrong position for the currency symbol.

Do you get a different result on Ubuntu Linux? This is really a separate issue.
Comment 9 m.rick.mac 2016-10-02 21:36:56 UTC
Yes it does work on Linux with the same version.
Comment 10 m.rick.mac 2016-10-02 21:38:47 UTC
Created attachment 336775 [details]
Language auto-detection in Xubuntu 15.04
Comment 11 m.rick.mac 2016-10-02 21:45:35 UTC
But the locales settings aren't working better in my best.
Comment 12 m.rick.mac 2016-10-02 21:46:14 UTC
Created attachment 336776 [details]
entering a number before the formatting is applied
Comment 13 m.rick.mac 2016-10-02 21:48:59 UTC
Created attachment 336777 [details]
The same number with de formatting applied

The number format is all wrong:

There should have spaces for thousands separators instead of comas. But the coma is right for decimals. As a result, I entered 3 decimals, we don't know they are decimals, they appear like thousands.
The currency symbol should be at the end.
Comment 14 Murray Cumming 2016-10-03 08:24:29 UTC
(In reply to m.rick.mac from comment #13)
> Created attachment 336777 [details]
> The same number with de formatting applied

Is this on Ubuntu Linux or MacOS? If the numeric formatting seems wrong on all platforms, then that's a different issue. Please file a separate bug about that.

If the translations window is not working, only on MacOS, let's use this bug for that issue.
Comment 15 GNOME Infrastructure Team 2021-07-05 10:53:11 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of  gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/glom/-/issues/

Thank you for your understanding and your help.