Last Comment Bug 765899 - Duplicate entity names for accesskeys in lightning-toolbar.dtd (lightning.toolbar.calendar.accesskey and lightning.toolbar.task.accesskey)
: Duplicate entity names for accesskeys in lightning-toolbar.dtd (lightning.too...
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Lightning Only (show other bugs)
: unspecified
: All All
: -- normal (vote)
: 1.9
Assigned To: Philipp Kewisch [:Fallen]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-18 14:06 PDT by Benoit
Modified: 2012-08-09 11:36 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Fix - v1 (2.27 KB, patch)
2012-07-21 12:34 PDT, Philipp Kewisch [:Fallen]
benoit.leseul: review+
Details | Diff | Review

Description Benoit 2012-06-18 14:06:22 PDT
The following entities are declared twice in lightning-toolbar.dtd and used in different contexts. This is confusing and causes localizability issues because the labels are not the same.

* lightning.toolbar.calendar.accesskey: used both for lightning.toolbar.calendar.name and lightning.toolbar.calendar.label
http://hg.mozilla.org/comm-central/file/5885cc4465d8/calendar/locales/en-US/chrome/lightning/lightning-toolbar.dtd#l38 
http://hg.mozilla.org/comm-central/file/5885cc4465d8/calendar/locales/en-US/chrome/lightning/lightning-toolbar.dtd#l53

* lightning.toolbar.task.accesskey: used both for lightning.toolbar.task.name and lightning.toolbar.task.label
http://hg.mozilla.org/comm-central/file/5885cc4465d8/calendar/locales/en-US/chrome/lightning/lightning-toolbar.dtd#l40
http://hg.mozilla.org/comm-central/file/5885cc4465d8/calendar/locales/en-US/chrome/lightning/lightning-toolbar.dtd#l56

I think the so-called "mode toolbar" is actually the Thunderbird menubar, so maybe the second occurrence should be named lightning.menubar.*

The menu declaration is here: http://hg.mozilla.org/comm-central/file/5885cc4465d8/calendar/lightning/content/lightning-menus.xul#l352
Comment 1 Philipp Kewisch [:Fallen] 2012-07-21 12:34:08 PDT
Created attachment 644671 [details] [diff] [review]
Fix - v1

Hi Benoit,

is this patch sufficient, or is the issue rather that lightning.toolbar.calendar.label is used both in lightning-menus.xul and lightning-toolbar.xul

I've also removed the Mail string since its unused.
Comment 2 Benoit 2012-07-21 14:39:22 PDT
Comment on attachment 644671 [details] [diff] [review]
Fix - v1

The main problem is the redeclaration of the same entity name in the same file. The unsuspecting localizer would try to change the first occurrence and see no result since the last declaration wins. This patch seems sufficient to fix that issue.

About your other question, it is always a little unsafe to use the same label in different contexts. Though I'm not sure it applies here, I can imagine someone wanting to shorten a toolbar label while keeping the full string in the menu.
Comment 3 Philipp Kewisch [:Fallen] 2012-08-09 11:36:05 PDT
Pushed to comm-central changeset f5543c0aa4e6

Note You need to log in before you can comment on or make changes to this bug.