firefox-multilocale-chrome.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Tue, 02 Dec 2014 21:14:59 +0100
branchfirefox34
changeset 813 9e3063dcc69e
parent 805 e14da82b1332
child 816 5551f1ff7e1d
permissions -rw-r--r--
Firefox 34.0.5 release
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
813
9e3063dcc69e Firefox 34.0.5 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 805
diff changeset
     2
# Parent 11ad195fb502ca7c1ba3c8836b2d91be56d64ce4
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
     3
# User Wolfgang Rosenauer <wr@rosenauer.org>
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
813
9e3063dcc69e Firefox 34.0.5 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 805
diff changeset
     9
@@ -388,16 +388,20 @@ pref("browser.helperApps.deleteTempFileO
686
ab25aac2aa83 Firefox 26.0b5 update
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 653
diff changeset
    10
 #endif
198
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
289
3c0dff7ca9c4 Update to version 6.0b1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 251
diff changeset
    13
 pref("browser.search.searchEnginesURL",      "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
198
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
703
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    33
@@ -66,21 +66,23 @@ STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    34
     cp ../installer/windows/l10ngen/stub.exe '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    35
     chmod 0755 '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    36
     $(NULL)
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    37
 endif
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    38
 
691
18c2dc922e51 update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 686
diff changeset
    39
 ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
18c2dc922e51 update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 686
diff changeset
    40
 SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt))
18c2dc922e51 update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 686
diff changeset
    41
 else
805
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 804
diff changeset
    42
-SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) ddg
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    43
+SEARCHPLUGINS_NAMES = $(shell cat \
791
215db725bd82 merge from firefox33
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 787
diff changeset
    44
+  $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
805
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 804
diff changeset
    45
+  @srcdir@/en-US/searchplugins/list.txt ) ) ddg
691
18c2dc922e51 update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 686
diff changeset
    46
 endif
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    47
 SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    48
 SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES))
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    49
-PP_TARGETS += SEARCHPLUGINS
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    50
+#PP_TARGETS += SEARCHPLUGINS
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    51
 
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    52
 # Required for l10n.mk - defines a list of app sub dirs that should
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    53
 # be included in langpack xpis.
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    54
 ifdef MOZ_METRO
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    55
 # metro build, include both app folders
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    56
 DIST_SUBDIRS = browser metro
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    57
 else
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    58
 DIST_SUBDIRS = $(DIST_SUBDIR)
703
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    59
@@ -118,16 +120,39 @@ libs:: $(addprefix generic/profile/,$(PR
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    60
 
703
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    61
 libs:: $(call MERGE_FILES,$(addprefix profile/chrome/,$(PROFILE_CHROME)))
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    62
 	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile/chrome
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    63
 
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    64
 # metro build calls back here for search engine plugins
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    65
 searchplugins: $(addprefix $(FINAL_TARGET)/searchplugins/,$(SEARCHPLUGINS))
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    66
 .PHONY: searchplugins
410
0af1b0003b9f working 12.0b1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 409
diff changeset
    67
 
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    68
+tmp-search.jar.mn::
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    69
+	printf "$(AB_CD).jar:" > $@
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    70
+	printf "$(foreach plugin,$(SEARCHPLUGINS), \n locale/browser/searchplugins/$(plugin) ($(plugin)))" >> $@
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    71
+	@echo >> $@
409
ff30593d2daa switch to 12.0dev
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 289
diff changeset
    72
+
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    73
+searchplugins-jar:: $(SEARCHPLUGINS)
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    74
+	for SEARCHPLUGIN in $^; do \
709
7ce157f366c9 fix patch to use new preprocessor
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 703
diff changeset
    75
+	$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) \
7ce157f366c9 fix patch to use new preprocessor
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 703
diff changeset
    76
+	$$SEARCHPLUGIN > $$SEARCHPLUGIN-new) ; \
703
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    77
+	mv $$SEARCHPLUGIN-new $$SEARCHPLUGIN ; \
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    78
+	done
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    79
+
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    80
+searchplugins-jar:: tmp-search.jar.mn
691
18c2dc922e51 update to Firefox 27.0b2
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 686
diff changeset
    81
+	$(call py_action,jar_maker,\
703
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    82
+	$(QUIET) -j $(FINAL_TARGET)/chrome \
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    83
+	-s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    84
+	-s $(LOCALE_SRCDIR)/searchplugins \
c4aab80e472f Firefox 28.0beta1
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 691
diff changeset
    85
+	$(MAKE_JARS_FLAGS) tmp-search.jar.mn)
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    86
+
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    87
+libs:: searchplugins-jar
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    88
+
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    89
+GARBAGE += tmp-search.jar.mn
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
    90
+
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    91
 libs-%:
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    92
 	$(NSINSTALL) -D $(DIST)/install
606
9d39369e1b4c FF19beta cycle preparation (does not build yet)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 541
diff changeset
    93
 	@$(MAKE) -C ../../toolkit/locales libs-$*
9d39369e1b4c FF19beta cycle preparation (does not build yet)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 541
diff changeset
    94
 	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$*
653
38c67b6b2f37 Aurora 23 (20130616)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 650
diff changeset
    95
 ifdef MOZ_WEBAPP_RUNTIME
38c67b6b2f37 Aurora 23 (20130616)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 650
diff changeset
    96
 	@$(MAKE) -C ../../webapprt/locales AB_CD=$* XPI_NAME=locale-$*
38c67b6b2f37 Aurora 23 (20130616)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 650
diff changeset
    97
 endif
606
9d39369e1b4c FF19beta cycle preparation (does not build yet)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 541
diff changeset
    98
 	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
198
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    99
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
   100
--- a/browser/locales/jar.mn
447791e42c9b Package searchplugins into langpack chrome and load from there
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   101
+++ b/browser/locales/jar.mn
791
215db725bd82 merge from firefox33
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 787
diff changeset
   102
@@ -139,14 +139,15 @@
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
   103
     locale/browser/syncQuota.properties         (%chrome/browser/syncQuota.properties)
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
   104
 #endif
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
   105
 % locale browser-region @AB_CD@ %locale/browser-region/
220
2538fd6a51be update to 2.0b10/4.0b10
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 198
diff changeset
   106
     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
   107
 # the following files are browser-specific overrides
541
830e50bbfc79 working Aurora 17.0 build
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 515
diff changeset
   108
     locale/browser/netError.dtd                (%chrome/overrides/netError.dtd)
830e50bbfc79 working Aurora 17.0 build
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 515
diff changeset
   109
     locale/browser/appstrings.properties       (%chrome/overrides/appstrings.properties)
830e50bbfc79 working Aurora 17.0 build
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 515
diff changeset
   110
     locale/browser/downloads/settingsChange.dtd  (%chrome/overrides/settingsChange.dtd)
642
b30da62025bc 21 is now beta
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 606
diff changeset
   111
+    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
   112
 % 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
   113
 % 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
   114
 % override chrome://mozapps/locale/downloads/settingsChange.dtd chrome://browser/locale/downloads/settingsChange.dtd
467
a9baaad57fa4 refreshed patches and removed obsolete ones
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 462
diff changeset
   115
 % locale pdf.js @AB_CD@ %locale/pdfviewer/
a9baaad57fa4 refreshed patches and removed obsolete ones
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 462
diff changeset
   116
     locale/pdfviewer/viewer.properties             (%pdfviewer/viewer.properties)
653
38c67b6b2f37 Aurora 23 (20130616)
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 650
diff changeset
   117
     locale/pdfviewer/chrome.properties             (%pdfviewer/chrome.properties)