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

RESOLVED FIXED in 1.9

Status

Calendar
Lightning: SeaMonkey Integration
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Philip Chee, Assigned: Paenglab)

Tracking

Lightning 1.9

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
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;"/>
(Reporter)

Comment 1

5 years ago
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?

Comment 3

5 years ago
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
(Assignee)

Comment 4

5 years ago
Created attachment 665964 [details] [diff] [review]
patch

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+
(Assignee)

Comment 5

5 years ago
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-
(Assignee)

Comment 7

5 years ago
(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.
(Reporter)

Comment 8

5 years ago
> 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"/>
(Reporter)

Comment 9

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

5 years ago
Philip, this changeset is from Bug 785580. This patch isn't checked in. It's still awaiting your feedback.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 11

5 years ago
Created attachment 666635 [details] [diff] [review]
patch for aurora

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+
(Reporter)

Comment 13

5 years ago
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+
(Assignee)

Comment 14

5 years ago
Pushed to comm-central: http://hg.mozilla.org/comm-central/rev/7440e1d7892a
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0
(Reporter)

Comment 15

5 years ago
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-
(Assignee)

Comment 16

5 years ago
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.