[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [torbrowser/master] Really fix omnibox: Add region.properties to omni.ja and langpacks.



commit d44af3f0f411eb2bc71dbbd6f7962544c19dc7c9
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date:   Mon Feb 11 17:10:06 2013 -0800

    Really fix omnibox: Add region.properties to omni.ja and langpacks.
---
 build-scripts/config/region.properties |   49 ++++++++++++++++++++++++++++++++
 build-scripts/linux-alpha.mk           |   43 ++++++++++++++++++----------
 build-scripts/osx-alpha.mk             |   41 +++++++++++++++++---------
 build-scripts/windows-alpha.mk         |   44 +++++++++++++++++++----------
 4 files changed, 133 insertions(+), 44 deletions(-)

diff --git a/build-scripts/config/region.properties b/build-scripts/config/region.properties
new file mode 100644
index 0000000..9c21f04
--- /dev/null
+++ b/build-scripts/config/region.properties
@@ -0,0 +1,49 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Default search engine
+browser.search.defaultenginename=Startpage
+
+# Search engine order (order displayed in the search bar dropdown)s
+browser.search.order.1=Startpage
+browser.search.order.2=DuckDuckGo
+browser.search.order.3=Google
+
+# This is the default set of web based feed handlers shown in the reader
+# selection UI
+browser.contentHandlers.types.0.title=Google
+browser.contentHandlers.types.0.uri=http://fusion.google.com/add?feedurl=%s
+browser.contentHandlers.types.1.title=My Yahoo!
+browser.contentHandlers.types.1.uri=http://add.my.yahoo.com/rss?url=%s
+
+# URL for site-specific search engines
+# TRANSLATION NOTE: {moz:domain} and {searchTerms} are placeholders for the site
+# to be searched and the user's search query. Place them in the appropriate location
+# for your locale's URL but do not translate them.
+browser.search.siteSearchURL=https://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&q=site%3A{moz:domain}+{searchTerms}
+
+# increment this number when anything gets changed in the list below.  This will
+# cause Firefox to re-read these prefs and inject any new handlers into the 
+# profile database.  Note that "new" is defined as "has a different URL"; this
+# means that it's not possible to update the name of existing handler, so 
+# don't make any spelling errors here.
+gecko.handlerService.defaultHandlersVersion=3
+
+# The default set of protocol handlers for webcal:
+gecko.handlerService.schemes.webcal.0.name=30 Boxes
+gecko.handlerService.schemes.webcal.0.uriTemplate=http://30boxes.com/external/widget?refer=ff&url=%s
+
+# The default set of protocol handlers for mailto:
+gecko.handlerService.schemes.mailto.0.name=Yahoo! Mail
+gecko.handlerService.schemes.mailto.0.uriTemplate=http://compose.mail.yahoo.com/?To=%s 
+gecko.handlerService.schemes.mailto.1.name=Gmail
+gecko.handlerService.schemes.mailto.1.uriTemplate=https://mail.google.com/mail/?extsrc=mailto&url=%s
+
+# The default set of protocol handlers for irc:
+gecko.handlerService.schemes.irc.0.name=Mibbit
+gecko.handlerService.schemes.irc.0.uriTemplate=https://www.mibbit.com/?url=%s
+
+# The default set of protocol handlers for ircs:
+gecko.handlerService.schemes.ircs.0.name=Mibbit
+gecko.handlerService.schemes.ircs.0.uriTemplate=https://www.mibbit.com/?url=%s
diff --git a/build-scripts/linux-alpha.mk b/build-scripts/linux-alpha.mk
index 069b685..182087c 100644
--- a/build-scripts/linux-alpha.mk
+++ b/build-scripts/linux-alpha.mk
@@ -324,14 +324,21 @@ configure-apps:
 	mkdir -p $(DEST)/Data/profile/preferences
 	cp config/extension-overrides.js $(DEST)/Data/profile/preferences
 
-	## Patch Firefox default home page
-	CHROME_EN_DIR=$(APPDIR)/Firefox/chrome/en-US;							\
-	mkdir -p "$$CHROME_EN_DIR/locale/branding";								\
-	sed -e "s/SHPONKA/en-US/g" config/browserconfig.properties				\
-		> "$$CHROME_EN_DIR/locale/branding/browserconfig.properties";		\
-	(cd $(APPDIR)/Firefox;													\
-		zip -u omni.ja chrome/en-US/locale/branding/browserconfig.properties); \
-	rm -rf "$$CHROME_EN_DIR"
+	## Patch Firefox default home page and omnibox
+	LC="en-US";															\
+	PFILE="omni.ja";													\
+	FFDIR=$(APPDIR)/Firefox/;											\
+	CHROMEDIR="$$FFDIR/chrome/";									\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/branding";							\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/browser-region";						\
+	cp config/region.properties											\
+		"$$CHROMEDIR/$$LC/locale/browser-region/";							\
+	sed -e "s/SHPONKA/$$LC/g" config/browserconfig.properties				\
+		> "$$CHROMEDIR/$$LC/locale/branding/browserconfig.properties";		\
+	(cd "$$FFDIR";													\
+		zip -u "$$PFILE" "chrome/$$LC/locale/branding/browserconfig.properties" \
+                       "chrome/$$LC/locale/browser-region/region.properties"); \
+	rm -rf "$$CHROMEDIR"
 
 	## Configure Pidgin
 ifeq ($(USE_PIDGIN),1)
@@ -428,13 +435,19 @@ ifneq ($(LANGCODE), en-US)
 	mkdir -p $(BUNDLE)/Data/profile/extensions
 	cp langpack_$(LANGCODE).xpi $(BUNDLE)/Data/profile/extensions/langpack-$(LANGCODE)@firefox.mozilla.org.xpi
 	## Patch Firefox default home page within language pack
-	CHROMEDIR=$(BUNDLE)/Data/profile/extensions/chrome;						\
-	mkdir -p "$$CHROMEDIR";													\
-	sed -e "s/SHPONKA/$(LANGCODE)/g" config/browserconfig.properties		\
-		> "$$CHROMEDIR/$(LANGCODE)/locale/branding/browserconfig.properties"; \
-	(cd $(BUNDLE)/FirefoxPortable/Data/profile/extensions;					\
-		zip -u langpack-$(LANGCODE)@firefox.mozilla.org.xpi					\
-		chrome/$(LANGCODE)/locale/branding/browserconfig.properties);		\
+	LC=$(LANGCODE);															\
+	PFILE=langpack-$(LANGCODE)@firefox.mozilla.org.xpi;						\
+	FFDIR=$(BUNDLE)/Data/profile/extensions/;								\
+	CHROMEDIR="$$FFDIR/chrome/";											\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/branding";							\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/browser-region";						\
+	cp config/region.properties											\
+		"$$CHROMEDIR/$$LC/locale/browser-region/";							\
+	sed -e "s/SHPONKA/$$LC/g" config/browserconfig.properties				\
+		> "$$CHROMEDIR/$$LC/locale/branding/browserconfig.properties";		\
+	(cd "$$FFDIR";													\
+		zip -u "$$PFILE" "chrome/$$LC/locale/branding/browserconfig.properties" \
+                       "chrome/$$LC/locale/browser-region/region.properties"); \
 	rm -rf "$$CHROMEDIR"
 endif
 
diff --git a/build-scripts/osx-alpha.mk b/build-scripts/osx-alpha.mk
index fc281b3..6d12ae4 100644
--- a/build-scripts/osx-alpha.mk
+++ b/build-scripts/osx-alpha.mk
@@ -326,13 +326,20 @@ configure-apps:
 	## Override Firefox extension preferences
 	mkdir -p $(DEST)/Contents/MacOS/TorBrowser.app/Contents/MacOS/Data/profile/preferences
 	cp config/extension-overrides.js $(DEST)/Contents/MacOS/TorBrowser.app/Contents/MacOS/Data/profile/preferences/
-	## Patch Firefox default home page
-	CHROMEDIR=$(DEST)/Contents/MacOS/TorBrowser.app/Contents/MacOS/chrome;	\
-	mkdir -p "$$CHROMEDIR/en-US/locale/branding";							\
-	sed -e "s/SHPONKA/en-US/g" config/browserconfig.properties				\
-		> "$$CHROMEDIR/en-US/locale/branding/browserconfig.properties";		\
-	(cd $(DEST)/Contents/MacOS/TorBrowser.app/Contents/MacOS;				\
-		zip -u omni.ja chrome/en-US/locale/branding/browserconfig.properties);\
+	## Patch Firefox default home page and omnibox
+	LC="en-US";															\
+	PFILE="omni.ja";													\
+	FFDIR=$(DEST)/Contents/MacOS/TorBrowser.app/Contents/MacOS/;			\
+	CHROMEDIR="$$FFDIR/chrome/";									\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/branding";							\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/browser-region";						\
+	cp config/region.properties											\
+		"$$CHROMEDIR/$$LC/locale/browser-region/";							\
+	sed -e "s/SHPONKA/$$LC/g" config/browserconfig.properties				\
+		> "$$CHROMEDIR/$$LC/locale/branding/browserconfig.properties";		\
+	(cd "$$FFDIR";													\
+		zip -u "$$PFILE" "chrome/$$LC/locale/branding/browserconfig.properties" \
+                       "chrome/$$LC/locale/browser-region/region.properties"); \
 	rm -rf "$$CHROMEDIR"
 
 	cp config/Info.plist $(DEST)/Contents
@@ -424,13 +431,19 @@ ifneq ($(LANGCODE), en-US)
 	mkdir -p $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/
 	cp langpack_$(LANGCODE).xpi $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/langpack-$(LANGCODE)@firefox.mozilla.org.xpi
 	## Patch Firefox default home page within language pack
-	CHROMEDIR=$(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/chrome; \
-	mkdir -p "$$CHROMEDIR/$(LANGCODE)/locale/branding";						\
-	sed -e "s/SHPONKA/$(LANGCODE)/g" config/browserconfig.properties		\
-		> "$$CHROMEDIR/$(LANGCODE)/locale/branding/browserconfig.properties"; \
-	(cd $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/; \
-			zip -u langpack-$(LANGCODE)@firefox.mozilla.org.xpi				\
-			chrome/$(LANGCODE)/locale/branding/browserconfig.properties);	\
+	LC=$(LANGCODE);															\
+	PFILE=langpack-$(LANGCODE)@firefox.mozilla.org.xpi;						\
+	FFDIR=$(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/;	\
+	CHROMEDIR="$$FFDIR/chrome/";											\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/branding";							\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/browser-region";						\
+	cp config/region.properties											\
+		"$$CHROMEDIR/$$LC/locale/browser-region/";							\
+	sed -e "s/SHPONKA/$$LC/g" config/browserconfig.properties				\
+		> "$$CHROMEDIR/$$LC/locale/branding/browserconfig.properties";		\
+	(cd "$$FFDIR";													\
+		zip -u "$$PFILE" "chrome/$$LC/locale/branding/browserconfig.properties" \
+                       "chrome/$$LC/locale/browser-region/region.properties"); \
 	rm -rf "$$CHROMEDIR"
 
 endif
diff --git a/build-scripts/windows-alpha.mk b/build-scripts/windows-alpha.mk
index cc48da9..8131b88 100644
--- a/build-scripts/windows-alpha.mk
+++ b/build-scripts/windows-alpha.mk
@@ -326,14 +326,21 @@ configure-apps:
 	cp config/extension-overrides.js										\
 		$(DEST)/FirefoxPortable/Data/profile/preferences/
 
-	## Patch Firefox default home page
-	CHROMEDIR=$(DEST)/FirefoxPortable/App/Firefox/chrome;					\
-	mkdir -p "$$CHROMEDIR/en-US/locale/branding";							\
-	sed -e "s/SHPONKA/en-US/g" config/browserconfig.properties				\
-		> "$$CHROMEDIR/en-US/locale/branding/browserconfig.properties";		\
-	(cd $(DEST)/FirefoxPortable/App/Firefox;								\
-		$(SEVENZIP) u -tzip omni.ja											\
-		chrome/en-US/locale/branding/browserconfig.properties);				\
+	## Patch Firefox default home page and omnibox
+	LC="en-US";															\
+	PFILE="omni.ja";													\
+	FFDIR=$(DEST)/FirefoxPortable/App/Firefox/;								\
+	CHROMEDIR="$$FFDIR/chrome/";									\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/branding";							\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/browser-region";						\
+	cp config/region.properties											\
+		"$$CHROMEDIR/$$LC/locale/browser-region/";							\
+	sed -e "s/SHPONKA/$$LC/g" config/browserconfig.properties				\
+		> "$$CHROMEDIR/$$LC/locale/branding/browserconfig.properties";		\
+	(cd "$$FFDIR";													\
+		$(SEVENZIP) u -tzip "$$PFILE"										\
+                       "chrome/$$LC/locale/branding/browserconfig.properties" \
+                       "chrome/$$LC/locale/browser-region/region.properties"); \
 	rm -rf "$$CHROMEDIR"
 
 	## Set up alternate launcher
@@ -409,13 +416,20 @@ install-extensions: $(filter-out langpack_en-US.xpi,langpack_$(LANGCODE).xpi)
 ifneq ($(LANGCODE), en-US)
 	mv langpack_$(LANGCODE).xpi $(BUNDLE)/FirefoxPortable/Data/profile/extensions/langpack-$(LANGCODE)@firefox.mozilla.org.xpi
 	## Patch Firefox default home page within language pack
-	CHROMEDIR=$(BUNDLE)/FirefoxPortable/Data/profile/extensions/chrome;		\
-	mkdir -p "$$CHROMEDIR/$(LANGCODE)/locale/branding";						\
-	sed -e "s/SHPONKA/$(LANGCODE)/g" config/browserconfig.properties		\
-		> "$$CHROMEDIR/$(LANGCODE)/locale/branding/browserconfig.properties"; \
-	(cd $(BUNDLE)/FirefoxPortable/Data/profile/extensions;					\
-		$(SEVENZIP) u -tzip langpack-$(LANGCODE)@firefox.mozilla.org.xpi	\
-		chrome/$(LANGCODE)/locale/branding/browserconfig.properties);		\
+	LC=$(LANG);															\
+	PFILE=langpack-$(LANGCODE)@firefox.mozilla.org.xpi;						\
+	FFDIR=$(BUNDLE)/FirefoxPortable/Data/profile/extensions/;				\
+	CHROMEDIR="$$FFDIR/chrome/";									\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/branding";							\
+	mkdir -p "$$CHROMEDIR/$$LC/locale/browser-region";						\
+	cp config/region.properties											\
+		"$$CHROMEDIR/$$LC/locale/browser-region/";							\
+	sed -e "s/SHPONKA/$$LC/g" config/browserconfig.properties				\
+		> "$$CHROMEDIR/$$LC/locale/branding/browserconfig.properties";		\
+	(cd "$$FFDIR";													\
+		$(SEVENZIP) u -tzip "$$PFILE"										\
+                       "chrome/$$LC/locale/branding/browserconfig.properties" \
+                       "chrome/$$LC/locale/browser-region/region.properties"); \
 	rm -rf "$$CHROMEDIR"
 endif
 	rm -fr $(DUMMYPROFILE)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits