From 7e2003703c02850cca0e962688b070314c95175c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 9 Jun 2010 11:13:20 +0000 Subject: [PATCH] Don't use -kAddToPopUp() gettext hack with Scintilla. Instead, create a dummy file containing the user-visible strings defined in Scintilla sources. For now it's manually managed but it might make sense to automatically generate it in the future. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- locale/Makefile | 3 --- src/stc/stc_i18n.cpp | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 src/stc/stc_i18n.cpp diff --git a/locale/Makefile b/locale/Makefile index b2d5269734..ce999e2e73 100644 --- a/locale/Makefile +++ b/locale/Makefile @@ -30,13 +30,10 @@ $(foreach lang,$(WX_LINGUAS_UPDATE),$(lang).po): wxstd.pot %.po: if [ -f $@ ]; then $(MSGMERGE) $@ wxstd.pot > $@.new && mv $@.new $@; else cp wxstd.pot $@; fi -# note the extra -kAddToPopUp used for Scintilla files: this is a hack to -# translate the popup menu items wxstd.pot: touch $@ find ../include -name "*.h" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.pot find ../src -name "*.cpp" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.pot - find ../src/stc/scintilla/src -name "*.cxx" | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -kAddToPopUp -o wxstd.pot allpo: force-update @-for t in $(WX_LINGUAS_UPDATE); do $(MAKE) $$t.po; done diff --git a/src/stc/stc_i18n.cpp b/src/stc/stc_i18n.cpp new file mode 100644 index 0000000000..68d46ea40b --- /dev/null +++ b/src/stc/stc_i18n.cpp @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/stc/stc_i18n.cpp +// Purpose: Dummy file containing translatable strings from Scintilla +// Author: Vadim Zeitlin +// Created: 2010-06-09 +// RCS-ID: $Id: $ +// Copyright: (c) 2010 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// This is just a collection of translatable strings defined in Scintilla +// sources. It is used by locale/Makefile only and not supposed to be compiled. +#error "This file is not supposed to be compiled." + +// These strings were manually extracted from ScintillaBase::ContextMenu(). +_("Undo") +_("Redo") +_("Cut") +_("Copy") +_("Paste") +_("Delete") +_("Select All") + -- 2.45.2