Package: xchm Version: 2:1.13-4 Followup-For: Bug #422348 Hello,
I've attached the patch for xchm that will make the greeting and about messages translatable. -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.21.5 (PREEMPT) Locale: LANG=ro_RO.UTF-8, LC_CTYPE=ro_RO.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages xchm depends on: ii libc6 2.5-10 GNU C Library: Shared libraries ii libchm1 2:0.39-4 library for dealing with Microsoft ii libgcc1 1:4.2-20070609-1 GCC support library ii libstdc++6 4.2-20070609-1 The GNU Standard C++ Library v3 ii libwxbase2.6-0 2.6.3.2.1.5 wxBase library (runtime) - non-GUI ii libwxgtk2.6-0 2.6.3.2.1.5 wxWidgets Cross-platform C++ GUI t xchm recommends no packages. -- no debconf information
diff --git a/xchm-1.13/src/chmframe.cpp b/xchm-1.13/src/chmframe.cpp index 5ccc5ff..48bca38 100644 --- a/xchm-1.13/src/chmframe.cpp +++ b/xchm-1.13/src/chmframe.cpp @@ -60,7 +60,17 @@ namespace { -const wxChar *greeting = wxT( +const wxChar *use_unicode = +#if !defined(wxUSE_UNICODE) || !wxUSE_UNICODE + _("<br><br><B>WARNING</B>: your <B>xCHM</B> binary is linked against a " + "non-Unicode version of wxWidgets! While it will work with most " + "CHMs, it might not properly display special character languages." +#else + _("" +#endif + ); + +const wxChar *greeting_start = _( "<html><body><table border=0><tr><td align=\"left\">" "<img src=\"memory:logo.xpm\"></td><td align=\"left\">" "Hello, and welcome to <B>xCHM</B>, the UNIX CHM viewer." @@ -80,12 +90,9 @@ const wxChar *greeting = wxT( " Pabs' <TT>GPL</TT>d <TT>chmdeco</TT> code.<br><br>If" " you'd like to use the code in your own stuff please figure" " <TT>GPL</TT> out first. Far too many people think the <TT>GPL</TT> " - "is bad out of utter ignorance." -#if !defined(wxUSE_UNICODE) || !wxUSE_UNICODE - "<br><br><B>WARNING</B>: your <B>xCHM</B> binary is linked against a " - "non-Unicode version of wxWidgets! While it will work with most " - "CHMs, it might not properly display special character languages." -#endif + "is bad out of utter ignorance."); + +const wxChar *greeting_end = _( "<br><br>Tips:<br><ul><li>" "The global search is an \'AND\' search, i.e. searching for" " \'word1 word2\' (quotes not included) will find all the pages" @@ -98,12 +105,10 @@ const wxChar *greeting = wxT( " common options.</li></ul><br><br>Ctrl(cmd)-C is copy," " Ctrl(cmd)-F is find in page.<br><br>Enjoy.</body></html>"); - -const wxChar *error_page = wxT( +const wxChar *error_page = _( "<html><body>Error loading CHM file!</body></html>"); - -const wxChar *about_txt = wxT( +const wxChar *about_txt = _( "xCHM v. " VERSION "\nby Razvan Cojocaru <[EMAIL PROTECTED]>\n\n" "With thanks to Pabs (http://bonedaddy.net/pabs3/hhm/).\n" "Based on Jed Wing's CHMLIB (http://66.93.236.84/~jedwin/projects/).\n" @@ -165,6 +170,8 @@ CHMFrame::CHMFrame(const wxString& title, const wxString& booksDir, wxBitmap bitmap(logo_xpm); wxMemoryFSHandler::AddFile(wxT("logo.xpm"), bitmap, //wxBITMAP(logo), wxBITMAP_TYPE_XPM); + wxString greeting; + greeting << greeting_start << use_unicode << greeting_end; wxMemoryFSHandler::AddFile(wxT("about.html"), greeting); wxMemoryFSHandler::AddFile(wxT("error.html"), error_page);