|
1 # HG changeset patch |
|
2 # User Wolfgang Rosenauer <wr@rosenauer.org> |
|
3 # Parent 80550b99f4e1c3bfe561edf396dec27d47bf1696 |
|
4 Add searchplugins to chrome packaging for proper localization |
|
5 |
|
6 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js |
|
7 --- a/browser/app/profile/firefox.js |
|
8 +++ b/browser/app/profile/firefox.js |
|
9 @@ -319,16 +319,20 @@ pref("browser.download.manager.scanWhenD |
|
10 pref("browser.download.manager.resumeOnWakeDelay", 10000); |
|
11 |
|
12 // search engines URL |
|
13 pref("browser.search.searchEnginesURL", "https://addons.mozilla.org/%LOCALE%/%APP%/search-engines/"); |
|
14 |
|
15 // pointer to the default engine name |
|
16 pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties"); |
|
17 |
|
18 +// Tell the search service to load search plugins from the locale JAR |
|
19 +pref("browser.search.loadFromJars", true); |
|
20 +pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/"); |
|
21 + |
|
22 // disable logging for the search service by default |
|
23 pref("browser.search.log", false); |
|
24 |
|
25 // Ordering of Search Engines in the Engine list. |
|
26 pref("browser.search.order.1", "chrome://browser-region/locale/region.properties"); |
|
27 pref("browser.search.order.2", "chrome://browser-region/locale/region.properties"); |
|
28 pref("browser.search.order.3", "chrome://browser-region/locale/region.properties"); |
|
29 |
|
30 diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in |
|
31 --- a/browser/locales/Makefile.in |
|
32 +++ b/browser/locales/Makefile.in |
|
33 @@ -169,31 +169,44 @@ libs:: $(addprefix $(LOCALE_SRCDIR)/prof |
|
34 install:: $(DESTDIR)$(mozappdir)/defaults/profile/bookmarks.html ; |
|
35 |
|
36 install:: $(addprefix generic/profile/,$(PROFILE_FILES)) |
|
37 $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile |
|
38 |
|
39 install:: $(addprefix $(LOCALE_SRCDIR)/profile/chrome/,$(PROFILE_CHROME)) |
|
40 $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile/chrome |
|
41 |
|
42 -SEARCH_PLUGINS = $(shell cat $(LOCALE_SRCDIR)/searchplugins/list.txt) |
|
43 +SEARCH_PLUGINS = $(shell cat \ |
|
44 + $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \ |
|
45 + @srcdir@/en-US/searchplugins/list.txt ) ) |
|
46 |
|
47 -libs:: $(addsuffix .xml,$(SEARCH_PLUGINS)) |
|
48 - $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/searchplugins |
|
49 +tmp-search.jar.mn:: |
|
50 + printf "$(AB_CD).jar:" > $@ |
|
51 + printf "$(foreach plugin,$(SEARCH_PLUGINS),$(subst __PLUGIN_SUBST__,$(plugin), \n locale/browser/searchplugins/__PLUGIN_SUBST__.xml (__PLUGIN_SUBST__.xml)))" >> $@ |
|
52 + @echo >> $@ |
|
53 |
|
54 -install:: $(addsuffix .xml,$(SEARCH_PLUGINS)) |
|
55 - $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/searchplugins |
|
56 +searchplugins: tmp-search.jar.mn |
|
57 + $(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \ |
|
58 + $(QUIET) -j $(FINAL_TARGET)/chrome \ |
|
59 + -s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \ |
|
60 + -s $(LOCALE_SRCDIR)/searchplugins \ |
|
61 + $(MAKE_JARS_FLAGS) tmp-search.jar.mn |
|
62 + |
|
63 +export:: searchplugins |
|
64 + |
|
65 +GARBAGE += tmp-search.jar.mn |
|
66 |
|
67 |
|
68 libs-%: |
|
69 $(NSINSTALL) -D $(DIST)/install |
|
70 @$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1 |
|
71 ifdef MOZ_SERVICES_SYNC |
|
72 @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 |
|
73 endif |
|
74 + @$(MAKE) -B searchplugins AB_CD=$* XPI_NAME=locale-$* |
|
75 @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 |
|
76 @$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1 |
|
77 @$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1 |
|
78 |
|
79 |
|
80 repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).exe" |
|
81 repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES) |
|
82 @echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)." |
|
83 diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn |
|
84 --- a/browser/locales/jar.mn |
|
85 +++ b/browser/locales/jar.mn |
|
86 @@ -87,8 +87,9 @@ |
|
87 % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd |
|
88 % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties |
|
89 % override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd |
|
90 #if MOZ_UPDATE_CHANNEL == beta |
|
91 % locale testpilot @AB_CD@ %locale/feedback/ |
|
92 locale/feedback/main.dtd (%feedback/main.dtd) |
|
93 locale/feedback/main.properties (%feedback/main.properties) |
|
94 #endif |
|
95 + locale/browser/searchplugins/list.txt (%searchplugins/list.txt) |