Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Properly localize Cookies panel using fbInternational

  • Loading branch information...
commit 93b7cce030a70b2d05668f38e1625debc06483bb 1 parent 694eb35
Jan Odvarko authored June 08, 2012
18  extension/content/firebug/cookies/cookieModule.js
@@ -178,24 +178,6 @@ Firebug.CookieModule = Obj.extend(Firebug.ActivableModule,
178 178
         //Firebug.Debugger.removeListener(this.DebuggerListener);
179 179
     },
180 180
 
181  
-    internationalizeUI: function()
182  
-    {
183  
-        var elements = ["fcCookiesMenu", "fcExportAll", "fcExportForSite", "fcRemoveAllSession",
184  
-            "fcRemoveAll", "fcCreate", "fcCookieViewAll", "fcCookieViewExceptions",
185  
-            "fcToolsMenu", "fcFilterMenu", "fcFilterByPath",
186  
-            "fcShowRejectedCookies", "fbConsoleFilter-cookies"];
187  
-
188  
-        for (var i=0; i<elements.length; i++)
189  
-        {
190  
-            var element = Firebug.chrome.$(elements[i]);
191  
-            if (element.hasAttribute("label"))
192  
-                Locale.internationalize(element, "label");
193  
-
194  
-            if (element.hasAttribute("tooltiptext"))
195  
-                Locale.internationalize(element, "tooltiptext");
196  
-        }
197  
-    },
198  
-
199 181
     registerObservers: function()
200 182
     {
201 183
         if (this.observersRegistered)
26  extension/content/firebug/cookies/cookiePanel.xul
@@ -30,7 +30,7 @@
30 30
             <hbox id="fbConsoleButtons">
31 31
                 <toolbarbutton id="fbConsoleFilter-cookies"
32 32
                     label="firecookie.console.Cookies" type="radio"
33  
-                    group="firebugConsoleFilter" class="toolbar-text-button"
  33
+                    group="firebugConsoleFilter" class="toolbar-text-button fbInternational"
34 34
                     tooltiptext="firecookie.console.Filter By Cookies"
35 35
                     oncommand="Firebug.Console.onToggleFilter(Firebug.currentContext, 'cookies')"
36 36
                     collapsed="true"/>
@@ -43,13 +43,14 @@
43 43
                 <toolbarseparator class="fbPanelSpecificButtonsSeparator"/>
44 44
 
45 45
                 <!-- General cookies actions -->
46  
-                <toolbarbutton id="fcCookiesMenu" label="firecookie.menu.Cookies" type="menu">
  46
+                <toolbarbutton id="fcCookiesMenu" label="firecookie.menu.Cookies" type="menu"
  47
+                    class="fbInternational">
47 48
                     <menupopup id="fcCookiesMenuPopup">
48 49
 
49 50
                         <!-- Create cookies -->
50 51
                         <tooltip id="fcCreateCookieTooltip"
51 52
                             onpopupshowing="return Firebug.CookieModule.onCreateCookieShowTooltip(this, Firebug.currentContext)"/>
52  
-                        <menuitem id="fcCreate"
  53
+                        <menuitem id="fcCreate" class="fbInternational"
53 54
                             label="firecookie.Create"
54 55
                             tooltip="fcCreateCookieTooltip" command="cmd_cookieCreate"/>
55 56
                         <menuseparator/>
@@ -57,7 +58,7 @@
57 58
                         <!-- Remove all cookies -->
58 59
                         <tooltip id="fcRemoveAllTooltip"
59 60
                             onpopupshowing="return Firebug.CookieModule.onRemoveAllShowTooltip(this, Firebug.currentContext)"/>
60  
-                        <menuitem id="fcRemoveAll"
  61
+                        <menuitem id="fcRemoveAll" class="fbInternational"
61 62
                             label="firecookie.RemoveAll"
62 63
                             key="key_removeAllCookies"
63 64
                             tooltip="fcRemoveAllTooltip" command="cmd_cookieRemoveAll"/>
@@ -65,36 +66,37 @@
65 66
                         <!-- Remove all session cookies -->
66 67
                         <tooltip id="fcRemoveAllSessionTooltip"
67 68
                             onpopupshowing="return Firebug.CookieModule.onRemoveAllSessionShowTooltip(this, Firebug.currentContext)"/>
68  
-                        <menuitem id="fcRemoveAllSession"
  69
+                        <menuitem id="fcRemoveAllSession" class="fbInternational"
69 70
                             label="firecookie.Remove Session Cookies"
70 71
                             tooltip="fcRemoveAllSessionTooltip" command="cmd_cookieRemoveAllSession"/>
71 72
                         <menuseparator/>
72 73
 
73 74
                         <!-- Export cookies -->
74  
-                        <menuitem id="fcExportAll"
  75
+                        <menuitem id="fcExportAll" class="fbInternational"
75 76
                             label="firecookie.export.Export All Cookies"
76 77
                             tooltiptext="firecookie.export.Export All Cookies Tooltip"
77 78
                             command="cmd_cookieExportAll"/>
78 79
                         <tooltip id="fcExportForSiteTooltip"
79 80
                             onpopupshowing="return Firebug.CookieModule.onExportForSiteShowTooltip(this, Firebug.currentContext)"/>
80  
-                        <menuitem id="fcExportForSite"
  81
+                        <menuitem id="fcExportForSite" class="fbInternational"
81 82
                             label="firecookie.export.Export For Site"
82 83
                             tooltip="fcExportForSiteTooltip" command="cmd_cookieExportForSite"/>
83 84
                     </menupopup>
84 85
                 </toolbarbutton>
85 86
 
86 87
                 <!-- Filter cookies -->
87  
-                <toolbarbutton id="fcFilterMenu" type="menu"
  88
+                <toolbarbutton id="fcFilterMenu" type="menu" class="fbInternational"
88 89
                     label="firecookie.Filter"
89 90
                     tooltiptext="firecookie.FilterTooltip">
90 91
                     <menupopup id="fcFilterMenuPopup"
91 92
                             onpopupshowing="return Firebug.CookieModule.onFilterPopupShowing(this)">
92  
-                        <menuitem id="fcFilterByPath" type="checkbox"
  93
+                        <menuitem id="fcFilterByPath" type="checkbox" class="fbInternational"
93 94
                             value="cookies.filterByPath"
94 95
                             label="firecookie.filter.byPath"
95 96
                             tooltiptext="firecookie.filter.byPathTooltip"
96 97
                             command="cmd_cookieFilterByPath"/>
97 98
                         <menuitem id="fcShowRejectedCookies" type="checkbox"
  99
+                            class="fbInternational"
98 100
                             value="cookies.showRejectedCookies"
99 101
                             label="firecookie.filter.showRejectedCookies"
100 102
                             tooltiptext="firecookie.filter.showRejectedCookiesTooltip"
@@ -128,15 +130,15 @@
128 130
                 <toolbarseparator/>
129 131
 
130 132
                 <!-- Tools -->
131  
-                <toolbarbutton id="fcToolsMenu" type="menu"
  133
+                <toolbarbutton id="fcToolsMenu" type="menu" class="fbInternational"
132 134
                     label="firecookie.Tools"
133 135
                     tooltiptext="firecookie.ToolsTooltip">
134 136
                     <menupopup>
135  
-                        <menuitem id="fcCookieViewAll"
  137
+                        <menuitem id="fcCookieViewAll" class="fbInternational"
136 138
                             command="cmd_cookieViewAll"
137 139
                             label="firecookie.ViewAll"
138 140
                             tooltiptext="firecookie.ViewAllTooltip"/>
139  
-                        <menuitem id="fcCookieViewExceptions"
  141
+                        <menuitem id="fcCookieViewExceptions" class="fbInternational"
140 142
                             command="cmd_cookieViewExceptions"
141 143
                             label="firecookie.ViewExceptions"
142 144
                             tooltiptext="firecookie.ViewExceptionsTooltip"/>
2  extension/locale/en-US/cookies.properties
@@ -99,7 +99,7 @@ firecookie.removeallsession.tooltip=Remove all session cookies in the list.
99 99
 
100 100
 # LOCALIZATION NOTE (firecookie.createcookie.tooltip): A tooltip for Cookies->Create Cookie menu
101 101
 # examples: Create new cookie for www.softwareishard.com
102  
-firecookie.createcookie.tooltip=Create new cookie for %S
  102
+firecookie.createcookie.tooltip=Create a new cookie for %S
103 103
 
104 104
 # LOCALIZATION NOTE (firecookie.createcookie.defaultvalue): Default value for newly created cookie.
105 105
 firecookie.createcookie.defaultvalue=Value

0 notes on commit 93b7cce

Please sign in to comment.
Something went wrong with that request. Please try again.