1 # HG changeset patch |
|
2 # Parent 16846914f968944f991c8b12fdc38ce8fc099d73 |
|
3 # User Wolfgang Rosenauer <wr@rosenauer.org> |
|
4 # Parent adcf975f1f5a796da0b1926a67beba003fd08b6b |
|
5 Add searchplugins to chrome packaging for proper localization |
|
6 |
|
7 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js |
|
8 --- a/browser/app/profile/firefox.js |
|
9 +++ b/browser/app/profile/firefox.js |
|
10 @@ -389,16 +389,20 @@ pref("browser.search.searchEnginesURL", |
|
11 |
|
12 // Tell the search service to load search plugins from the locale JAR |
|
13 pref("browser.search.loadFromJars", true); |
|
14 pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/"); |
|
15 |
|
16 // pointer to the default engine name |
|
17 pref("browser.search.defaultenginename", "chrome://browser-region/locale/region.properties"); |
|
18 |
|
19 +// Tell the search service to load search plugins from the locale JAR |
|
20 +pref("browser.search.loadFromJars", true); |
|
21 +pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/"); |
|
22 + |
|
23 // Ordering of Search Engines in the Engine list. |
|
24 pref("browser.search.order.1", "chrome://browser-region/locale/region.properties"); |
|
25 pref("browser.search.order.2", "chrome://browser-region/locale/region.properties"); |
|
26 pref("browser.search.order.3", "chrome://browser-region/locale/region.properties"); |
|
27 |
|
28 // Market-specific search defaults (US market only) |
|
29 pref("browser.search.geoSpecificDefaults", true); |
|
30 pref("browser.search.defaultenginename.US", "data:text/plain,browser.search.defaultenginename.US=Yahoo"); |
|
31 diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in |
|
32 --- a/browser/locales/Makefile.in |
|
33 +++ b/browser/locales/Makefile.in |
|
34 @@ -63,24 +63,27 @@ UNINSTALLER_PACKAGE_HOOK = $(RM) -r $(ST |
|
35 |
|
36 STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST)/$(PKG_INST_PATH)'; \ |
|
37 $(RM) '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \ |
|
38 cp ../installer/windows/l10ngen/stub.exe '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \ |
|
39 chmod 0755 '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \ |
|
40 $(NULL) |
|
41 endif |
|
42 |
|
43 -SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) ddg |
|
44 +SEARCHPLUGINS_NAMES = $(shell cat \ |
|
45 + $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \ |
|
46 + @srcdir@/en-US/searchplugins/list.txt ) ) ddg |
|
47 SEARCHPLUGINS_PATH := .deps/generated_$(AB_CD) |
|
48 SEARCHPLUGINS_TARGET := libs searchplugins |
|
49 -SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_NAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin)))) |
|
50 +#SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_NAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin)))) |
|
51 +SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES)) |
|
52 # Some locale-specific search plugins may have preprocessor directives, but the |
|
53 # default en-US ones do not. |
|
54 SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings |
|
55 -PP_TARGETS += SEARCHPLUGINS |
|
56 +#PP_TARGETS += SEARCHPLUGINS |
|
57 |
|
58 list-txt = $(SEARCHPLUGINS_PATH)/list.txt |
|
59 GARBAGE += $(list-txt) |
|
60 |
|
61 libs:: searchplugins |
|
62 |
|
63 # Required for l10n.mk - defines a list of app sub dirs that should |
|
64 # be included in langpack xpis. |
|
65 @@ -119,16 +122,39 @@ NO_JA_JP_MAC_AB_CD := $(if $(filter ja-J |
|
66 libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ; |
|
67 |
|
68 libs:: $(addprefix generic/profile/,$(PROFILE_FILES)) |
|
69 $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile |
|
70 |
|
71 libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME))) |
|
72 $(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome |
|
73 |
|
74 +tmp-search.jar.mn:: |
|
75 + printf "$(AB_CD).jar:" > $@ |
|
76 + printf "$(foreach plugin,$(SEARCHPLUGINS), \n locale/browser/searchplugins/$(plugin) ($(plugin)))" >> $@ |
|
77 + @echo >> $@ |
|
78 + |
|
79 +searchplugins-jar:: $(SEARCHPLUGINS) |
|
80 + for SEARCHPLUGIN in $^; do \ |
|
81 + $(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) \ |
|
82 + $$SEARCHPLUGIN > $$SEARCHPLUGIN-new) ; \ |
|
83 + mv $$SEARCHPLUGIN-new $$SEARCHPLUGIN ; \ |
|
84 + done |
|
85 + |
|
86 +searchplugins-jar:: tmp-search.jar.mn |
|
87 + $(call py_action,jar_maker,\ |
|
88 + $(QUIET) -j $(FINAL_TARGET)/chrome \ |
|
89 + -s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \ |
|
90 + -s $(LOCALE_SRCDIR)/searchplugins \ |
|
91 + $(MAKE_JARS_FLAGS) tmp-search.jar.mn) |
|
92 + |
|
93 +libs:: searchplugins-jar |
|
94 + |
|
95 +GARBAGE += tmp-search.jar.mn |
|
96 + |
|
97 libs-%: |
|
98 $(NSINSTALL) -D $(DIST)/install |
|
99 @$(MAKE) -C ../../toolkit/locales libs-$* |
|
100 @$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* |
|
101 ifdef MOZ_WEBAPP_RUNTIME |
|
102 @$(MAKE) -C ../../webapprt/locales AB_CD=$* XPI_NAME=locale-$* |
|
103 endif |
|
104 @$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$* |
|
105 diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn |
|
106 --- a/browser/locales/jar.mn |
|
107 +++ b/browser/locales/jar.mn |
|
108 @@ -152,14 +152,15 @@ |
|
109 locale/browser/searchplugins/list.txt (.deps/generated_@AB_CD@/list.txt) |
|
110 locale/browser/searchplugins/ (.deps/generated_@AB_CD@/*.xml) |
|
111 % locale browser-region @AB_CD@ %locale/browser-region/ |
|
112 locale/browser-region/region.properties (%chrome/browser-region/region.properties) |
|
113 # the following files are browser-specific overrides |
|
114 locale/browser/netError.dtd (%chrome/overrides/netError.dtd) |
|
115 locale/browser/appstrings.properties (%chrome/overrides/appstrings.properties) |
|
116 locale/browser/downloads/settingsChange.dtd (%chrome/overrides/settingsChange.dtd) |
|
117 + locale/browser/searchplugins/list.txt (%searchplugins/list.txt) |
|
118 % override chrome://global/locale/netError.dtd chrome://browser/locale/netError.dtd |
|
119 % override chrome://global/locale/appstrings.properties chrome://browser/locale/appstrings.properties |
|
120 % override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd |
|
121 % locale pdf.js @AB_CD@ %locale/pdfviewer/ |
|
122 locale/pdfviewer/viewer.properties (%pdfviewer/viewer.properties) |
|
123 locale/pdfviewer/chrome.properties (%pdfviewer/chrome.properties) |
|