From 90bfcacfe5e4b9e64e3908b942a531d5891ff6c4 Mon Sep 17 00:00:00 2001 From: "tao%netscape.com" Date: Fri, 23 Feb 2001 08:34:10 +0000 Subject: [PATCH] 62171: "Separate content from UI". Split langenus.xpi into regus.xpi. browser: (r=pchen,sr=alecf), mailnews: (r=yamamoto,sr=sspitzer), editor: (r=cmonske,sr=sfraser), xpinstall (r=ssu,sr=dveditz). --- build/mac/build_scripts/MozillaBuildList.pm | 6 +- editor/Makefile.in | 2 + editor/jar.mn | 4 + editor/makefile.win | 2 + editor/ui/composer.js | 2 +- .../ui/composer/content/contents-region.rdf | 16 ++++ .../composer/locale/en-US/contents-region.rdf | 21 +++++ .../composer/locale/en-US/editor.properties | 4 - .../composer/locale/en-US/region.properties | 4 + mailnews/Makefile.in | 2 + .../resources/content/contents-region.rdf | 16 ++++ .../locale/en-US/contents-region.rdf | 21 +++++ .../locale/en-US/messenger.properties | 8 -- .../resources/locale/en-US/region.properties | 8 ++ mailnews/jar.mn | 5 + mailnews/mailnews.js | 10 +- mailnews/makefile.win | 2 + modules/libpref/src/init/all.js | 2 +- modules/libpref/src/init/config.js | 2 +- modules/libpref/src/init/editor.js | 2 +- modules/libpref/src/init/mailnews.js | 10 +- modules/plugin/base/src/nsPluginHostImpl.cpp | 20 ++-- modules/plugin/nglsrc/nsPluginHostImpl.cpp | 20 ++-- netwerk/protocol/http/src/nsHTTPHandler.cpp | 6 +- profile/defaults/Makefile.in | 2 +- profile/defaults/makefile.win | 2 +- xpfe/browser/Makefile.in | 2 + xpfe/browser/jar.mn | 7 ++ xpfe/browser/makefile.win | 2 + .../resources/content/contents-region.rdf | 16 ++++ xpfe/browser/resources/content/navigator.js | 12 ++- xpfe/browser/resources/content/navigator.xul | 2 + .../resources/content/openLocation.xul | 92 +++++++++++++++++++ .../locale/en-US/contents-region.rdf | 21 +++++ .../locale/en-US/navigator.properties | 11 --- .../resources/locale/en-US/region.properties | 25 +++++ xpfe/communicator/Makefile.in | 2 + xpfe/communicator/jar.mn | 6 ++ xpfe/communicator/makefile.win | 2 + .../resources/content/builtinURLs.js | 4 +- .../resources/content/contents-region.rdf | 16 ++++ .../resources/content/taskbarOverlay.xul | 4 +- .../resources/content/utilityOverlay.js | 3 +- .../locale/en-US/contents-region.rdf | 21 +++++ .../resources/locale/en-US/region.dtd | 3 + .../resources/content/pref-smart_browsing.xul | 2 +- .../locale/en-US/search-panel.properties | 2 - .../search/resources/search-panel.js | 10 +- .../search/resources/search-panel.xul | 1 + .../timebomb/resources/content/expireText.xul | 7 +- .../timebomb/resources/content/warn.xul | 7 +- .../resources/locale/en-US/timebomb.dtd | 2 - .../locale/en-US/downloadProgress.properties | 3 - xpfe/global/Makefile.in | 2 + xpfe/global/jar.mn | 8 +- xpfe/global/makefile.win | 2 + .../resources/content/contents-region.rdf | 17 ++++ xpfe/global/resources/locale/en-US/brand.dtd | 1 - .../resources/locale/en-US/brand.properties | 3 - .../locale/en-US/contents-region.rdf | 22 +++++ xpfe/global/resources/locale/en-US/region.dtd | 2 + .../resources/locale/en-US/region.properties | 10 ++ xpinstall/packager/mac/browser.jst | 5 + xpinstall/packager/mac/deflenus.jst | 4 +- xpinstall/packager/mac/mail.jst | 3 + xpinstall/packager/mac/regus.jst | 47 ++++++++++ xpinstall/packager/packages-mac | 9 +- xpinstall/packager/packages-unix | 9 +- xpinstall/packager/packages-win | 9 +- xpinstall/packager/unix/browser.jst | 5 + xpinstall/packager/unix/config.it | 13 +++ xpinstall/packager/unix/deflenus.jst | 4 +- xpinstall/packager/unix/mail.jst | 4 + xpinstall/packager/unix/makeall.pl | 1 + xpinstall/packager/unix/regus.jst | 47 ++++++++++ xpinstall/packager/windows/browser.jst | 4 + xpinstall/packager/windows/config.it | 15 +++ xpinstall/packager/windows/mail.jst | 3 + xpinstall/packager/windows/makeall.pl | 3 +- xpinstall/packager/windows/regus.jst | 50 ++++++++++ .../Installer Modules/config.ini_tmpl | 10 ++ xpinstall/wizard/mac/macbuild/config.ini_tmpl | 10 ++ 82 files changed, 697 insertions(+), 109 deletions(-) create mode 100644 editor/ui/composer/content/contents-region.rdf create mode 100644 editor/ui/composer/locale/en-US/contents-region.rdf create mode 100644 editor/ui/composer/locale/en-US/region.properties create mode 100644 mailnews/base/resources/content/contents-region.rdf create mode 100644 mailnews/base/resources/locale/en-US/contents-region.rdf create mode 100644 mailnews/base/resources/locale/en-US/region.properties create mode 100644 xpfe/browser/resources/content/contents-region.rdf create mode 100644 xpfe/browser/resources/content/openLocation.xul create mode 100644 xpfe/browser/resources/locale/en-US/contents-region.rdf create mode 100644 xpfe/browser/resources/locale/en-US/region.properties create mode 100644 xpfe/communicator/resources/content/contents-region.rdf create mode 100644 xpfe/communicator/resources/locale/en-US/contents-region.rdf create mode 100644 xpfe/communicator/resources/locale/en-US/region.dtd create mode 100644 xpfe/global/resources/content/contents-region.rdf create mode 100644 xpfe/global/resources/locale/en-US/contents-region.rdf create mode 100644 xpfe/global/resources/locale/en-US/region.dtd create mode 100644 xpfe/global/resources/locale/en-US/region.properties create mode 100644 xpinstall/packager/mac/regus.jst create mode 100644 xpinstall/packager/unix/regus.jst create mode 100644 xpinstall/packager/windows/regus.jst diff --git a/build/mac/build_scripts/MozillaBuildList.pm b/build/mac/build_scripts/MozillaBuildList.pm index 034e92618a4f..0346026a4cfb 100644 --- a/build/mac/build_scripts/MozillaBuildList.pm +++ b/build/mac/build_scripts/MozillaBuildList.pm @@ -120,10 +120,10 @@ sub InstallDefaultsFiles() InstallResources(":mozilla:profile:defaults:MANIFEST", "$default_profile_dir", 1); # make a dup in en-US - my($default_profile_dir_en_US) = "$default_profile_dir"."en-US:"; - mkdir($default_profile_dir_en_US, 0); + my($default_profile_dir_US) = "$default_profile_dir"."US:"; + mkdir($default_profile_dir_US, 0); - InstallResources(":mozilla:profile:defaults:MANIFEST", "$default_profile_dir_en_US", 1); + InstallResources(":mozilla:profile:defaults:MANIFEST", "$default_profile_dir_US", 1); } # Default _pref_ directory stuff diff --git a/editor/Makefile.in b/editor/Makefile.in index 515c30dcf3b7..5c50eadb324e 100644 --- a/editor/Makefile.in +++ b/editor/Makefile.in @@ -32,4 +32,6 @@ include $(topsrcdir)/config/rules.mk chrome:: @$(REGCHROME) content editor comm.jar + @$(REGCHROME) content editor-region comm.jar @$(REGCHROME) locale en-US/editor en-US.jar + @$(REGCHROME) locale US/editor-region US.jar diff --git a/editor/jar.mn b/editor/jar.mn index 4edebf4ad275..409a0e79d776 100644 --- a/editor/jar.mn +++ b/editor/jar.mn @@ -1,5 +1,6 @@ comm.jar: content/editor/contents.rdf (ui/composer/content/contents.rdf) + content/editor-region/contents.rdf (ui/composer/content/contents-region.rdf) content/editor/editor.xul (ui/composer/content/editor.xul) content/editor/TextEditorAppShell.xul (ui/composer/content/TextEditorAppShell.xul) content/editor/editor.js (ui/composer/content/editor.js) @@ -210,3 +211,6 @@ en-US.jar: locale/en-US/editor/EditConflict.dtd (ui/dialogs/locale/en-US/EditConflict.dtd) locale/en-US/editor/EditorSaveAsCharset.dtd (ui/dialogs/locale/en-US/EditorSaveAsCharset.dtd) +US.jar: + locale/US/editor-region/contents.rdf (ui/composer/locale/en-US/contents-region.rdf) + locale/US/editor-region/region.properties (ui/composer/locale/en-US/region.properties) diff --git a/editor/makefile.win b/editor/makefile.win index 3480d014b212..544cec5e0cea 100644 --- a/editor/makefile.win +++ b/editor/makefile.win @@ -32,4 +32,6 @@ include <$(DEPTH)\config\rules.mak> chrome:: $(REGCHROME) content editor comm.jar + $(REGCHROME) content editor-region comm.jar $(REGCHROME) locale en-US/editor en-US.jar + $(REGCHROME) locale US/editor-region US.jar diff --git a/editor/ui/composer.js b/editor/ui/composer.js index 3224fe7e791a..7e025533f36f 100644 --- a/editor/ui/composer.js +++ b/editor/ui/composer.js @@ -45,7 +45,7 @@ pref("editor.prettyprint", true); pref("editor.htmlWrapColumn", 72); -pref("editor.throbber.url","chrome://editor/locale/editor.properties"); +pref("editor.throbber.url","chrome://editor-region/locale/region.properties"); pref("editor.auto_save", false); pref("editor.auto_save_delay", 10); // minutes diff --git a/editor/ui/composer/content/contents-region.rdf b/editor/ui/composer/content/contents-region.rdf new file mode 100644 index 000000000000..5dc1004f95af --- /dev/null +++ b/editor/ui/composer/content/contents-region.rdf @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/editor/ui/composer/locale/en-US/contents-region.rdf b/editor/ui/composer/locale/en-US/contents-region.rdf new file mode 100644 index 000000000000..7659bee96ae7 --- /dev/null +++ b/editor/ui/composer/locale/en-US/contents-region.rdf @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/editor/ui/composer/locale/en-US/editor.properties b/editor/ui/composer/locale/en-US/editor.properties index e9e335ae876d..410c374bc548 100644 --- a/editor/ui/composer/locale/en-US/editor.properties +++ b/editor/ui/composer/locale/en-US/editor.properties @@ -143,10 +143,6 @@ Drag=Drag Unknown=Unknown Close=Close # -# editor.js -# -editor.throbber.url=http://www.mozilla.org/ -# # LOCALIZATION NOTE "RemoveTextStylesAccesskey" is used for both # menu items: "RemoveTextStyles" and "StopTextStyles" RemoveTextStylesAccesskey=x diff --git a/editor/ui/composer/locale/en-US/region.properties b/editor/ui/composer/locale/en-US/region.properties new file mode 100644 index 000000000000..83f337dfbeff --- /dev/null +++ b/editor/ui/composer/locale/en-US/region.properties @@ -0,0 +1,4 @@ +# +# editor.js +# editor.properties +editor.throbber.url=http://www.mozilla.org/ diff --git a/mailnews/Makefile.in b/mailnews/Makefile.in index a7ad90af2a2a..c37bec4b9b84 100644 --- a/mailnews/Makefile.in +++ b/mailnews/Makefile.in @@ -32,4 +32,6 @@ include $(topsrcdir)/config/rules.mk chrome:: @$(REGCHROME) content messenger messenger.jar + @$(REGCHROME) content messenger-region messenger.jar @$(REGCHROME) locale en-US/messenger en-US.jar + @$(REGCHROME) locale US/messenger-region US.jar diff --git a/mailnews/base/resources/content/contents-region.rdf b/mailnews/base/resources/content/contents-region.rdf new file mode 100644 index 000000000000..563e5f69b985 --- /dev/null +++ b/mailnews/base/resources/content/contents-region.rdf @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/mailnews/base/resources/locale/en-US/contents-region.rdf b/mailnews/base/resources/locale/en-US/contents-region.rdf new file mode 100644 index 000000000000..0f004a4e9edd --- /dev/null +++ b/mailnews/base/resources/locale/en-US/contents-region.rdf @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/mailnews/base/resources/locale/en-US/messenger.properties b/mailnews/base/resources/locale/en-US/messenger.properties index 21ee782f0eeb..35d0aaf669e9 100644 --- a/mailnews/base/resources/locale/en-US/messenger.properties +++ b/mailnews/base/resources/locale/en-US/messenger.properties @@ -119,14 +119,7 @@ new=New read=Read # mailnews.js - -mailnews.start_page.url=http://www.mozilla.org/mailnews/start.html -messenger.throbber.url=http://www.mozilla.org/ -compose.throbber.url=http://www.mozilla.org/ -addressbook.throbber.url=http://www.mozilla.org/ mailnews.send_default_charset=ISO-8859-1 -mailnews.view_default_charset=ISO-8859-1 - # offline msg nocachedbodybody =The body of this message has not been downloaded from \n\ @@ -150,4 +143,3 @@ nocachedbodytitle=Go Online to View This Message\n\ confirmUnsubscribeTitle=Confirm Unsubscribe confirmUnsubscribeText=Are you sure you want to unsubscribe from %S? - diff --git a/mailnews/base/resources/locale/en-US/region.properties b/mailnews/base/resources/locale/en-US/region.properties new file mode 100644 index 000000000000..d8f70f72fb15 --- /dev/null +++ b/mailnews/base/resources/locale/en-US/region.properties @@ -0,0 +1,8 @@ +# +# messenger.properties +# mailnews.js +mailnews.start_page.url=http://www.mozilla.org/mailnews/start.html +messenger.throbber.url=http://www.mozilla.org/ +compose.throbber.url=http://www.mozilla.org/ +addressbook.throbber.url=http://www.mozilla.org/ +mailnews.view_default_charset=ISO-8859-1 diff --git a/mailnews/jar.mn b/mailnews/jar.mn index 52f38381eac1..25c131b6ebc4 100644 --- a/mailnews/jar.mn +++ b/mailnews/jar.mn @@ -1,5 +1,6 @@ messenger.jar: content/messenger/contents.rdf (base/resources/content/contents.rdf) + content/messenger-region/contents.rdf (base/resources/content/contents-region.rdf) content/messenger/addressbook/pref-addressing.xul (addrbook/prefs/resources/content/pref-addressing.xul) content/messenger/addressbook/pref-addressbookOverlay.xul (addrbook/prefs/resources/content/pref-addressbookOverlay.xul) content/messenger/addressbook/abAddressBookNameDialog.js (addrbook/resources/content/abAddressBookNameDialog.js) @@ -244,3 +245,7 @@ en-US.jar: locale/en-US/messenger/mime.properties (mime/resources/mime.properties) locale/en-US/messenger/mimeheader.properties (mime/resources/mimeheader.properties) locale/en-US/messenger/vcard.properties (mime/cthandlers/resources/vcard.properties) + +US.jar: + locale/US/messenger-region/contents.rdf (base/resources/locale/en-US/contents-region.rdf) + locale/US/messenger-region/region.properties (base/resources/locale/en-US/region.properties) diff --git a/mailnews/mailnews.js b/mailnews/mailnews.js index 03f785f6e744..4771c2cc34d3 100644 --- a/mailnews/mailnews.js +++ b/mailnews/mailnews.js @@ -120,7 +120,7 @@ pref("mailnews.force_ascii_search", false); pref("mailnews.autolookup_unknown_mime_types", true); pref("mailnews.send_default_charset", "chrome://messenger/locale/messenger.properties"); -pref("mailnews.view_default_charset", "chrome://messenger/locale/messenger.properties"); +pref("mailnews.view_default_charset", "chrome://messenger-region/locale/region.properties"); pref("mailnews.force_charset_override", false); pref("mailnews.language_sensitive_font", true); @@ -222,7 +222,7 @@ pref("ldap_2.version", 3); /* Update kCurrentListVersion in include/di pref("mailnews.confirm.moveFoldersToTrash", true); -pref("mailnews.start_page.url", "chrome://messenger/locale/messenger.properties"); +pref("mailnews.start_page.url", "chrome://messenger-region/locale/region.properties"); pref("mailnews.start_page.enabled", true); pref("mailnews.account_central_page.url", "chrome://messenger/locale/messenger.properties"); @@ -290,9 +290,9 @@ pref("mail.startup.enabledMailCheckOnce", false); pref("mailnews.max_header_display_length",3); // number of addresses to show -pref("messenger.throbber.url","chrome://messenger/locale/messenger.properties"); -pref("compose.throbber.url","chrome://messenger/locale/messenger.properties"); -pref("addressbook.throbber.url","chrome://messenger/locale/messenger.properties"); +pref("messenger.throbber.url","chrome://messenger-region/locale/region.properties"); +pref("compose.throbber.url","chrome://messenger-region/locale/region.properties"); +pref("addressbook.throbber.url","chrome://messenger-region/locale/region.properties"); pref("mailnews.send_plaintext_flowed", true); // RFC 2646======= pref("mailnews.display.disable_format_flowed_support", false); diff --git a/mailnews/makefile.win b/mailnews/makefile.win index 76df119a5ea1..dc1e18a1576a 100644 --- a/mailnews/makefile.win +++ b/mailnews/makefile.win @@ -27,4 +27,6 @@ include <$(DEPTH)\config\rules.mak> chrome:: $(REGCHROME) content messenger messenger.jar + $(REGCHROME) content messenger-region messenger.jar $(REGCHROME) locale en-US/messenger en-US.jar + $(REGCHROME) locale US/messenger-region US.jar diff --git a/modules/libpref/src/init/all.js b/modules/libpref/src/init/all.js index 336142d74c37..54631efee490 100644 --- a/modules/libpref/src/init/all.js +++ b/modules/libpref/src/init/all.js @@ -447,4 +447,4 @@ pref("bidi.support", 1); pref("bidi.characterset", 1); -pref("browser.throbber.url","chrome://navigator/locale/navigator.properties"); +pref("browser.throbber.url","chrome://navigator-region/locale/region.properties"); diff --git a/modules/libpref/src/init/config.js b/modules/libpref/src/init/config.js index c4dbd1d4018d..d19fb65b5ab7 100644 --- a/modules/libpref/src/init/config.js +++ b/modules/libpref/src/init/config.js @@ -23,7 +23,7 @@ // Default configuration information for the client // -config("startup.homepage_override_url","chrome://navigator/locale/navigator.properties"); +config("startup.homepage_override_url","chrome://navigator-region/locale/region.properties"); config("autoadmin.append_emailaddr",false); config("autoadmin.failover_to_cached",true); diff --git a/modules/libpref/src/init/editor.js b/modules/libpref/src/init/editor.js index 3224fe7e791a..7e025533f36f 100644 --- a/modules/libpref/src/init/editor.js +++ b/modules/libpref/src/init/editor.js @@ -45,7 +45,7 @@ pref("editor.prettyprint", true); pref("editor.htmlWrapColumn", 72); -pref("editor.throbber.url","chrome://editor/locale/editor.properties"); +pref("editor.throbber.url","chrome://editor-region/locale/region.properties"); pref("editor.auto_save", false); pref("editor.auto_save_delay", 10); // minutes diff --git a/modules/libpref/src/init/mailnews.js b/modules/libpref/src/init/mailnews.js index 03f785f6e744..4771c2cc34d3 100644 --- a/modules/libpref/src/init/mailnews.js +++ b/modules/libpref/src/init/mailnews.js @@ -120,7 +120,7 @@ pref("mailnews.force_ascii_search", false); pref("mailnews.autolookup_unknown_mime_types", true); pref("mailnews.send_default_charset", "chrome://messenger/locale/messenger.properties"); -pref("mailnews.view_default_charset", "chrome://messenger/locale/messenger.properties"); +pref("mailnews.view_default_charset", "chrome://messenger-region/locale/region.properties"); pref("mailnews.force_charset_override", false); pref("mailnews.language_sensitive_font", true); @@ -222,7 +222,7 @@ pref("ldap_2.version", 3); /* Update kCurrentListVersion in include/di pref("mailnews.confirm.moveFoldersToTrash", true); -pref("mailnews.start_page.url", "chrome://messenger/locale/messenger.properties"); +pref("mailnews.start_page.url", "chrome://messenger-region/locale/region.properties"); pref("mailnews.start_page.enabled", true); pref("mailnews.account_central_page.url", "chrome://messenger/locale/messenger.properties"); @@ -290,9 +290,9 @@ pref("mail.startup.enabledMailCheckOnce", false); pref("mailnews.max_header_display_length",3); // number of addresses to show -pref("messenger.throbber.url","chrome://messenger/locale/messenger.properties"); -pref("compose.throbber.url","chrome://messenger/locale/messenger.properties"); -pref("addressbook.throbber.url","chrome://messenger/locale/messenger.properties"); +pref("messenger.throbber.url","chrome://messenger-region/locale/region.properties"); +pref("compose.throbber.url","chrome://messenger-region/locale/region.properties"); +pref("addressbook.throbber.url","chrome://messenger-region/locale/region.properties"); pref("mailnews.send_plaintext_flowed", true); // RFC 2646======= pref("mailnews.display.disable_format_flowed_support", false); diff --git a/modules/plugin/base/src/nsPluginHostImpl.cpp b/modules/plugin/base/src/nsPluginHostImpl.cpp index 21d5213a01d1..fd9274ef299b 100644 --- a/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -145,6 +145,7 @@ static NS_DEFINE_IID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID); static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID); #define PLUGIN_PROPERTIES_URL "chrome://global/locale/downloadProgress.properties" +#define PLUGIN_REGIONAL_URL "chrome://global-region/locale/region.properties" // #defines for reading prefs and extra search plugin paths from windows registry #define _MAXKEYVALUE_ 8196 @@ -207,6 +208,7 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) nsCOMPtr io(do_GetService(kIOServiceCID)); nsCOMPtr strings(do_GetService(kStringBundleServiceCID)); nsCOMPtr bundle; + nsCOMPtr regionalBundle; nsCOMPtr uri; char *spec = nsnull; nsILocale* locale = nsnull; @@ -228,20 +230,12 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) // Taken from mozilla\extensions\wallet\src\wallet.cpp // WalletLocalize(). - - rv = io->NewURI(PLUGIN_PROPERTIES_URL, nsnull, getter_AddRefs(uri)); + rv = strings->CreateBundle(PLUGIN_PROPERTIES_URL, locale, getter_AddRefs(bundle)); if (NS_FAILED(rv)) { return; } - - rv = uri->GetSpec(&spec); - if (NS_FAILED(rv)) { - nsCRT::free(spec); - return; - } - - rv = strings->CreateBundle(spec, locale, getter_AddRefs(bundle)); - nsCRT::free(spec); + rv = strings->CreateBundle(PLUGIN_REGIONAL_URL, locale, + getter_AddRefs(regionalBundle)); if (NS_FAILED(rv)) { return; } @@ -254,8 +248,8 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) if (NS_FAILED(rv)) { goto EXIT_DNDPD; } - rv = bundle->GetStringFromName(NS_LITERAL_STRING("noDefaultPluginMessage").get(), - &messageUni); + rv = regionalBundle->GetStringFromName(NS_LITERAL_STRING("noDefaultPluginMessage").get(), + &messageUni); if (NS_FAILED(rv)) { goto EXIT_DNDPD; } diff --git a/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/modules/plugin/nglsrc/nsPluginHostImpl.cpp index 21d5213a01d1..fd9274ef299b 100644 --- a/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -145,6 +145,7 @@ static NS_DEFINE_IID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID); static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID); #define PLUGIN_PROPERTIES_URL "chrome://global/locale/downloadProgress.properties" +#define PLUGIN_REGIONAL_URL "chrome://global-region/locale/region.properties" // #defines for reading prefs and extra search plugin paths from windows registry #define _MAXKEYVALUE_ 8196 @@ -207,6 +208,7 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) nsCOMPtr io(do_GetService(kIOServiceCID)); nsCOMPtr strings(do_GetService(kStringBundleServiceCID)); nsCOMPtr bundle; + nsCOMPtr regionalBundle; nsCOMPtr uri; char *spec = nsnull; nsILocale* locale = nsnull; @@ -228,20 +230,12 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) // Taken from mozilla\extensions\wallet\src\wallet.cpp // WalletLocalize(). - - rv = io->NewURI(PLUGIN_PROPERTIES_URL, nsnull, getter_AddRefs(uri)); + rv = strings->CreateBundle(PLUGIN_PROPERTIES_URL, locale, getter_AddRefs(bundle)); if (NS_FAILED(rv)) { return; } - - rv = uri->GetSpec(&spec); - if (NS_FAILED(rv)) { - nsCRT::free(spec); - return; - } - - rv = strings->CreateBundle(spec, locale, getter_AddRefs(bundle)); - nsCRT::free(spec); + rv = strings->CreateBundle(PLUGIN_REGIONAL_URL, locale, + getter_AddRefs(regionalBundle)); if (NS_FAILED(rv)) { return; } @@ -254,8 +248,8 @@ void DisplayNoDefaultPluginDialog(const char *mimeType) if (NS_FAILED(rv)) { goto EXIT_DNDPD; } - rv = bundle->GetStringFromName(NS_LITERAL_STRING("noDefaultPluginMessage").get(), - &messageUni); + rv = regionalBundle->GetStringFromName(NS_LITERAL_STRING("noDefaultPluginMessage").get(), + &messageUni); if (NS_FAILED(rv)) { goto EXIT_DNDPD; } diff --git a/netwerk/protocol/http/src/nsHTTPHandler.cpp b/netwerk/protocol/http/src/nsHTTPHandler.cpp index f300619a51b1..85d1a137cb14 100644 --- a/netwerk/protocol/http/src/nsHTTPHandler.cpp +++ b/netwerk/protocol/http/src/nsHTTPHandler.cpp @@ -1451,7 +1451,7 @@ nsHTTPHandler::PrefsChanged(const char* pref) mPrefs->GetIntPref("network.http.keep-alive.max-connections-per-server", &mMaxAllowedKeepAlivesPerServer); -#if defined(DEBUG_tao) +#if defined(DEBUG_tao_) printf("\n--> nsHTTPHandler::PrefsChanged:pref=%s\n", pref?pref:"null"); #endif if ( (bChangedAll)|| !PL_strcmp(pref, INTL_ACCEPT_LANGUAGES) ) // intl.accept_languages @@ -1461,7 +1461,7 @@ nsHTTPHandler::PrefsChanged(const char* pref) getter_Copies(acceptLanguages)); if (NS_SUCCEEDED(rv)) SetAcceptLanguages(NS_ConvertUCS2toUTF8(acceptLanguages)); -#if defined(DEBUG_tao) +#if defined(DEBUG_tao_) printf("\n--> nsHTTPHandler::PrefsChanged: intl.accept_languages=%s\n", (const char *)NS_ConvertUCS2toUTF8(acceptLanguages)); #endif @@ -1488,7 +1488,7 @@ nsHTTPHandler::PrefsChanged(const char* pref) if (NS_SUCCEEDED(rv)) { mAppLanguage = (const char*) NS_ConvertUCS2toUTF8(uval); // -#if defined(DEBUG_tao) +#if defined(DEBUG_tao_) printf("\n--> nsHTTPHandler::PrefsChanged:general.useragent.locale=%s\n", (const char*) NS_ConvertUCS2toUTF8(uval)); #endif diff --git a/profile/defaults/Makefile.in b/profile/defaults/Makefile.in index bbd8656ccf95..fb38f6817f9c 100644 --- a/profile/defaults/Makefile.in +++ b/profile/defaults/Makefile.in @@ -39,4 +39,4 @@ FILES := $(addprefix $(srcdir)/, $(FILES)) install:: $(INSTALL) $(FILES) $(DIST)/bin/defaults/profile - $(INSTALL) $(FILES) $(DIST)/bin/defaults/profile/en-US + $(INSTALL) $(FILES) $(DIST)/bin/defaults/profile/US diff --git a/profile/defaults/makefile.win b/profile/defaults/makefile.win index ecd149f94442..55ad123e9002 100644 --- a/profile/defaults/makefile.win +++ b/profile/defaults/makefile.win @@ -34,4 +34,4 @@ FILES=\ install:: -for %i in ($(FILES:/=\)) do $(MAKE_INSTALL) %i $(DIST)\bin\defaults\profile - -for %i in ($(FILES:/=\)) do $(MAKE_INSTALL) %i $(DIST)\bin\defaults\profile\en-US + -for %i in ($(FILES:/=\)) do $(MAKE_INSTALL) %i $(DIST)\bin\defaults\profile\US diff --git a/xpfe/browser/Makefile.in b/xpfe/browser/Makefile.in index 3a13b6d74203..c4e8dd699b2f 100644 --- a/xpfe/browser/Makefile.in +++ b/xpfe/browser/Makefile.in @@ -32,4 +32,6 @@ include $(topsrcdir)/config/rules.mk chrome:: @$(REGCHROME) content navigator comm.jar + @$(REGCHROME) content navigator-region comm.jar @$(REGCHROME) locale en-US/navigator en-US.jar + @$(REGCHROME) locale US/navigator-region US.jar diff --git a/xpfe/browser/jar.mn b/xpfe/browser/jar.mn index 4b51171c5e22..9e572e99dbcc 100644 --- a/xpfe/browser/jar.mn +++ b/xpfe/browser/jar.mn @@ -1,5 +1,8 @@ comm.jar: content/navigator/contents.rdf (resources/content/contents.rdf) + content/navigator-region/contents.rdf (resources/content/contents-region.rdf) + content/navigator/openLocation.js (resources/content/openLocation.js) + content/navigator/openLocation.xul (resources/content/openLocation.xul) content/navigator/viewsource.js (resources/content/viewsource.js) content/navigator/viewSource.xul (resources/content/viewSource.xul) content/navigator/pageInfo.js (resources/content/pageInfo.js) @@ -18,3 +21,7 @@ en-US.jar: locale/en-US/navigator/pageInfo.dtd (resources/locale/en-US/pageInfo.dtd) locale/en-US/navigator/navigator.dtd (resources/locale/en-US/navigator.dtd) locale/en-US/navigator/navigator.properties (resources/locale/en-US/navigator.properties) + +US.jar: + locale/US/navigator-region/contents.rdf (resources/locale/en-US/contents-region.rdf) + locale/US/navigator-region/region.properties (resources/locale/en-US/region.properties) diff --git a/xpfe/browser/makefile.win b/xpfe/browser/makefile.win index 6084d14514cb..d4029ff5c17f 100644 --- a/xpfe/browser/makefile.win +++ b/xpfe/browser/makefile.win @@ -27,4 +27,6 @@ include <$(DEPTH)\config\rules.mak> chrome:: $(REGCHROME) content navigator comm.jar + $(REGCHROME) content navigator-region comm.jar $(REGCHROME) locale en-US/navigator en-US.jar + $(REGCHROME) locale US/navigator-region US.jar diff --git a/xpfe/browser/resources/content/contents-region.rdf b/xpfe/browser/resources/content/contents-region.rdf new file mode 100644 index 000000000000..2eaabe8e1745 --- /dev/null +++ b/xpfe/browser/resources/content/contents-region.rdf @@ -0,0 +1,16 @@ + + + + + + + + + + + + + diff --git a/xpfe/browser/resources/content/navigator.js b/xpfe/browser/resources/content/navigator.js index 6f8fb9948dd8..c10f510a7482 100644 --- a/xpfe/browser/resources/content/navigator.js +++ b/xpfe/browser/resources/content/navigator.js @@ -27,6 +27,8 @@ const nsIWebNavigation = Components.interfaces.nsIWebNavigation; var gURLBar = null; var gNavigatorBundle; var gBrandBundle; +var gNavigatorRegionBundle; +var gBrandRegionBundle; var pref = Components.classes["@mozilla.org/preferences;1"] .getService(Components.interfaces.nsIPref); @@ -366,7 +368,7 @@ function getHomePage() // use this if we can't find the pref if (!url) - url = gNavigatorBundle.getString("homePageDefault"); + url = gNavigatorRegionBundle.getString("homePageDefault"); return url; } @@ -417,6 +419,8 @@ function Startup() { gNavigatorBundle = document.getElementById("bundle_navigator"); gBrandBundle = document.getElementById("bundle_brand"); + gNavigatorRegionBundle = document.getElementById("bundle_navigator_region"); + gBrandRegionBundle = document.getElementById("bundle_brand_region"); window.XULBrowserWindow = new nsXULBrowserWindow(); window.buttonPrefListener = new nsButtonPrefListener(); @@ -669,7 +673,7 @@ function OpenSearch(tabName, forceDialogFlag, searchStr) { var autoOpenSearchPanel = false; var defaultSearchURL = null; - var fallbackDefaultSearchURL = gNavigatorBundle.getString("fallbackDefaultSearchURL"); + var fallbackDefaultSearchURL = gNavigatorRegionBundle.getString("fallbackDefaultSearchURL"); // XXX This somehow causes a big leak, back to the old way // till we figure out why. See bug 61886. // var url = getWebNavigation().currentURI.spec; @@ -689,7 +693,7 @@ function OpenSearch(tabName, forceDialogFlag, searchStr) if (defaultSearchURL != fallbackDefaultSearchURL) loadURI(defaultSearchURL); else - loadURI(gNavigatorBundle.getString("otherSearchURL")); + loadURI(gNavigatorRegionBundle.getString("otherSearchURL")); } else { var searchMode = 0; @@ -1275,7 +1279,7 @@ function applyTheme(themeName) function getNewThemes() { - loadURI(gBrandBundle.getString("getNewThemesURL")); + loadURI(gBrandRegionBundle.getString("getNewThemesURL")); } function URLBarLeftClickHandler(aEvent) diff --git a/xpfe/browser/resources/content/navigator.xul b/xpfe/browser/resources/content/navigator.xul index 111f69f2901b..6884a9a939ef 100644 --- a/xpfe/browser/resources/content/navigator.xul +++ b/xpfe/browser/resources/content/navigator.xul @@ -76,6 +76,8 @@ Contributor(s): ______________________________________. --> + + diff --git a/xpfe/browser/resources/content/openLocation.xul b/xpfe/browser/resources/content/openLocation.xul new file mode 100644 index 000000000000..e685be9aaf46 --- /dev/null +++ b/xpfe/browser/resources/content/openLocation.xul @@ -0,0 +1,92 @@ + + + + + + + + + + %mozRegionalDTD; + + %brandDTD; + + %openDialogDTD; +]> + + + +