Remove platform-specific translations support

As shown by the fact that no other platform-specific translations were
ever added since the initial version of locale/msw/it.po added way back
in 4d931bcca0 (Translate '&Help' to '&' for italian Windows only,
2005-08-12), this is not especially useful, so just handle this
particular case specially in wxGetStockLabel() and remove support for
platform-specific translations.

This allows to simplify the makefiles and the catalog loading code as
there is no need to deal with the files in subdirectories any more.
This commit is contained in:
Vadim Zeitlin
2021-02-02 17:14:37 +01:00
parent b5282c682f
commit e539cb69bb
9 changed files with 31 additions and 76 deletions

View File

@@ -7,8 +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 := $(shell ls *.po */*.po 2> /dev/null | sed 's/wxstd.pot//g' | sed 's/.po//g')
WX_LINGUAS_UPDATE := $(shell ls *.po 2> /dev/null | sed 's/wxstd.pot//g' | sed 's/.po//g')
WX_LINGUAS := $(shell ls *.po 2> /dev/null | sed 's/wxstd.pot//g' | sed 's/.po//g')
# the programs we use (TODO: use configure to detect them)
MSGFMT=msgfmt --verbose
@@ -24,8 +23,7 @@ XGETTEXT_ARGS=-C -k_ -kwxPLURAL:1,2 -kwxGETTEXT_IN_CONTEXT:1c,2 -kwxGETTEXT_IN_C
$(MSGFMT) -c -o $@ $<
# a PO file must be updated from wxstd.pot to include new translations
# (but not manually maintained platform-specific files like msw/it.po)
$(foreach lang,$(WX_LINGUAS_UPDATE),$(lang).po): wxstd.pot
$(foreach lang,$(WX_LINGUAS),$(lang).po): wxstd.pot
%.po:
if [ -f $@ ]; then $(MSGMERGE) $@ wxstd.pot > $@.new && mv $@.new $@; else cp wxstd.pot $@; fi
@@ -35,7 +33,7 @@ wxstd.pot:
(find ../include -name "*.h"; find ../src -name "*.cpp"; find ../src -name "*.mm") | LC_COLLATE=C sort | $(XARGS) $(XGETTEXT) $(XGETTEXT_ARGS) -o wxstd.pot
allpo: force-update
@-for t in $(WX_LINGUAS_UPDATE); do $(MAKE) $$t.po; done
@-for t in $(WX_LINGUAS); do $(MAKE) $$t.po; done
allmo:
@for t in $(WX_LINGUAS); do $(MAKE) $$t.mo; done

View File

@@ -440,6 +440,11 @@ msgstr "&Altezza:"
msgid "&Help"
msgstr "&Aiuto"
# The help menu is called just '?' on Italian versions of Windows
msgctxt "standard Windows menu"
msgid "&Help"
msgstr "&?"
#: ../include/wx/richmsgdlg.h:30
msgid "&Hide details"
msgstr "&Nascondi dettagli"

View File

@@ -1,18 +0,0 @@
# wxMSW specific overrides for it.po
#
msgid ""
msgstr ""
"Project-Id-Version: wxWidgets 3.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-10-29 14:59+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@googlegroups.com>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
# The help menu is called just '?' on Italian versions of Windows
msgid "&Help"
msgstr "&?"