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