From: Kenneth J. Davis (jeremyd@computer.org)
Date: Thu Jan 23 2003 - 17:16:52 EST
I have recently been helping to track down why some stringsets did not
display (that is, when selected the menus etc would show up in English).
So there are two things that I need help with.
1) in ut_xml_expat.cpp around line 112 there is this chunk of code
if (!XML_Parse (parser, buffer, length, done))
{
UT_DEBUGMSG (("%s at line %d\n", XML_ErrorString (XML_GetErrorCode (parser)), XML_GetCurrentLineNumber (parser)));
ret = UT_IE_IMPORTERROR;
break;
}
which you can see displays a nice diagnostic message with debug builds to
the debug window (console/special app window/etc depending on platform).
The problem is that I suspect many translators test their changes on a
release build and will never see this message. Even if they are using a
debug build, it is a very easy to overlook message (especially if you don't
know what you are looking for). So how do I display a platform specific
message at this point in AbiWord's startup using clean code that doesn't
alter the UT code not relying on other code guide. I suppose on Unix
and other sane systems this would be a simple printf, but on Windows
(at least prior to NT5.1[XP]) it will need to be a MessageBox. Should I create
another UT class for displaying a message box or printing to console
(as platform appropriate), use XAP_Frame's showMessageBox (which seems
bad to me), or not bother and let other translators/users wonder what's
up when the strings show up in English?
2) issue two, not being very familiar with how the .po files are
generated/converted other than there are some Perl scripts to aid
in this (which I unfortunately do not know perl), I was wondering
if someone could help me determine if this is still an issue or
not. We have a .po file that ended up with this:
#. MSG_SpellSelectionDone
#. " Do you want to continue checking the remainder of the document?");
#. /* DLG_FR_FinishedReplace
#: po/tmp/ap_String_Id.h.h:329
msgid "AbiWord finished checking the selection."
msgstr ""
#: po/tmp/ap_String_Id.h.h:331
#, c-format
msgid "AbiWord has finished its search of the document and has made %d replacements."
msgstr ""
Note that DLG_FR_FinishedReplace should be the message id for string 331
here, but it is instead stuck inside the section for string 329 above. The
resulting strings file ended up having a duplicate ID (both translated
messages had MSG_SpellSelectionDone as their id, hence the strings file
aborted loading. My question for those with access and some knowledge of
perl, is this just a weird quirk that happened somehow, or if the update.pl
(as indicated on abisource's webpage for translations) is ran, does it
produce a correct .po[t] file?
Thank you,
Jeremy Davis
jeremyd@computer.org
This archive was generated by hypermail 2.1.4 : Thu Jan 23 2003 - 17:22:29 EST