[lokisetup] localization?
Ludwig Nussel
ludwig.nussel at suse.de
Tue May 23 04:14:15 EDT 2006
On Tuesday 23 May 2006 03:21, Ryan C. Gordon wrote:
> So I'm trying to get localization rolling on loki_setup, but I can't
> find any magic way to get it to use, say, French.
>
> Here's what my Ubuntu box is reporting for installed locales:
>
> $ locale -a |grep fr
> fr_BE.utf8
> fr_CA.utf8
> fr_CH.utf8
> fr_FR.utf8
> fr_LU.utf8
>
> No matter what I set LANG to, I get English text. I get complaints if I
> set LANG to just "fr":
>
> (setup.gtk2:9860): Gtk-WARNING **: Locale not supported by C library.
> Using the fallback 'C' locale.
>
> (setup.gtk2:9860): Gdk-WARNING **: locale not supported by C library
>
> These go away if I do the full "fr_FR.UTF-8" format, but still English.
>
> Is there something I'm doing that's blatantly wrong, or did this break
> in newer Linux distros or glibc versions?
Hmm, now that you mention it the xqf and ioquake3 installers are
indeed not German here. I actually never noticed :-) The German
translation is a bit strange anyways.
Try this (untested):
Index: install.c
===================================================================
RCS file: /cvs/cvsroot/loki_setup/install.c,v
retrieving revision 1.176
diff -u -r1.176 install.c
--- install.c 18 May 2006 19:49:46 -0000 1.176
+++ install.c 23 May 2006 08:11:45 -0000
@@ -2388,7 +2388,7 @@
}
snprintf(buf, sizeof(buf), "setup.data/bin/%s/%s/uninstall", detect_os(), detect_arch());
- loki_upgrade_uninstall(product, buf, "setup.data/" LOCALEDIR);
+ loki_upgrade_uninstall(product, buf, LOCALEDIR);
/* We must call the following in all cases - component installs even, as we have to save the changes */
loki_closeproduct(product);
/* product might have pointed to info->product. Reopen it so
Index: main.c
===================================================================
RCS file: /cvs/cvsroot/loki_setup/main.c,v
retrieving revision 1.87
diff -u -r1.87 main.c
--- main.c 18 May 2006 12:25:06 -0000 1.87
+++ main.c 23 May 2006 08:11:45 -0000
@@ -164,7 +164,7 @@
static void init_locale()
{
- char locale[PATH_MAX] = "setup.data/" LOCALEDIR;
+ char locale[PATH_MAX] = LOCALEDIR;
setlocale (LC_ALL, "");
Index: uninstall.c
===================================================================
RCS file: /cvs/cvsroot/loki_setup/uninstall.c,v
retrieving revision 1.61
diff -u -r1.61 uninstall.c
--- uninstall.c 8 Feb 2005 20:41:56 -0000 1.61
+++ uninstall.c 23 May 2006 08:11:45 -0000
@@ -306,7 +306,7 @@
if ( prod ) {
product_info_t *info = loki_getinfo_product(prod);
- snprintf(locale, sizeof(locale), "%s/" LOCALEDIR, info->root);
+ snprintf(locale, sizeof(locale), "%s/locale", info->root);
if ( access(locale, R_OK) < 0 ) { /* If not existing, revert to copy in the home directory */
locale[0] = '\0';
}
@@ -314,7 +314,7 @@
}
if(!locale[0]) {
- snprintf(locale, sizeof(locale), "%s/" LOKI_DIRNAME "/installed/" LOCALEDIR, detect_home());
+ snprintf(locale, sizeof(locale), "%s/" LOKI_DIRNAME "/installed/locale", detect_home());
}
bindtextdomain (PACKAGE, locale);
cu
Ludwig
--
(o_ Ludwig Nussel
//\ SUSE LINUX Products GmbH, Development
V_/_ http://www.suse.de/
More information about the Lokisetup
mailing list