firefox-multilocale-chrome.patch
changeset 837 a1f740acf68e
parent 817 8ee1122377bb
child 868 284da266ec46
equal deleted inserted replaced
836:12530a091878 837:a1f740acf68e
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent 16846914f968944f991c8b12fdc38ce8fc099d73
     2 # Parent 16846914f968944f991c8b12fdc38ce8fc099d73
     3 # User Wolfgang Rosenauer <wr@rosenauer.org>
     3 # User Wolfgang Rosenauer <wr@rosenauer.org>
       
     4 # Parent  c0a406c7a6cc5edc8fb34549428866ff39ad878f
     4 Add searchplugins to chrome packaging for proper localization
     5 Add searchplugins to chrome packaging for proper localization
     5 
     6 
     6 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
     7 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
     7 --- a/browser/app/profile/firefox.js
     8 --- a/browser/app/profile/firefox.js
     8 +++ b/browser/app/profile/firefox.js
     9 +++ b/browser/app/profile/firefox.js
     9 @@ -389,16 +389,20 @@ pref("browser.helperApps.deleteTempFileO
    10 @@ -378,16 +378,20 @@ pref("browser.helperApps.deleteTempFileO
    10  #endif
    11  #endif
    11  
    12  
    12  // search engines URL
    13  // search engines URL
    13  pref("browser.search.searchEnginesURL",      "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
    14  pref("browser.search.searchEnginesURL",      "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
    14  
    15  
    17  
    18  
    18 +// Tell the search service to load search plugins from the locale JAR
    19 +// Tell the search service to load search plugins from the locale JAR
    19 +pref("browser.search.loadFromJars", true);
    20 +pref("browser.search.loadFromJars", true);
    20 +pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/");
    21 +pref("browser.search.jarURIs", "chrome://browser/locale/searchplugins/");
    21 +
    22 +
    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. 
    23  // Ordering of Search Engines in the Engine list. 
    26  pref("browser.search.order.1",                "chrome://browser-region/locale/region.properties");
    24  pref("browser.search.order.1",                "chrome://browser-region/locale/region.properties");
    27  pref("browser.search.order.2",                "chrome://browser-region/locale/region.properties");
    25  pref("browser.search.order.2",                "chrome://browser-region/locale/region.properties");
    28  pref("browser.search.order.3",                "chrome://browser-region/locale/region.properties");
    26  pref("browser.search.order.3",                "chrome://browser-region/locale/region.properties");
    29  
    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");
    30 diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
    31 diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
    31 --- a/browser/locales/Makefile.in
    32 --- a/browser/locales/Makefile.in
    32 +++ b/browser/locales/Makefile.in
    33 +++ b/browser/locales/Makefile.in
    33 @@ -66,24 +66,27 @@ STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST
    34 @@ -66,27 +66,30 @@ STUB_HOOK = $(NSINSTALL) -D '$(_ABS_DIST
    34      cp ../installer/windows/l10ngen/stub.exe '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
    35      cp ../installer/windows/l10ngen/stub.exe '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
    35      chmod 0755 '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
    36      chmod 0755 '$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_STUB_BASENAME).exe'; \
    36      $(NULL)
    37      $(NULL)
    37  endif
    38  endif
    38  
    39  
    39  ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
    40  ifeq ($(MOZ_WIDGET_TOOLKIT) $(DIST_SUBDIR),windows metro)
    40  SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt))
    41  SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/metrolist.txt))
    41  else
    42  else
    42 -SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) ddg
    43 -SEARCHPLUGINS_NAMES = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt)) ddg
    43 +SEARCHPLUGINS_NAMES = $(shell cat \
    44 +SEARCHPLUGINS_NAMES = $(shell cat \
    44 +  $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
    45 +    $(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
    45 +  @srcdir@/en-US/searchplugins/list.txt ) ) ddg
    46 +    @srcdir@/en-US/searchplugins/list.txt ) ) ddg
    46  endif
    47  endif
    47  SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins
    48  SEARCHPLUGINS_PATH := $(FINAL_TARGET)/searchplugins
    48  # metro build call a searchplugins target for search engine plugins
    49  # metro build call a searchplugins target for search engine plugins
    49  .PHONY: searchplugins
    50  .PHONY: searchplugins
    50  SEARCHPLUGINS_TARGET := libs searchplugins
    51  SEARCHPLUGINS_TARGET := libs searchplugins
    51 -SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_NAMES)),$(or $(wildcard $(call MERGE_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin))))
    52 -SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_NAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin))))
       
    53 +#SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_NAMES)),$(or $(wildcard $(call EN_US_OR_L10N_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin))))
       
    54 +SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES))
       
    55  # Some locale-specific search plugins may have preprocessor directives, but the
       
    56  # default en-US ones do not.
       
    57  SEARCHPLUGINS_FLAGS := --silence-missing-directive-warnings
    52 -PP_TARGETS += SEARCHPLUGINS
    58 -PP_TARGETS += SEARCHPLUGINS
    53 +#SEARCHPLUGINS := $(foreach plugin,$(addsuffix .xml,$(SEARCHPLUGINS_NAMES)),$(or $(wildcard $(call MERGE_FILE,searchplugins/$(plugin))),$(info Missing searchplugin: $(plugin))))
       
    54 +SEARCHPLUGINS := $(addsuffix .xml,$(SEARCHPLUGINS_NAMES))
       
    55 +#PP_TARGETS += SEARCHPLUGINS
    59 +#PP_TARGETS += SEARCHPLUGINS
    56  
    60  
    57  # Required for l10n.mk - defines a list of app sub dirs that should
    61  # Required for l10n.mk - defines a list of app sub dirs that should
    58  # be included in langpack xpis.
    62  # be included in langpack xpis.
    59  ifdef MOZ_METRO
    63  ifdef MOZ_METRO
    60  # metro build, include both app folders
    64  # metro build, include both app folders
    61  DIST_SUBDIRS = browser metro
    65  DIST_SUBDIRS = browser metro
    62  else
    66  else
    63  DIST_SUBDIRS = $(DIST_SUBDIR)
    67  DIST_SUBDIRS = $(DIST_SUBDIR)
    64 @@ -117,16 +120,39 @@ NO_JA_JP_MAC_AB_CD := $(if $(filter ja-J
    68 @@ -120,16 +123,39 @@ NO_JA_JP_MAC_AB_CD := $(if $(filter ja-J
    65  libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ;
    69  libs:: $(FINAL_TARGET)/defaults/profile/bookmarks.html ;
    66  
    70  
    67  libs:: $(addprefix generic/profile/,$(PROFILE_FILES))
    71  libs:: $(addprefix generic/profile/,$(PROFILE_FILES))
    68  	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
    72  	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/defaults/profile
    69  
    73  
   102  endif
   106  endif
   103  	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
   107  	@$(MAKE) -C ../../extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
   104 diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
   108 diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
   105 --- a/browser/locales/jar.mn
   109 --- a/browser/locales/jar.mn
   106 +++ b/browser/locales/jar.mn
   110 +++ b/browser/locales/jar.mn
   107 @@ -141,14 +141,15 @@
   111 @@ -146,14 +146,15 @@
   108      locale/browser/syncQuota.properties         (%chrome/browser/syncQuota.properties)
   112      locale/browser/syncQuota.properties         (%chrome/browser/syncQuota.properties)
   109  #endif
   113  #endif
   110  % locale browser-region @AB_CD@ %locale/browser-region/
   114  % locale browser-region @AB_CD@ %locale/browser-region/
   111      locale/browser-region/region.properties        (%chrome/browser-region/region.properties)
   115      locale/browser-region/region.properties        (%chrome/browser-region/region.properties)
   112  # the following files are browser-specific overrides
   116  # the following files are browser-specific overrides