Translate '&Help' to '&' for italian Windows only

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35180 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell
2005-08-12 15:29:57 +00:00
parent 0725108f48
commit 4d931bcca0
8 changed files with 71 additions and 5 deletions

View File

@@ -1173,6 +1173,7 @@ SOUND_SDL_CXXFLAGS = -DWXUSINGDLL -DwxUSE_GUI=0 $(PIC_FLAG) $(CPPFLAGS) \
SOUND_SDL_OBJECTS = \ SOUND_SDL_OBJECTS = \
sound_sdl_sound_sdl.o 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_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: ### ### 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) 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 $(INSTALL_DIR) $(DESTDIR)$(datadir)/aclocal
(cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal) (cd $(srcdir) ; $(INSTALL_DATA) wxwin.m4 $(DESTDIR)$(datadir)/aclocal)
$(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx $(INSTALL_DIR) $(DESTDIR)$(libdir)/wx/include/$(TOOLCHAIN_FULLNAME)/wx
@@ -9695,6 +9696,16 @@ locale_install:
fi ; \ fi ; \
done 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@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@ $(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 @COND_TOOLKIT_COCOA@ $(DEREZ) lib/libwx_$(TOOLCHAIN_NAME).0.rsrc -useDF >lib/libwx_$(TOOLCHAIN_NAME).0.r

View File

@@ -120,6 +120,13 @@
</linguas> </linguas>
<install-to>$(LOCALEDIR)</install-to> <install-to>$(LOCALEDIR)</install-to>
</gettext-catalogs> </gettext-catalogs>
<gettext-catalogs id="locale_msw">
<srcdir>$(SRCDIR)/locale/msw</srcdir>
<catalog-name>wxmsw</catalog-name>
<linguas>it</linguas>
<install-to>$(LOCALEDIR)</install-to>
</gettext-catalogs>
<!-- Mac OS X resources: --> <!-- Mac OS X resources: -->
<set var="MACOS_R">lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).r</set> <set var="MACOS_R">lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).r</set>

View File

@@ -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 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. 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:
<gettext-catalogs id="locale_msw">
<srcdir>$(SRCDIR)/locale/msw</srcdir>
<catalog-name>wxmsw</catalog-name>
<linguas>it</linguas>
<install-to>$(LOCALEDIR)</install-to>
</gettext-catalogs>
=== EOF === === EOF ===
Author: VZ Author: VZ
Version: $Id$ Version: $Id$
$Log$ $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 Revision 1.5 2004/10/22 19:12:59 KH
*** empty log message *** *** empty log message ***

View File

@@ -7,7 +7,7 @@
# being called with this dir as the cwd, but if we generate this file # being called with this dir as the cwd, but if we generate this file
# with configure an explicit path should be specified -- RL. # 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) # the programs we use (TODO: use configure to detect them)
MSGFMT=msgfmt --verbose MSGFMT=msgfmt --verbose

16
locale/msw/it.po Normal file
View File

@@ -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 <mike.wetherell@ntlworld.com>\n"
"Language-Team: wxWidgets translators <wx-translators@lists.wxwidgets.org>\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 "&?"

View File

@@ -79,6 +79,8 @@
#include "wx/encconv.h" #include "wx/encconv.h"
#include "wx/hashmap.h" #include "wx/hashmap.h"
#include "wx/ptr_scpd.h" #include "wx/ptr_scpd.h"
#include "wx/app.h"
#include "wx/apptrait.h"
#if defined(__WXMAC__) #if defined(__WXMAC__)
#include "wx/mac/private.h" // includes mac headers #include "wx/mac/private.h" // includes mac headers
@@ -1470,8 +1472,19 @@ bool wxLocale::Init(const wxChar *szName,
m_pMsgCat = NULL; m_pMsgCat = NULL;
bool bOk = true; bool bOk = true;
if ( bLoadDefault ) if ( bLoadDefault )
{
bOk = AddCatalog(wxT("wxstd")); 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; return bOk;
} }

View File

@@ -307,7 +307,7 @@ void wxGenericMDIParentFrame::AddWindowMenu(wxMenuBar *pMenuBar)
{ {
if (pMenuBar && m_pWindowMenu) if (pMenuBar && m_pWindowMenu)
{ {
int pos = pMenuBar->FindMenu(_("Help")); int pos = pMenuBar->FindMenu(wxStripMenuCodes(wxString(_("&Help"))));
if (pos == wxNOT_FOUND) if (pos == wxNOT_FOUND)
{ {
pMenuBar->Append(m_pWindowMenu, _("&Window")); pMenuBar->Append(m_pWindowMenu, _("&Window"));

View File

@@ -1401,8 +1401,9 @@ static void InsertWindowMenu(wxWindow *win, WXHMENU menu, HMENU subMenu)
continue; continue;
} }
wxString strHelp(_("&Help"));
if ( wxStripMenuCodes(wxString(buf)).IsSameAs(_("Help")) ) wxString strBuf(buf);
if ( wxStripMenuCodes(strBuf) == wxStripMenuCodes(strHelp) )
{ {
success = true; success = true;
::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING, ::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING,