move @PRE_RELEASE_SUFFIX to L20n l10n-data PI and remove browser.dtd :)
authorZbigniew Braniecki <gandalf@mozilla.com>
Tue, 17 Aug 2010 11:24:57 +0200
changeset 48095 4c5916e5c647c4b56369fdd5ad0d9b2646ac988f
parent 48094 2c96975a8187bae711b2e94be69b9a7eae3959ab
child 48096 5ee402abc89eb1f9787b2fcdbdb8fce40ea33c9d
push id9
push userzbraniecki@mozilla.com
push dateWed, 18 Aug 2010 21:50:49 +0000
milestone2.0b3pre
move @PRE_RELEASE_SUFFIX to L20n l10n-data PI and remove browser.dtd :)
browser/base/content/browser.xul
browser/locales/en-US/chrome/browser/browser-prop.j20n
browser/locales/en-US/chrome/browser/browser.dtd
browser/locales/en-US/chrome/browser/browser.j20n
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -52,40 +52,34 @@
 <?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/content/places/places.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
 
 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/baseMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
-# All DTD information is stored in a separate file so that it can be shared by
+<?l10n-data 
+  this.pre_release_suffix='@PRE_RELEASE_SUFFIX@';
+?>
+
+# All L20n information is stored in a separate file so that it can be shared by
 # hiddenWindow.xul.
 #include browser-doctype.inc
 
 <window id="main-window"
+#ifdef XP_MACOSX
+        l10n_id="mainWindowMac"
+#else
+        l10n_id="mainWindowOther"
+#endif
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:svg="http://www.w3.org/2000/svg"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="BrowserStartup()" onunload="BrowserShutdown()" onclose="return WindowIsClosing();"
-        title="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
-        title_normal="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
-#ifdef XP_MACOSX
-        title_privatebrowsing="&mainWindow.title;@PRE_RELEASE_SUFFIX@&mainWindow.titlemodifiermenuseparator;&mainWindow.titlePrivateBrowsingSuffix;"
-        titledefault="&mainWindow.title;@PRE_RELEASE_SUFFIX@"
-        titlemodifier=""
-        titlemodifier_normal=""
-        titlemodifier_privatebrowsing="&mainWindow.titlePrivateBrowsingSuffix;"
-#else
-        title_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
-        titlemodifier="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
-        titlemodifier_normal="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@"
-        titlemodifier_privatebrowsing="&mainWindow.titlemodifier;@PRE_RELEASE_SUFFIX@ &mainWindow.titlePrivateBrowsingSuffix;"
-#endif
-        titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
         lightweightthemes="true"
         lightweightthemesfooter="browser-bottombox"
         windowtype="navigator:browser"
         screenX="4" screenY="4"
         browsingmode="normal"
         persist="screenX screenY width height sizemode"> 
 
 # All JS files which are not content (only) dependent that browser.xul
--- a/browser/locales/en-US/chrome/browser/browser-prop.j20n
+++ b/browser/locales/en-US/chrome/browser/browser-prop.j20n
@@ -1,3 +1,3 @@
-# Star button
+// Star button
 this.starButtonOn = "Edit this bookmark";
 this.starButtonOff = "Bookmark this page";
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -1,13 +0,0 @@
-<!-- LOCALIZATION NOTE : FILE This file contains the browser main menu items -->
-<!-- LOCALIZATION NOTE : FILE Do not translate commandkeys --> 
-
-<!-- LOCALIZATION NOTE (mainWindow.title): DONT_TRANSLATE -->
-<!ENTITY mainWindow.title "&brandFullName;">
-<!-- LOCALIZATION NOTE (mainWindow.titlemodifier) : DONT_TRANSLATE -->
-<!ENTITY mainWindow.titlemodifier "&brandFullName;">
-<!-- LOCALIZATION NOTE (mainWindow.titlemodifiermenuseparator): DONT_TRANSLATE -->
-<!ENTITY mainWindow.titlemodifiermenuseparator " - ">
-<!-- LOCALIZATION NOTE (mainWindow.titlePrivateBrowsingSuffix): This will be appended to the window's title
-                                                                inside the private browsing mode -->
-<!ENTITY mainWindow.titlePrivateBrowsingSuffix "(Private Browsing)">
-
--- a/browser/locales/en-US/chrome/browser/browser.j20n
+++ b/browser/locales/en-US/chrome/browser/browser.j20n
@@ -1,10 +1,34 @@
 /* Main window */
-this.mainWindow = {'title': '&brandFullName;'}
+var self=this;
+this.mainWindow = {'title': this.brandFullName+this.pre_release_suffix,
+  'titledefault': this.brandFullName+this.pre_release_suffix,
+  'title_normal': this.brandFullName+this.pre_release_suffix,
+  'titlemenuseparator': ' - ',
+  'titlePrivateBrowsingSuffix': '(Private Browsing)',}
+
+this.mainWindowMac = {
+  'title': this.mainWindow.title,
+  'title_normal': this.mainWindow.title_normal,
+  'title_privatebrowsing': this.brandFullName+this.pre_release_suffix+this.mainWindow.titlemenuseparator+this.mainWindow.titlePrivateBrowsingSuffix,
+  'titledefault': this.mainWindow.titledefault,
+  'titlemodifier': '',
+  'titlemodifier_normal': '',
+  'titlemodifier_privatebrowsing': this.mainWindow.titlePrivateBrowsingSuffix,
+  'titlemenuseparator': this.mainWindow.titlemenuseparator
+}
+this.mainWindowOther = {
+  'title': this.mainWindow.title,
+  'title_normal': this.mainWindow.title_normal,
+  'title_privatebrowsing': this.brandFullName+this.pre_release_suffix+' '+this.mainWindow.titlePrivateBrowsingSuffix,
+  'titlemodifier': this.brandFullName+this.pre_release_suffix,
+  'titlemodifier_normal': this.brandFullName+this.pre_release_suffix,
+  'titlemodifier_privatebrowsing': this.brandFullName+this.pre_release_suffix+' '+this.mainWindow.titlePrivateBrowsingSuffix
+}
 
 
 /* Tab context menu */
 this.reloadTab = {'label': 'Reload Tab', 'accesskey': 'R'}
 this.reloadAllTabs = {'label': 'Reload All Tabs', 'accesskey': 'A'}
 this.closeOtherTabs = {'label': 'Close Other Tabs', 'accesskey': 'o'}
 this.openTabInNewWindow = {'label': 'Open in a New Window', 'accesskey': 'w'}
 this.pinTab = {'label': 'Make into App Tab', 'accesskey': 'k'}