On Tue, Apr 25, 2006 at 02:30:30PM +0000, Angus Leeming wrote:

> Enrico Forestieri <[EMAIL PROTECTED]> writes:
> > I may well be wrong, though, and you may have already provided
> > a libintl_set_relocation_prefix() function in your build.
> 
> Nope. I've hardly ever looked in intl and, in general, LyX should also work
> --without-included-gettext.
> 
> It seems that my list of tasks is increasing :-( I'd be grateful is someone 
> else
> took on this particular one.

Angus, can you try the attached patch? It works for me.
In any case, moving around the whole LyX dir I can get localized menus.

-- 
Enrico
--- src/support/package.C.in.orig       2006-04-17 07:03:06.000000000 +0200
+++ src/support/package.C.in    2006-04-25 21:08:44.000000000 +0200
@@ -171,6 +171,21 @@ string const top_srcdir()
 
 string const hardcoded_localedir()
 {
+#ifdef _WIN32
+       char buf[PATH_MAX];
+       int length = GetModuleFileName(NULL, buf, sizeof (buf));
+       if (length >= 0 && os::is_absolute_path(buf)) {
+               char *slash = strrchr(buf, '\\');
+               if (slash) {
+                       *slash = '\0';
+                       if ((slash = strrchr(buf, '\\'))) {
+                               *(slash + 1) = '\0';
+                               string const localedir = string(buf) + 
"Resources/locale";
+                               return subst(localedir, '\\', '/');
+                       }
+               }
+       }
+#endif
        return string("%LOCALEDIR%");
 }
 

Reply via email to