1
0
MozillaFirefox/firefox-multilocale-chrome.patch

147 lines
23 KiB
Diff
Raw Normal View History

# HG changeset patch
# Parent 9e20873aca55242f18dd1b93e863eded6d1d08bd
# User Wolfgang Rosenauer <wr@rosenauer.org>
Add searchplugins to chrome packaging for proper localization
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -375,16 +375,20 @@ pref("browser.helperApps.deleteTempFileO
#endif
// search engines URL
pref("browser.search.searchEnginesURL", "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
// pointer to the default engine name
pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties");
+// Tell the search service to load search plugins from the locale JAR
+pref("browser.search.loadFromJars", true);
+pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/");
+
// disable logging for the search service by default
pref("browser.search.log", false);
// Ordering of Search Engines in the Engine list.
pref("browser.search.order.1", "chrome://browser-region/locale/region.properties");
pref("browser.search.order.2", "chrome://browser-region/locale/region.properties");
pref("browser.search.order.3", "chrome://browser-region/locale/region.properties");
diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
--- a/browser/locales/Makefile.in
+++ b/browser/locales/Makefile.in
2014-03-18 20:44:32 +01:00
@@ -66,21 +66,23 @@ STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST
cp ../installer/windows/l10ngen/stub.exe '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
chmod 0755 '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
$(NULL)
endif
ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt))
else
-SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt))
+SEARCHPLUGINS_NAMES = $(shell cat \
+ $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
+ @srcdir@/en-US/searchplugins/list.txt ) )
endif
SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins
SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES))
-PP_TARGETS += SEARCHPLUGINS
+#PP_TARGETS += SEARCHPLUGINS
# Required for l10n.mk - defines a list of app sub dirs that should
# be included in langpack xpis.
ifdef MOZ_METRO
# metro build, include both app folders
DIST_SUBDIRS = browser metro
else
DIST_SUBDIRS = $(DIST_SUBDIR)
2014-03-18 20:44:32 +01:00
@@ -118,16 +120,39 @@ libs:: $(addprefix generic/profile/,$(PR
2014-03-18 20:44:32 +01:00
libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome
# metro build calls back here for search engine plugins
searchplugins: $(addprefix $(FINAL_TARGET)/searchplugins/,$(SEARCHPLUGINS))
.PHONY: searchplugins
+tmp-search.jar.mn::
+ printf "$(AB_CD).jar:" > $@
+ printf "$(foreach plugin,$(SEARCHPLUGINS), \n locale/browser/searchplugins/$(plugin) ($(plugin)))" >> $@
+ @echo >> $@
+
+searchplugins-jar:: $(SEARCHPLUGINS)
+ for SEARCHPLUGIN in $^; do \
2014-03-18 20:44:32 +01:00
+ $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) \
+ $$SEARCHPLUGIN > $$SEARCHPLUGIN-new) ; \
+ mv $$SEARCHPLUGIN-new $$SEARCHPLUGIN ; \
+ done
+
+searchplugins-jar:: tmp-search.jar.mn
+ $(call py_action,jar_maker,\
2014-03-18 20:44:32 +01:00
+ $(QUIET) -j $(FINAL_TARGET)/chrome \
+ -s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \
+ -s $(LOCALE_SRCDIR)/searchplugins \
+ $(MAKE_JARS_FLAGS) tmp-search.jar.mn)
+
+libs:: searchplugins-jar
+
+GARBAGE += tmp-search.jar.mn
+
libs-%:
$(NSINSTALL) -D $(DIST)/install
@$(MAKE) -C ../../toolkit/locales libs-$*
@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
ifdef MOZ_WEBAPP_RUNTIME
@$(MAKE) -C ../../webapprt/locales AB_CD=$* XPI_NAME=locale-$*
endif
@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
diff --git a/browser/locales/en-US/searchplugins/google.xml b/browser/locales/en-US/searchplugins/google.xml
--- a/browser/locales/en-US/searchplugins/google.xml
+++ b/browser/locales/en-US/searchplugins/google.xml
@@ -11,25 +11,17 @@
<Image width="130" height="52">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIIAAAA0CAYAAABGkOCVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NDkxMSwgMjAxMy8xMC8yOS0xMTo0NzoxNiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmV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kC7a4WZiA10zezG8Oci8yw28O5012tgY2ewgpHvAkGWz8cbAp0MwFAHRMESB51RTIKJLE03jKC77Vum387g6MBOtTgDpvXe+oAwoEteRPYx9x+uTY/A4ObhupAWBYApDCdMZdQCWBp3RO9XBNLSBZCupH
<Url type="application/x-suggestions+json" method="GET" template="https://www.google.com/complete/search?client=firefox&amp;q={searchTerms}"/>
<Url type="text/html" method="GET" template="https://www.google.com/search">
<Param name="q" value="{searchTerms}"/>
<Param name="ie" value="utf-8"/>
<Param name="oe" value="utf-8"/>
<Param name="aq" value="t"/>
<Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
-#if MOZ_UPDATE_CHANNEL == beta
- <MozParam name="client" condition="defaultEngine" trueValue="firefox-beta" falseValue="firefox"/>
-#elif MOZ_UPDATE_CHANNEL == aurora
- <MozParam name="client" condition="defaultEngine" trueValue="firefox-aurora" falseValue="firefox"/>
-#elif MOZ_UPDATE_CHANNEL == nightly
- <MozParam name="client" condition="defaultEngine" trueValue="firefox-nightly" falseValue="firefox"/>
-#else
<MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/>
-#endif
<MozParam name="channel" condition="purpose" purpose="contextmenu" value="rcs"/>
<MozParam name="channel" condition="purpose" purpose="keyword" value="fflb"/>
<MozParam name="channel" condition="purpose" purpose="searchbar" value="sb"/>
<MozParam name="channel" condition="purpose" purpose="homepage" value="np"/>
<MozParam name="channel" condition="purpose" purpose="newtab" value="nts"/>
<MozParam name="source" condition="purpose" purpose="homepage" value="hp"/>
</Url>
<Url type="text/html" method="GET" template="https://www.google.com/" rel="searchform"/>
diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -133,14 +133,15 @@
locale/browser/syncQuota.properties (%chrome/browser/syncQuota.properties)
#endif
% locale browser-region @AB_CD@ %locale/browser-region/
locale/browser-region/region.properties (%chrome/browser-region/region.properties)
# the following files are browser-specific overrides
locale/browser/netError.dtd (%chrome/overrides/netError.dtd)
locale/browser/appstrings.properties (%chrome/overrides/appstrings.properties)
locale/browser/downloads/settingsChange.dtd (%chrome/overrides/settingsChange.dtd)
+ locale/browser/searchplugins/list.txt (%searchplugins/list.txt)
% override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd
% override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties
% override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
% locale pdf.js @AB_CD@ %locale/pdfviewer/
locale/pdfviewer/viewer.properties (%pdfviewer/viewer.properties)
locale/pdfviewer/chrome.properties (%pdfviewer/chrome.properties)