Closed Bug 795342 Opened 12 years ago Closed 12 years ago

Toolbars in Task/Calendar tabs missing due to undefined entities in SeaMonkey.

Categories

(Calendar :: Lightning: SeaMonkey Integration, defect)

Lightning 1.9
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: philip.chee, Assigned: Paenglab)

References

Details

Attachments

(2 files)

Fri Sep 28 2012 23:26:25
Error: undefined entity
Source file: chrome://lightning/content/lightning-toolbar.xul
Line: 108, Column: 7
Source code:
      <toolbarbutton id="calendar-appmenu-button"

The undefined entities come from Bug 785692:

>       <toolbarbutton id="calendar-appmenu-button"
>                      class="toolbarbutton-1 button-appmenu"
>                      label="&appmenuButton.label;"
>                      tooltiptext="&appmenuButton.tooltip;"/>
> 
>       <toolbarbutton id="task-appmenu-button"
>                      class="toolbarbutton-1 button-appmenu"
>                      label="&appmenuButton.label;"
>                      tooltiptext="&appmenuButton.tooltip;"/>
So possible solutions:

1. Using the removeelement trick in suite-overlay-sidebar.xul doesn't work. Or rather it works but comes too late to prevent the undefined entities error.

2. Add these entities to the SeaMonkey messenger.dtd.

3. Move these entities to the Lightning locale file
(lightning-toolbar.dtd).

4. Something else.

Your thoughts Gentlebeings?
Paenglab, can you take care of this bug?
If I read the other bugs correctly this landed on comm-aurora, i.e. Lightning 1.9a2 and SeaMonkey 2.14a2 are affected?
Version: unspecified → Lightning 1.9
Attached patch patch β€” β€” Splinter Review
I took option 3 as it's the easiest and doesn't add entitys to SM which aren't used there and could be removed later because of 'not used' in SM.

Philip, can you test the patch under SM if it solves this issue?
Assignee: nobody → richard.marti
Status: NEW → ASSIGNED
Attachment #665964 - Flags: review?(philipp)
Attachment #665964 - Flags: feedback?(philip.chee)
Attachment #665964 - Flags: review?(philipp) → review+
Comment on attachment 665964 [details] [diff] [review]
patch

Bug 785692 has also approval for aurora. Then it makes sense to push this patch also to aurora.
Attachment #665964 - Flags: approval-calendar-aurora?
Comment on attachment 665964 [details] [diff] [review]
patch

Problem is this changes strings. Even though its the same known string, it is still a string change. If we want to push this to aurora, we will have to notify localizers using various channels.

If there is a different solution we can use on aurora only (even if its a hack like copying the string via JS), I would prefer that.
Attachment #665964 - Flags: approval-calendar-aurora? → approval-calendar-aurora-
(In reply to Philipp Kewisch [:Fallen] from comment #6)
> Problem is this changes strings. Even though its the same known string, it
> is still a string change. If we want to push this to aurora, we will have to
> notify localizers using various channels.
> 
> If there is a different solution we can use on aurora only (even if its a
> hack like copying the string via JS), I would prefer that.

Maybe Philip has a solution.
> Maybe Philip has a solution.
In lightning-toolbar.xul do something like:

<!DOCTYPE overlay [
  <!ENTITY % messengerDTD SYSTEM "chrome://messenger/locale/messenger.dtd"> %messengerDTD;
  <!ENTITY % mailOverlayDTD SYSTEM "chrome://messenger/locale/mailOverlay.dtd"> %mailOverlayDTD;
  <!ENTITY % menuOverlayDTD SYSTEM "chrome://calendar/locale/menuOverlay.dtd" > %menuOverlayDTD;
  <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd"> %lightningDTD;
  <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd" > %calendarDTD;
  <!ENTITY % toolbarDTD SYSTEM "chrome://lightning/locale/lightning-toolbar.dtd" > %toolbarDTD;
  <!ENTITY label "AppMenu">
  <!ENTITY appmenuButton.tooltip "Displays the Application Menu">
]>

In TB the entities are satisfied by messenger.dtd so the last two items I've just added aren't used. The SM messenger.dtd doesn't have those entities so processing will fall through to the entites at the bottom.

This means that in SeaMonkey the App Menu toolbar buttons get hard coded English strings, but that's OK since SeaMonkey doesn't have an App Menu widget. To make sure that the toolbar buttons don't appear in SeaMonkey we can add a couple of lines to suite-overlay-sidebar.xul like:

      <toolbarbutton id="calendar-appmenu-button" removeelement="true"/>
      <toolbarbutton id="task-appmenu-button" removeelement="true"/>
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/404b3c94f8b7

(sorry don't know what the target milestone should be set to)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Philip, this changeset is from Bug 785580. This patch isn't checked in. It's still awaiting your feedback.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch patch for aurora β€” β€” Splinter Review
Patch for aurora with the entities directly in the XUL file for SM.
Attachment #666635 - Flags: review?(philipp)
Attachment #666635 - Flags: approval-calendar-aurora?
Comment on attachment 666635 [details] [diff] [review]
patch for aurora

Review of attachment 666635 [details] [diff] [review]:
-----------------------------------------------------------------

::: calendar/lightning/content/lightning-toolbar.xul
@@ +10,5 @@
>    <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd"> %lightningDTD;
>    <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd" > %calendarDTD;
>    <!ENTITY % toolbarDTD SYSTEM "chrome://lightning/locale/lightning-toolbar.dtd" > %toolbarDTD;
> +  <!ENTITY lightning.toolbar.appmenuButton.label "AppMenu">
> +  <!ENTITY lightning.toolbar.appmenuButton.tooltip "Displays the Application Menu">

Maybe you could add a comment describing why its needed.
Attachment #666635 - Flags: review?(philipp)
Attachment #666635 - Flags: review+
Attachment #666635 - Flags: approval-calendar-aurora?
Attachment #666635 - Flags: approval-calendar-aurora+
Comment on attachment 665964 [details] [diff] [review]
patch

This is a GO! Thanks for the patch. I'll look into the aurora patch in a bit.
Attachment #665964 - Flags: feedback?(philip.chee) → feedback+
Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/7440e1d7892a
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0
Comment on attachment 666635 [details] [diff] [review]
patch for aurora

-                     label="&appmenuButton.label;"
-                     tooltiptext="&appmenuButton.tooltip;"/>
+                     label="&lightning.toolbar.appmenuButton.label;"
+                     tooltiptext="&lightning.toolbar.appmenuButton.tooltip;"/>

Oops I may have misled you. You need to keep the entities the same on aurora so that on Thunderbird you pick up the appmenuButton.* entities from messenger.dtd but on SeaMonkey from the hard coded entities in lightning-toolbar.xul

So this becomes:

+  <!ENTITY appmenuButton.label "AppMenu">
+  <!ENTITY appmenuButton.tooltip "Displays the Application Menu">

And the following changes are not needed:

-                     label="&appmenuButton.label;"
-                     tooltiptext="&appmenuButton.tooltip;"/>
+                     label="&lightning.toolbar.appmenuButton.label;"
+                     tooltiptext="&lightning.toolbar.appmenuButton.tooltip;"/>

f+ me with this change.
Attachment #666635 - Flags: approval-calendar-aurora+ → review-
Pushed only the entities with a comment to comm-aurora:
http://hg.mozilla.org/releases/comm-aurora/rev/a1b5c0435667
Target Milestone: 2.0 → 1.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: