diff --git a/Makefile.in b/Makefile.in
index 7368fe137c..95da87e5cd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1173,6 +1173,7 @@ SOUND_SDL_CXXFLAGS = -DWXUSINGDLL -DwxUSE_GUI=0 $(PIC_FLAG) $(CPPFLAGS) \
SOUND_SDL_OBJECTS = \
sound_sdl_sound_sdl.o
LOCALE_LINGUAS = ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk zh zh_CN zh_TW
+LOCALE_MSW_LINGUAS = it
### Conditionally set variables: ###
@@ -9144,7 +9145,7 @@ COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
all: $(__wxregex___depname) $(__wxzlib___depname) $(__wxpng___depname) $(__wxjpeg___depname) $(__wxtiff___depname) $(__wxodbc___depname) $(__wxexpat___depname) $(__monodll___depname) $(__monolib___depname) $(__basedll___depname) $(__baselib___depname) $(__netdll___depname) $(__netlib___depname) $(__coredll___depname) $(__corelib___depname) $(__advdll___depname) $(__advlib___depname) $(__mediadll___depname) $(__medialib___depname) $(__odbcdll___depname) $(__odbclib___depname) $(__dbgriddll___depname) $(__dbgridlib___depname) $(__htmldll___depname) $(__htmllib___depname) $(__qadll___depname) $(__qalib___depname) $(__xmldll___depname) $(__xmllib___depname) $(__xrcdll___depname) $(__xrclib___depname) $(__gldll___depname) $(__gllib___depname) $(__sound_sdl___depname) $(__wxrc___depname) $(__cocoa_res___depname)
-install: all $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxodbc___depname) $(__install_wxexpat___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_odbcdll___depname) $(__install_odbclib___depname) $(__install_dbgriddll___depname) $(__install_dbgridlib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_wxrc___depname) install-wxconfig locale_install $(__cocoa_res_install___depname)
+install: all $(__install_wxregex___depname) $(__install_wxzlib___depname) $(__install_wxpng___depname) $(__install_wxjpeg___depname) $(__install_wxtiff___depname) $(__install_wxodbc___depname) $(__install_wxexpat___depname) $(__install_monodll___depname) $(__install_monolib___depname) $(__install_basedll___depname) $(__install_baselib___depname) $(__install_netdll___depname) $(__install_netlib___depname) $(__install_coredll___depname) $(__install_corelib___depname) $(__install_advdll___depname) $(__install_advlib___depname) $(__install_mediadll___depname) $(__install_medialib___depname) $(__install_odbcdll___depname) $(__install_odbclib___depname) $(__install_dbgriddll___depname) $(__install_dbgridlib___depname) $(__install_htmldll___depname) $(__install_htmllib___depname) $(__install_qadll___depname) $(__install_qalib___depname) $(__install_xmldll___depname) $(__install_xmllib___depname) $(__install_xrcdll___depname) $(__install_xrclib___depname) $(__install_gldll___depname) $(__install_gllib___depname) $(__install_sound_sdl___depname) $(__install_wxrc___depname) install-wxconfig locale_install locale_msw_install $(__cocoa_res_install___depname)
$(INSTALL_DIR) $(DESTDIR)$(datadir)/aclocal
(cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal)
$(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx
@@ -9695,6 +9696,16 @@ locale_install:
fi ; \
done
+locale_msw_install:
+ $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale
+ for l in $(LOCALE_MSW_LINGUAS) ; do \
+ $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l ; \
+ $(INSTALL_DIR) $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES ; \
+ if test -f $(srcdir)/locale/msw/$$l.mo ; then \
+ $(INSTALL_DATA) $(srcdir)/locale/msw/$$l.mo $(DESTDIR)$(datadir)/locale/$$l/LC_MESSAGES/wxmsw.mo ; \
+ fi ; \
+ done
+
@COND_TOOLKIT_COCOA@lib/libwx_$(TOOLCHAIN_NAME).0.r:
@COND_TOOLKIT_COCOA@ $(RESCOMP) -d __UNIX__ -useDF $(top_srcdir)/src/cocoa/dummy.r -o lib/libwx_$(TOOLCHAIN_NAME).0.rsrc
@COND_TOOLKIT_COCOA@ $(DEREZ) lib/libwx_$(TOOLCHAIN_NAME).0.rsrc -useDF >lib/libwx_$(TOOLCHAIN_NAME).0.r
diff --git a/build/bakefiles/wx.bkl b/build/bakefiles/wx.bkl
index ffd449f90b..a8b8128d92 100644
--- a/build/bakefiles/wx.bkl
+++ b/build/bakefiles/wx.bkl
@@ -120,6 +120,13 @@
$(LOCALEDIR)
+
+ $(SRCDIR)/locale/msw
+ wxmsw
+ it
+ $(LOCALEDIR)
+
+
lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).r
diff --git a/docs/tech/tn0002.txt b/docs/tech/tn0002.txt
index 9568ee628a..694a67d85f 100644
--- a/docs/tech/tn0002.txt
+++ b/docs/tech/tn0002.txt
@@ -59,12 +59,30 @@ them). Then type "make lang.mo" which will create the binary message catalog.
Under Windows (If you don't have Cygwin or MinGW), you should execute the
commands manually, please have a look at Makefile to see what must be done.
+For platform specific translations, .po files such as 'locale/msw/it.po' can be
+used to provide translations that override the usual ones in 'locale/it.po'.
+The genaterated .mo files are then installed under the names such as 'wxmsw.mo'
+alongside the generic 'wxstd.mo'.
+
+A new platform specific translation should be added to a section such as this
+in wx.bkl:
+
+
+ $(SRCDIR)/locale/msw
+ wxmsw
+ it
+ $(LOCALEDIR)
+
+
=== EOF ===
Author: VZ
Version: $Id$
$Log$
+Revision 1.6 2005/08/12 15:29:47 MW
+Translate '&Help' to '&' for italian Windows only
+
Revision 1.5 2004/10/22 19:12:59 KH
*** empty log message ***
diff --git a/locale/Makefile b/locale/Makefile
index 2adfdd9d32..448c6c18ea 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -7,7 +7,7 @@
# being called with this dir as the cwd, but if we generate this file
# with configure an explicit path should be specified -- RL.
-WX_LINGUAS := `ls *.po 2> /dev/null | sed -n 's/\(wxstd\)\?\.po//p'`
+WX_LINGUAS := `ls *.po */*.po 2> /dev/null | sed -n 's/\(wxstd\)\?\.po//p'`
# the programs we use (TODO: use configure to detect them)
MSGFMT=msgfmt --verbose
diff --git a/locale/msw/it.po b/locale/msw/it.po
new file mode 100644
index 0000000000..c1323897e4
--- /dev/null
+++ b/locale/msw/it.po
@@ -0,0 +1,16 @@
+# wxMSW specific overrides for it.po
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: $Id$\n"
+"POT-Creation-Date: 2005-08-12 14:23:42+0100\n"
+"PO-Revision-Date: 2005-08-12 14:23:42+0100\n"
+"Last-Translator: Mike Wetherell \n"
+"Language-Team: wxWidgets translators \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+# The help menu is called just '?' on Italian versions of Windows
+msgid "&Help"
+msgstr "&?"
diff --git a/src/common/intl.cpp b/src/common/intl.cpp
index 8aeb57fbe9..1f360d9a5a 100644
--- a/src/common/intl.cpp
+++ b/src/common/intl.cpp
@@ -79,6 +79,8 @@
#include "wx/encconv.h"
#include "wx/hashmap.h"
#include "wx/ptr_scpd.h"
+#include "wx/app.h"
+#include "wx/apptrait.h"
#if defined(__WXMAC__)
#include "wx/mac/private.h" // includes mac headers
@@ -1470,8 +1472,19 @@ bool wxLocale::Init(const wxChar *szName,
m_pMsgCat = NULL;
bool bOk = true;
if ( bLoadDefault )
+ {
bOk = AddCatalog(wxT("wxstd"));
+ // there may be a catalog with toolkit specific overrides, it is not
+ // an error if this does not exist
+ if ( bOk && wxTheApp )
+ {
+ wxAppTraits *traits = wxTheApp->GetTraits();
+ if (traits)
+ AddCatalog(traits->GetToolkitInfo().name.BeforeFirst(wxT('/')).MakeLower());
+ }
+ }
+
return bOk;
}
diff --git a/src/generic/mdig.cpp b/src/generic/mdig.cpp
index 7e950d0542..b2ad4fd4e2 100644
--- a/src/generic/mdig.cpp
+++ b/src/generic/mdig.cpp
@@ -307,7 +307,7 @@ void wxGenericMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
{
if (pMenuBar && m_pWindowMenu)
{
- int pos = pMenuBar->FindMenu(_("Help"));
+ int pos = pMenuBar->FindMenu(wxStripMenuCodes(wxString(_("&Help"))));
if (pos == wxNOT_FOUND)
{
pMenuBar->Append(m_pWindowMenu, _("&Window"));
diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp
index b52982d10d..dad11b4bcd 100644
--- a/src/msw/mdi.cpp
+++ b/src/msw/mdi.cpp
@@ -1401,8 +1401,9 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu)
continue;
}
-
- if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Help")) )
+ wxString strHelp(_("&Help"));
+ wxString strBuf(buf);
+ if ( wxStripMenuCodes(strBuf) == wxStripMenuCodes(strHelp) )
{
success = true;
::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING,