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

[or-cvs] r12876: Add prefs.js for zh-CN and fa-IR languages Update Makefile t (in torpedo/trunk: . build-scripts build-scripts/config)



Author: sjm217
Date: 2007-12-19 17:30:41 -0500 (Wed, 19 Dec 2007)
New Revision: 12876

Added:
   torpedo/trunk/build-scripts/config/prefs_fa.js
   torpedo/trunk/build-scripts/config/prefs_zh-cn.js
Modified:
   torpedo/trunk/README
   torpedo/trunk/build-scripts/Makefile
   torpedo/trunk/build-scripts/README
Log:
Add prefs.js for zh-CN and fa-IR languages
Update Makefile to install language packs
Add Makefile rule for installing Quick Locale Switcher


Modified: torpedo/trunk/README
===================================================================
--- torpedo/trunk/README	2007-12-19 22:15:44 UTC (rev 12875)
+++ torpedo/trunk/README	2007-12-19 22:30:41 UTC (rev 12876)
@@ -66,3 +66,6 @@
        Add bookmarks to Tor, Torcheck and the hidden wiki
 0.0.3: Move build infrastructure to GNU Make (2007-12-16)
        Install Torbutton
+0.0.4: Add internationalization for fa-IR and zh-CN
+       Add Makefile rule for installing Quick Locale Switcher, but
+       don't enable this by default

Modified: torpedo/trunk/build-scripts/Makefile
===================================================================
--- torpedo/trunk/build-scripts/Makefile	2007-12-19 22:15:44 UTC (rev 12875)
+++ torpedo/trunk/build-scripts/Makefile	2007-12-19 22:30:41 UTC (rev 12876)
@@ -51,8 +51,11 @@
 $(TORBUTTON):
 	wget http://torbutton.torproject.org/dev/releases/$(TORBUTTON)
 
-bundle: package-files patch-language
+bundle: package-files install-torbutton patch-language launcher
 
+launcher:
+	echo 'start /b .\\App\\vidalia.exe --datadir .\\Data\\Vidalia\\' > $(DEST)/"Tor Browser.bat"
+
 ## This dummy profile is created just for installing extensions, otherwise Firefox
 ## will output files in the default one
 DUMMYPROFILE=$(DEST)/FirefoxPortable/App/DummyProfile
@@ -79,19 +82,60 @@
 	cp -R $(BINARIES)/* $(DEST)/App
 	## Copy over documentation
 	cp -R $(DOCS)/* $(DEST)/Docs
-	## Install torbutton (TODO: add -no-remote if Firefox is running?)
+
+## Install torbutton (TODO: add -no-remote if Firefox is running?)
+install-torbutton:
+	## Make a dummy profile to stop Firefox creating some large files
 	cp -R $(DEST)/FirefoxPortable/App/DefaultData $(DUMMYPROFILE)
 	$(DEST)/FirefoxPortable/App/firefox/firefox.exe \
          -profile $(DUMMYPROFILE) \
          -install-global-extension $(TORBUTTON)
 	rm -fr $(DUMMYPROFILE)
-	## Write out launcher
-	echo 'start /b .\\App\\vidalia.exe --datadir .\\Data\\Vidalia\\' > $(DEST)/"Tor Browser.bat"
 
-## Set the language for Vidalia
+## Install Quick Locale Switcher extension
+install-qls: quick_locale_switcher.xpi
+	## Make a dummy profile to stop Firefox creating some large files
+	cp -R $(DEST)/FirefoxPortable/App/DefaultData $(DUMMYPROFILE)
+	$(DEST)/FirefoxPortable/App/firefox/firefox.exe \
+         -profile $(DUMMYPROFILE) \
+         -install-global-extension $<
+	rm -fr $(DUMMYPROFILE)
+
+## Download language packs
+langpack_fa.xpi:
+	wget -O $@ https://addons.mozilla.org/en-US/firefox/downloads/file/18157/persian_language_pack-2.0.0.6-fx.xpi
+
+langpack_zh-cn.xpi:
+	wget -O $@ http://releases.mozilla.org/pub/mozilla.org/firefox/releases/2.0.0.11/win32/xpi/zh-CN.xpi
+
+## Download Quick Locale Switcher
+quick_locale_switcher.xpi:
+	wget -O $@ https://addons.mozilla.org/en-US/firefox/downloads/file/20672/quick_locale_switcher-1.6.3.7-fx+mz+tb+sb+nvu+ns+sm+fl.xpi
+
+## Set the language for Vidalia and Firefox
+## Currently supported: en: English; fa: Farsi; zh-cn: Chinese simplified
 LANGCODE?=en
 patch-language:
+	## Patch Vidalia
 	./patch-language.sh $(DEST)/Data/Vidalia/vidalia.conf $(LANGCODE)
+	## Download the required language pack
+	rm -f langpack.xpi
+ifeq ($(LANGCODE),fa)
+	make langpack_fa.xpi
+	cp langpack_fa.xpi langpack.xpi
+	cp $(CONFIG_SRC)/prefs_fa.js $(DEST)/FirefoxPortable/App/DefaultData/profile/prefs.js
+endif
+ifeq ($(LANGCODE),zh-cn)
+	make langpack_zh-cn.xpi
+	cp langpack_zh-cn.xpi langpack.xpi
+	cp $(CONFIG_SRC)/prefs_zh-cn.js $(DEST)/FirefoxPortable/App/DefaultData/profile/prefs.js
+endif
+	## Install the language pack if exists
+	cp -R $(DEST)/FirefoxPortable/App/DefaultData $(DUMMYPROFILE)
+	$(DEST)/FirefoxPortable/App/firefox/firefox.exe \
+         -profile $(DUMMYPROFILE) \
+         -install-global-extension langpack.xpi
+	rm -fr $(DUMMYPROFILE)
 
 ## Copy Firefox preferences from a run of FirefoxPortable to be the default
 apply-prefs:

Modified: torpedo/trunk/build-scripts/README
===================================================================
--- torpedo/trunk/build-scripts/README	2007-12-19 22:15:44 UTC (rev 12875)
+++ torpedo/trunk/build-scripts/README	2007-12-19 22:30:41 UTC (rev 12876)
@@ -19,10 +19,12 @@
 Building the bundle
 -------------------
 
+Firefox must not be running while you are building the bundle
+
 Run "make bundle"
 
 To specify a different language configuration, set $LANGCODE,
-e.g. "LANGCODE=fa make bundle"
+e.g. "LANGCODE=fa make bundle" or "LANGCODE=zh-cn make bundle"
 
 To compress it, run "make compress-bundle"
 

Added: torpedo/trunk/build-scripts/config/prefs_fa.js
===================================================================
--- torpedo/trunk/build-scripts/config/prefs_fa.js	                        (rev 0)
+++ torpedo/trunk/build-scripts/config/prefs_fa.js	2007-12-19 22:30:41 UTC (rev 12876)
@@ -0,0 +1,60 @@
+# Mozilla User Preferences
+
+/* Do not edit this file.
+ *
+ * If you make changes to this file while the application is running,
+ * the changes will be overwritten when the application exits.
+ *
+ * To make a manual change to preferences, you can visit the URL about:config
+ * For more information, see http://www.mozilla.org/unix/customizing.html#prefs
+ */
+
+user_pref("app.update.auto", false);
+user_pref("app.update.enabled", false);
+user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1197218150);
+user_pref("app.update.lastUpdateTime.background-update-timer", 1197218149);
+user_pref("app.update.lastUpdateTime.blocklist-background-update-timer", 1197218150);
+user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1197218171);
+user_pref("browser.cache.disk.capacity", 0);
+user_pref("browser.cache.disk.enable", false);
+user_pref("browser.download.manager.retention", 0);
+user_pref("browser.download.useDownloadDir", false);
+user_pref("browser.formfill.enable", false);
+user_pref("browser.preferences.advanced.selectedTabIndex", 0);
+user_pref("browser.search.suggest.enabled", false);
+user_pref("browser.search.update", false);
+user_pref("browser.shell.checkDefaultBrowser", false);
+user_pref("browser.startup.homepage", "http://check.torproject.org/";);
+user_pref("browser.startup.homepage_override.mstone", "rv:1.8.1.11");
+user_pref("dom.storage.enabled", false);
+user_pref("extensions.lastAppVersion", "2.0.0.11");
+user_pref("extensions.torbutton.saved.share_proxy_settings", false);
+user_pref("extensions.torbutton.saved.socks_remote_dns", false);
+user_pref("extensions.torbutton.saved.socks_version", 5);
+user_pref("extensions.torbutton.socks_host", "localhost");
+user_pref("extensions.torbutton.socks_port", 9050);
+user_pref("extensions.torbutton.tor_enabled", true);
+user_pref("extensions.torbutton.use_privoxy", false);
+user_pref("extensions.update.enabled", false);
+user_pref("extensions.update.notifyUser", false);
+user_pref("general.appname.override", "Netscape");
+user_pref("general.appversion.override", "5.0 (Windows; en-US)");
+user_pref("general.platform.override", "Win32");
+user_pref("general.useragent.locale", "fa-IR");
+user_pref("general.useragent.override", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7");
+user_pref("general.useragent.vendor", "");
+user_pref("general.useragent.vendorSub", "");
+user_pref("intl.accept_languages", "en-us, en");
+user_pref("intl.charsetmenu.browser.cache", "ISO-8859-1, UTF-8");
+user_pref("network.cookie.lifetimePolicy", 2);
+user_pref("network.cookie.prefsMigrated", true);
+user_pref("network.proxy.socks", "localhost");
+user_pref("network.proxy.socks_port", 9050);
+user_pref("network.proxy.socks_remote_dns", true);
+user_pref("network.proxy.type", 1);
+user_pref("security.enable_java", false);
+user_pref("signon.rememberSignons", false);
+user_pref("urlclassifier.tableversion.goog-black-enchash", "1.40332");
+user_pref("urlclassifier.tableversion.goog-black-url", "1.16969");
+user_pref("urlclassifier.tableversion.goog-white-domain", "1.23");
+user_pref("urlclassifier.tableversion.goog-white-url", "1.371");

Added: torpedo/trunk/build-scripts/config/prefs_zh-cn.js
===================================================================
--- torpedo/trunk/build-scripts/config/prefs_zh-cn.js	                        (rev 0)
+++ torpedo/trunk/build-scripts/config/prefs_zh-cn.js	2007-12-19 22:30:41 UTC (rev 12876)
@@ -0,0 +1,60 @@
+# Mozilla User Preferences
+
+/* Do not edit this file.
+ *
+ * If you make changes to this file while the application is running,
+ * the changes will be overwritten when the application exits.
+ *
+ * To make a manual change to preferences, you can visit the URL about:config
+ * For more information, see http://www.mozilla.org/unix/customizing.html#prefs
+ */
+
+user_pref("app.update.auto", false);
+user_pref("app.update.enabled", false);
+user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1197218150);
+user_pref("app.update.lastUpdateTime.background-update-timer", 1197218149);
+user_pref("app.update.lastUpdateTime.blocklist-background-update-timer", 1197218150);
+user_pref("app.update.lastUpdateTime.search-engine-update-timer", 1197218171);
+user_pref("browser.cache.disk.capacity", 0);
+user_pref("browser.cache.disk.enable", false);
+user_pref("browser.download.manager.retention", 0);
+user_pref("browser.download.useDownloadDir", false);
+user_pref("browser.formfill.enable", false);
+user_pref("browser.preferences.advanced.selectedTabIndex", 0);
+user_pref("browser.search.suggest.enabled", false);
+user_pref("browser.search.update", false);
+user_pref("browser.shell.checkDefaultBrowser", false);
+user_pref("browser.startup.homepage", "http://check.torproject.org/";);
+user_pref("browser.startup.homepage_override.mstone", "rv:1.8.1.11");
+user_pref("dom.storage.enabled", false);
+user_pref("extensions.lastAppVersion", "2.0.0.11");
+user_pref("extensions.torbutton.saved.share_proxy_settings", false);
+user_pref("extensions.torbutton.saved.socks_remote_dns", false);
+user_pref("extensions.torbutton.saved.socks_version", 5);
+user_pref("extensions.torbutton.socks_host", "localhost");
+user_pref("extensions.torbutton.socks_port", 9050);
+user_pref("extensions.torbutton.tor_enabled", true);
+user_pref("extensions.torbutton.use_privoxy", false);
+user_pref("extensions.update.enabled", false);
+user_pref("extensions.update.notifyUser", false);
+user_pref("general.appname.override", "Netscape");
+user_pref("general.appversion.override", "5.0 (Windows; en-US)");
+user_pref("general.platform.override", "Win32");
+user_pref("general.useragent.locale", "zh-CN");
+user_pref("general.useragent.override", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7");
+user_pref("general.useragent.vendor", "");
+user_pref("general.useragent.vendorSub", "");
+user_pref("intl.accept_languages", "en-us, en");
+user_pref("intl.charsetmenu.browser.cache", "ISO-8859-1, UTF-8");
+user_pref("network.cookie.lifetimePolicy", 2);
+user_pref("network.cookie.prefsMigrated", true);
+user_pref("network.proxy.socks", "localhost");
+user_pref("network.proxy.socks_port", 9050);
+user_pref("network.proxy.socks_remote_dns", true);
+user_pref("network.proxy.type", 1);
+user_pref("security.enable_java", false);
+user_pref("signon.rememberSignons", false);
+user_pref("urlclassifier.tableversion.goog-black-enchash", "1.40332");
+user_pref("urlclassifier.tableversion.goog-black-url", "1.16969");
+user_pref("urlclassifier.tableversion.goog-white-domain", "1.23");
+user_pref("urlclassifier.tableversion.goog-white-url", "1.371");