firefox-multilocale-chrome.patch
changeset 410 0af1b0003b9f
parent 409 ff30593d2daa
child 418 ecd5bb5744dc
equal deleted inserted replaced
409:ff30593d2daa 410:0af1b0003b9f
     1 # HG changeset patch
     1 # HG changeset patch
     2 # User Wolfgang Rosenauer <wr@rosenauer.org>
     2 # User Wolfgang Rosenauer <wr@rosenauer.org>
     3 # Parent cc2dd10c3b24c5fceeaf318e00cc1264f99edba2
     3 # Parent de9c23d6bfd0b0a30aa3dfc55377658756ec6f70
     4 Add searchplugins to chrome packaging for proper localization
     4 Add searchplugins to chrome packaging for proper localization
     5 
     5 
     6 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
     6 diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
     7 --- a/browser/app/profile/firefox.js
     7 --- a/browser/app/profile/firefox.js
     8 +++ b/browser/app/profile/firefox.js
     8 +++ b/browser/app/profile/firefox.js
    28  pref("browser.search.order.3",                "chrome://browser-region/locale/region.properties");
    28  pref("browser.search.order.3",                "chrome://browser-region/locale/region.properties");
    29  
    29  
    30 diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
    30 diff --git a/browser/locales/Makefile.in b/browser/locales/Makefile.in
    31 --- a/browser/locales/Makefile.in
    31 --- a/browser/locales/Makefile.in
    32 +++ b/browser/locales/Makefile.in
    32 +++ b/browser/locales/Makefile.in
    33 @@ -153,17 +153,41 @@ libs:: $(call MERGE_FILES,$(addprefix pr
    33 @@ -153,39 +153,48 @@ libs:: $(call MERGE_FILES,$(addprefix pr
    34  install:: $(DESTDIR)$(mozappdir)/defaults/profile/bookmarks.html ;
    34  install:: $(DESTDIR)$(mozappdir)/defaults/profile/bookmarks.html ;
    35  
    35  
    36  install:: $(addprefix generic/profile/,$(PROFILE_FILES))
    36  install:: $(addprefix generic/profile/,$(PROFILE_FILES))
    37  	$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
    37  	$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/defaults/profile
    38  
    38  
    41  
    41  
    42 -SEARCH_PLUGINS = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt))
    42 -SEARCH_PLUGINS = $(shell cat $(call MERGE_FILE,/searchplugins/list.txt))
    43 +SEARCH_PLUGINS = $(shell cat \
    43 +SEARCH_PLUGINS = $(shell cat \
    44 +	$(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
    44 +	$(firstword $(wildcard $(LOCALE_SRCDIR)/searchplugins/list.txt) \
    45 +	@srcdir@/en-US/searchplugins/list.txt ) )
    45 +	@srcdir@/en-US/searchplugins/list.txt ) )
    46 +
    46  
       
    47 -libs:: $(addsuffix .xml,$(SEARCH_PLUGINS))
       
    48 -	$(NSINSTALL) -D $(FINAL_TARGET)/searchplugins
       
    49 -	for SEARCH_PLUGIN in $^; do\
       
    50 -	  SEARCH_PLUGIN_BASE=`basename $$SEARCH_PLUGIN`;\
    47 +tmp-search.jar.mn::
    51 +tmp-search.jar.mn::
    48 +	printf "$(AB_CD).jar:" > $@
    52 +	printf "$(AB_CD).jar:" > $@
    49 +	printf "$(foreach plugin,$(SEARCH_PLUGINS),$(subst __PLUGIN_SUBST__,$(plugin), \n locale/browser/searchplugins/__PLUGIN_SUBST__.xml (__PLUGIN_SUBST__.xml)))" >>  $@
    53 +	printf "$(foreach plugin,$(SEARCH_PLUGINS),$(subst __PLUGIN_SUBST__,$(plugin), \n locale/browser/searchplugins/__PLUGIN_SUBST__.xml (__PLUGIN_SUBST__.xml)))" >>  $@
    50 +	@echo   >> $@
    54 +	@echo   >> $@
    51 +
    55 +
    52 +searchplugins:: $(addsuffix .xml,$(SEARCH_PLUGINS))
    56 +searchplugins:: $(addsuffix .xml,$(SEARCH_PLUGINS))
    53 +	for SEARCH_PLUGIN in $^; do \
    57 +	for SEARCH_PLUGIN in $^; do \
    54 +	  $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
    58  	  $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
    55 +	    $$SEARCH_PLUGIN > $$SEARCH_PLUGIN ; \
    59 -	    $$SEARCH_PLUGIN > $(FINAL_TARGET)/searchplugins/$$SEARCH_PLUGIN_BASE; \
    56 +	done
    60 +	    $$SEARCH_PLUGIN > $$SEARCH_PLUGIN-new ; \
    57 +
    61 +	  mv $$SEARCH_PLUGIN-new $$SEARCH_PLUGIN ; \
       
    62  	done
       
    63  
       
    64 -install:: $(addsuffix .xml,$(SEARCH_PLUGINS))
       
    65 -	$(NSINSTALL) -D $(DESTDIR)$(mozappdir)/searchplugins
       
    66 -	for i in $^; do \
       
    67 -	  SEARCH_PLUGIN_BASE=`basename $$SEARCH_PLUGIN`;\
       
    68 -	  $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
       
    69 -	    $$SEARCH_PLUGIN > $(DESTDIR)$(mozappdir)/searchplugins/$$SEARCH_PLUGIN_BASE; \
       
    70 -	done
    58 +searchplugins:: tmp-search.jar.mn
    71 +searchplugins:: tmp-search.jar.mn
    59 +	$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
    72 +	$(PYTHON) $(MOZILLA_DIR)/config/JarMaker.py \
    60 +	  $(QUIET) -j $(FINAL_TARGET)/chrome \
    73 +	  $(QUIET) -j $(FINAL_TARGET)/chrome \
    61 +	  -s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \
    74 +	  -s $(topsrcdir)/$(relativesrcdir)/en-US/searchplugins \
    62 +	  -s $(LOCALE_SRCDIR)/searchplugins \
    75 +	  -s $(LOCALE_SRCDIR)/searchplugins \
    63 +	  $(MAKE_JARS_FLAGS) tmp-search.jar.mn
    76 +	  $(MAKE_JARS_FLAGS) tmp-search.jar.mn
    64 +
    77  
    65 +export:: searchplugins
    78 +export:: searchplugins
    66 +
    79 +
    67 +GARBAGE += tmp-search.jar.mn
    80 +GARBAGE += tmp-search.jar.mn
    68  
       
    69  libs:: $(addsuffix .xml,$(SEARCH_PLUGINS))
       
    70  	$(NSINSTALL) -D $(FINAL_TARGET)/searchplugins
       
    71  	for SEARCH_PLUGIN in $^; do\
       
    72  	  SEARCH_PLUGIN_BASE=`basename $$SEARCH_PLUGIN`;\
       
    73  	  $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
       
    74  	    $$SEARCH_PLUGIN > $(FINAL_TARGET)/searchplugins/$$SEARCH_PLUGIN_BASE; \
       
    75  	done
       
    76 @@ -176,16 +200,17 @@ install:: $(addsuffix .xml,$(SEARCH_PLUG
       
    77  	    $$SEARCH_PLUGIN > $(DESTDIR)$(mozappdir)/searchplugins/$$SEARCH_PLUGIN_BASE; \
       
    78  	done
       
    79  
       
    80  
    81  
    81  libs-%:
    82  libs-%:
    82  	$(NSINSTALL) -D $(DIST)/install
    83  	$(NSINSTALL) -D $(DIST)/install
    83  	@$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
    84  	@$(MAKE) -C ../../toolkit/locales libs-$* BOTH_MANIFESTS=1
    84  	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
    85  	@$(MAKE) -C ../../services/sync/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1