View Issue Details

IDProjectCategoryView StatusLast Update
0001341libextractorInternationalization (gettext)public2008-07-13 19:40
Reporterholin Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Summary0001341: LE locale paths are configured wrong on GNU/Linux and OS X (at least)
Description./configure --prefix=/tmp/FOO

From config.h:

#define LOCALEDIR "${prefix}/share/locale"

#define ISOLOCALEDIR "27398ISOPFX/share/locale"

These are definitely wrong.

When installed to a standard location (/usr), 'extract' command shows output using the correct locale, but that's probably only because of a gettext fallback.
TagsNo tags attached.

Activities

holin

2008-05-22 01:21

reporter   ~0003422

Using datarootdir instead of datadir would appear to help:

--- configure.ac (revision 6863)
+++ configure.ac (working copy)
@@ -119,7 +120,7 @@
 # passed through the command line ("-DLOCALEDIR=..."). This would
 # lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
 # not contain the actual installation.
-AC_DEFINE_DIR([LOCALEDIR], [datadir/locale], [gettext catalogs])
+AC_DEFINE_DIR([LOCALEDIR], [datarootdir/locale], [gettext catalogs])

But I can't say if there are other consequences from that.

Christian Grothoff

2008-05-22 23:04

manager   ~0003423

There should be no other problems. Will fix as suggested.

Christian Grothoff

2008-05-22 23:08

manager   ~0003424

The suggested change fixes LOCALEDIR, but not ISOLOCALEDIR. Any suggestions for how to fix that one?

The part of the fix that you suggested is in SVN 6868.

holin

2008-05-22 23:19

reporter   ~0003426

Maybe just remove the $-sign for starters? Can't check right now. AC_DEFINE_DIR is weird. However, if the path is really used somewhere, shouldn't there be a HAVE_ISO_CODES, instead. The iso-codes package seemed to come from debian, and my gentoo installation, not to speak of OS X, doesn't have it by default.

Christian Grothoff

2008-05-23 22:53

manager   ~0003427

What "$"-sign? And as far as I know, ISOLOCALEDIR is used in the code anywhere.

holin

2008-05-23 23:02

reporter   ~0003428

In front of ISOPFX in AC_DEFINE_DIR([ISOLOCALEDIR], [$ISOPFX/share/locale], [iso-639 catalog]). I don't fully understand what AC_DEFINE_DIR does, but it looks like it invents a $ there by itself. Also, the datarootdir vs datadir issue seems to be fixed by a newer version of AC_DEFINE_DIR: http://autoconf-archive.cryp.to/ac_define_dir.html (look in the source code comments.)


grep says:
src/main/extractor.c: BINDTEXTDOMAIN("iso-639", ISOLOCALEDIR); /* used by wordextractor */

and

src/plugins/ole2/ole2extractor.c:#define __(a) dgettext("iso-639", a)

holin

2008-05-24 01:01

reporter   ~0003429

Fixed ISOLOCALEDIR in rev 6874.

holin

2008-05-24 01:16

reporter   ~0003430

Resolved on GNU/Linux and OS X now AFAICS.

Issue History

Date Modified Username Field Change
2008-05-22 00:33 holin New Issue
2008-05-22 01:21 holin Note Added: 0003422
2008-05-22 23:04 Christian Grothoff Note Added: 0003423
2008-05-22 23:04 Christian Grothoff Status new => assigned
2008-05-22 23:04 Christian Grothoff Assigned To => Christian Grothoff
2008-05-22 23:08 Christian Grothoff Note Added: 0003424
2008-05-22 23:19 holin Note Added: 0003426
2008-05-23 22:53 Christian Grothoff Note Added: 0003427
2008-05-23 23:02 holin Note Added: 0003428
2008-05-24 01:01 holin Note Added: 0003429
2008-05-24 01:16 holin Note Added: 0003430
2008-05-24 17:47 Christian Grothoff Status assigned => resolved
2008-05-24 17:47 Christian Grothoff Resolution open => fixed
2008-07-13 19:40 Christian Grothoff Status resolved => closed