On Mon, 2004-05-17 at 14:41, Johan Dahlin wrote: > > _translation = gettext.translation(APP, DIR) > > gtk.glade.bindtextdomain (APP, DIR) > > gtk.glade.textdomain (APP) > > > > def _(s): > > if s == '': > > return s > > assert s > > return _translation.gettext(s) > > This is busted. should only be: > _ = gettext.translation(APP, DIR) > > unless I'm missing something. > > APP / DIR might be wrong, you'd have to check what files are accessed by > python/ well, I found strace for windows, but it's output is weird. In linux the output says "open ... <filename> etc.." in windows it says "NTCreateFile ...". I've attached a few lines from this file because I can't understand what it does. the APP/DIR is correct because I've just copied the sources from linux (and it works there).
anyway, I'll have to read some more about gettext and make more tests... thanx -- Haim
6746 1092 1016 NtAllocateVirtualMemory (-1, 11747328, 0, 8192, 4096, 4, ... 11747328,
8192, ) == 0x0
6747 1092 1016 NtClose (92, ... ) == 0x0
6748 1092 1016 NtQueryValueKey (124, "00000409", Full, 532, ... TitleIdx=0, Type=1,
Name="00000409", Data="1\0\0\0"}, 40, ) == 0x0
6749 1092 1016 NtQueryValueKey (132, "1", Full, 532, ... TitleIdx=0, Type=1, Name="1",
Data="1\0\0\0"}, 28, ) == 0x0
6750 1092 1016 NtFsControlFile (24, 0, 0x0, 0x0, 0x90028, 0x0, 0, 0, ... {status=0x0,
info=0}, 0x0, ) == 0x0
6751 1092 1016 NtOpenFile (0x100001, {24, 24, 0x40, 0, 0,
"locale\he_IL\LC_MESSAGES\"}, 3, 16417, ... ) == STATUS_OBJECT_PATH_NOT_FOUND
6752 1092 1016 NtFsControlFile (24, 0, 0x0, 0x0, 0x90028, 0x0, 0, 0, ... {status=0x0,
info=0}, 0x0, ) == 0x0
6753 1092 1016 NtFsControlFile (24, 0, 0x0, 0x0, 0x90028, 0x0, 0, 0, ... {status=0x0,
info=0}, 0x0, ) == 0x0
6754 1092 1016 NtOpenFile (0x100001, {24, 24, 0x40, 0, 0, "locale\he\LC_MESSAGES\"},
3, 16417, ... 92, {status=0x0, info=1}, ) == 0x0
6755 1092 1016 NtQueryDirectoryFile (92, 0, 0, 0, 1240632, 616, BothDirectory, 1,
"hebtest.mo", 0, ... {status=0x0, info=114}, ) == 0x0
6756 1092 1016 NtClose (92, ... ) == 0x0
6757 1092 1016 NtFsControlFile (24, 0, 0x0, 0x0, 0x90028, 0x0, 0, 0, ... {status=0x0,
info=0}, 0x0, ) == 0x0
6758 1092 1016 NtFsControlFile (24, 0, 0x0, 0x0, 0x90028, 0x0, 0, 0, ... {status=0x0,
info=0}, 0x0, ) == 0x0
6759 1092 1016 NtCreateFile (0x80100080, {24, 24, 0x42, 0, 1243448,
"locale\he\LC_MESSAGES\hebtest.mo"}, 0x0, 128, 3, 1, 96, 0, 0, ... 92, {status=0x0,
info=1}, ) == 0x0
6760 1092 1016 NtQueryVolumeInformationFile (92, 1243556, 8, Device, ... {status=0x0,
info=8}, ) == 0x0
6761 1092 1016 NtQueryVolumeInformationFile (92, 1243632, 8, Device, ... {status=0x0,
info=8}, ) == 0x0
6762 1092 1016 NtQueryVolumeInformationFile (92, 1243448, 24, Volume, ... {status=0x0,
info=18}, ) == 0x0
6763 1092 1016 NtQueryInformationFile (92, 1243472, 104, All, ... ) ==
STATUS_BUFFER_OVERFLOW
6764 1092 1016 NtQueryVolumeInformationFile (92, 1242580, 8, Device, ... {status=0x0,
info=8}, ) == 0x0
6765 1092 1016 NtQueryVolumeInformationFile (92, 1242396, 24, Volume, ... {status=0x0,
info=18}, ) == 0x0
6766 1092 1016 NtQueryInformationFile (92, 1242420, 104, All, ... ) ==
STATUS_BUFFER_OVERFLOW
6767 1092 1016 NtQueryInformationFile (92, 1242632, 8, Position, ... {status=0x0,
info=8}, ) == 0x0
6768 1092 1016 NtSetInformationFile (92, 1242632, 8, Position, ... {status=0x0,
info=0}, ) == 0x0
6769 1092 1016 NtQueryInformationFile (92, 1242544, 8, Position, ... {status=0x0,
info=8}, ) == 0x0
6770 1092 1016 NtSetInformationFile (92, 1242544, 8, Position, ... {status=0x0,
info=0}, ) == 0x0
6771 1092 1016 NtAllocateVirtualMemory (-1, 11755520, 0, 8192, 4096, 4, ... 11755520,
8192, ) == 0x0
6772 1092 1016 NtReadFile (92, 0, 0, 0, 4096, 0x0, 0, ... {status=0x0, info=612},
"\336\22\4\225\0\0\0\0\10\0\0\0\34\0\0\0\\0\0\0\13\0\0\0\234\0\0\0\0\0\0\0\310\0\0\0\1\0\0\0\311\0\0\0\30\0\0\0\313\0\0\0\7\0\0\0\344\0\0\0\6\0\0\0\354\0\0\0\5\0\0\0\363\0\0\0\5\0\0\0\371\0\0\0\6\0\0\0\377\0\0\0(\1\0\0\6\1\0\0\1\0\0\0/[EMAIL
PROTECTED] is translated
text!\0Unicode\0_About\0_File\0_Help\0name:\11\0Project-Id-Version: Hebtest
0.1\12POT-Creation-Date: 2004-05-15 12:11+0300\12PO-Revision-Date: 2004-05-18
12:36+0200\12Last-Translator: Haim Ashkenazi <[EMAIL PROTECTED]>\12Language-Team:
Hebrew <[EMAIL PROTECTED]>\12MIME-Version: 1.0\12Content-Type: text/", ) == 0x0
6773 1092 1016 NtReadFile (92, 0, 0, 0, 4096, 0x0, 0, ... ) == STATUS_END_OF_FILE
6774 1092 1016 NtFsControlFile (24, 0, 0x0, 0x0, 0x90028, 0x0, 0, 0, ... {status=0x0,
info=0}, 0x0, ) == 0x0
6775 1092 1016 NtOpenFile (0x100001, {24, 0, 0x40, 0, 0,
"\??\C:\Python23\lib\encodings\"}, 3, 16417, ... 108, {status=0x0, info=1}, ) == 0x0
6776 1092 1016 NtQueryDirectoryFile (108, 0, 0, 0, 1239208, 616, BothDirectory, 1,
"iso_8859_8", 0, ... ) == STATUS_NO_SUCH_FILE
6777 1092 1016 NtClose (108, ... ) == 0x0
signature.asc
Description: This is a digitally signed message part
_______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
