GNOME Bugzilla – Bug 317458
atkoobject.c: ATK_LOCALEDIR should be locale character encoding
Last modified: 2006-02-24 14:10:31 UTC
Please describe the problem: ATK_LOCALEDIR is UTF-8. But, the second argument of bindtextdomain is locale character encoding. Steps to reproduce: 1. put files on the folder which has non-ascii character. 2. run any program. Actual results: Strings are not translated. Expected results: Convert the reesult from g_win32_get_package_installation_subdirectory by using g_win32_locale_filename_from_utf8 at get_atk_locale_dir. Does this happen every time? every time Other information:
Created attachment 52784 [details] [review] fix get_atk_locale_dir
This bug occurs on Win32 only. Since there is same bug in GTK+, I have reported simultaneously. http://bugzilla.gnome.org/show_bug.cgi?id=317457
Comment on attachment 52784 [details] [review] fix get_atk_locale_dir >--- atkobject.c.orig 2005-08-25 03:01:25.000000000 +0900 >+++ atkobject.c 2005-09-29 03:13:53.000000000 +0900 >@@ -232,11 +232,21 @@ > > G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) > >-static char * >+static const char * > get_atk_locale_dir (void) > { >- return g_win32_get_package_installation_subdirectory >- (GETTEXT_PACKAGE, dll_name, "lib/locale"); >+ static char *atk_localedir = NULL; >+ >+ if (!atk_localedir) >+ { >+ gchar *temp; >+ >+ temp = g_win32_get_package_installation_subdirectory >+ (GETTEXT_PACKAGE, dll_name, "lib\\locale"); >+ atk_localedir = g_win32_locale_filename_from_utf8 (temp); >+ g_free (temp); >+ } >+ return atk_localedir; > } > > #endif
Thanks!