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