Closed Bug 765899 Opened 12 years ago Closed 12 years ago

Duplicate entity names for accesskeys in lightning-toolbar.dtd (lightning.toolbar.calendar.accesskey and lightning.toolbar.task.accesskey)

Categories

(Calendar :: Lightning Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benoit.leseul, Assigned: Fallen)

Details

Attachments

(1 file)

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
Attached patch Fix - v1 β€” β€” Splinter Review
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.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #644671 - Flags: review?(benoit.leseul)
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.
Attachment #644671 - Flags: review?(benoit.leseul) → review+
Pushed to comm-central changeset f5543c0aa4e6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: