Fix localization of Edit menu

This commit is contained in:
Dan Stillman 2017-01-07 01:01:35 -05:00
parent 7444e63047
commit 5dbe677f25
5 changed files with 152 additions and 40 deletions

View file

@ -28,7 +28,7 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/standalone.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://zotero/content/standalone/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://zotero-platform/content/standalone/menuOverlay.xul"?>
<!DOCTYPE window [
@ -127,15 +127,13 @@
</menupopup>
</menu>
<menu id="editMenu" label="&editMenu.label;" accesskey="&editMenu.accesskey;">
<menu id="menu_edit">
<menupopup id="menu_EditPopup">
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy" label="&copyCmd.label;"
key="key_copy" accesskey="&copyCmd.accesskey;"
command="cmd_copy"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuseparator/>

View file

@ -0,0 +1,110 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- Zotero note: This file is copied from Firefox, with an include for the built-in editMenuOverlay.dtd,
which is available only in English in our Firefox build, replaced with our own .dtd files. -->
<!DOCTYPE window [
<!ENTITY % standaloneDTD SYSTEM "chrome://zotero/locale/standalone.dtd"> %standaloneDTD;
<!ENTITY % editMenuOverlayDTD SYSTEM "chrome://zotero/locale/mozilla/editMenuOverlay.dtd" > %editMenuOverlayDTD;
]>
<overlay id="editMenuOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://global/content/editMenuOverlay.js"/>
<commandset id="editMenuCommands">
<commandset id="editMenuCommandSetAll" commandupdater="true" events="focus,select"
oncommandupdate="goUpdateGlobalEditMenuItems()"/>
<commandset id="editMenuCommandSetUndo" commandupdater="true" events="undo"
oncommandupdate="goUpdateUndoEditMenuItems()"/>
<commandset id="editMenuCommandSetPaste" commandupdater="true" events="clipboard"
oncommandupdate="goUpdatePasteMenuItems()"/>
<command id="cmd_undo" oncommand="goDoCommand('cmd_undo')"/>
<command id="cmd_redo" oncommand="goDoCommand('cmd_redo')"/>
<command id="cmd_cut" oncommand="goDoCommand('cmd_cut')"/>
<command id="cmd_copy" oncommand="goDoCommand('cmd_copy')"/>
<command id="cmd_paste" oncommand="goDoCommand('cmd_paste')"/>
<command id="cmd_delete" oncommand="goDoCommand('cmd_delete')"/>
<command id="cmd_selectAll" oncommand="goDoCommand('cmd_selectAll')"/>
<command id="cmd_switchTextDirection" oncommand="goDoCommand('cmd_switchTextDirection');"/>
</commandset>
<!-- These key nodes are here only for show. The real bindings come from
XBL, in platformHTMLBindings.xml. See bugs 57078 and 71779. -->
<keyset id="editMenuKeys">
<key id="key_undo" key="&undoCmd.key;" modifiers="accel" command="cmd_undo"/>
<key id="key_redo" key="&undoCmd.key;" modifiers="accel,shift" command="cmd_redo"/>
<key id="key_cut" key="&cutCmd.key;" modifiers="accel" command="cmd_cut"/>
<key id="key_copy" key="&copyCmd.key;" modifiers="accel" command="cmd_copy"/>
<key id="key_paste" key="&pasteCmd.key;" modifiers="accel" command="cmd_paste"/>
<key id="key_delete" keycode="VK_DELETE" command="cmd_delete"/>
<key id="key_selectAll" key="&selectAllCmd.key;" modifiers="accel" command="cmd_selectAll"/>
<key id="key_find" key="&findCmd.key;" modifiers="accel" command="cmd_find"/>
<key id="key_findAgain" key="&findAgainCmd.key;" modifiers="accel" command="cmd_findAgain"/>
<key id="key_findPrevious" key="&findAgainCmd.key;" modifiers="shift,accel" command="cmd_findPrevious"/>
<key id="key_findAgain2" keycode="&findAgainCmd.key2;" command="cmd_findAgain"/>
<key id="key_findPrevious2" keycode="&findAgainCmd.key2;" modifiers="shift" command="cmd_findPrevious"/>
</keyset>
<!-- Edit Menu -->
<menu id="menu_edit" label="&editMenu.label;"
accesskey="&editMenu.accesskey;"/>
<menuitem id="menu_undo" label="&undoCmd.label;"
key="key_undo" accesskey="&undoCmd.accesskey;"
command="cmd_undo"/>
<menuitem id="menu_redo" label="&redoCmd.label;"
key="key_redo" accesskey="&redoCmd.accesskey;"
command="cmd_redo"/>
<menuitem id="menu_cut" label="&cutCmd.label;"
key="key_cut" accesskey="&cutCmd.accesskey;"
command="cmd_cut"/>
<menuitem id="menu_copy" label="&copyCmd.label;"
key="key_copy" accesskey="&copyCmd.accesskey;"
command="cmd_copy"/>
<menuitem id="menu_paste" label="&pasteCmd.label;"
key="key_paste" accesskey="&pasteCmd.accesskey;"
command="cmd_paste"/>
<menuitem id="menu_delete" label="&deleteCmd.label;"
key="key_delete" accesskey="&deleteCmd.accesskey;"
command="cmd_delete"/>
<menuitem id="menu_selectAll" label="&selectAllCmd.label;"
key="key_selectAll" accesskey="&selectAllCmd.accesskey;"
command="cmd_selectAll"/>
<menuitem id="menu_find" label="&findCmd.label;"
key="key_find" accesskey="&findCmd.accesskey;"
command="cmd_find"/>
<menuitem id="menu_findAgain" label="&findAgainCmd.label;"
key="key_findAgain" accesskey="&findAgainCmd.accesskey;"
command="cmd_findAgain"/>
<menuitem id="menu_findPrevious" label="&findPreviousCmd.label;"
key="key_findPrevious" accesskey="&findPreviousCmd.accesskey;"
command="cmd_findPrevious"/>
<menuitem id="cMenu_undo" label="&undoCmd.label;"
accesskey="&undoCmd.accesskey;" command="cmd_undo"/>
<menuitem id="cMenu_redo" label="&redoCmd.label;"
accesskey="&redoCmd.accesskey;" command="cmd_redo"/>
<menuitem id="cMenu_cut" label="&cutCmd.label;"
accesskey="&cutCmd.accesskey;" command="cmd_cut"/>
<menuitem id="cMenu_copy" label="&copyCmd.label;"
accesskey="&copyCmd.accesskey;" command="cmd_copy"/>
<menuitem id="cMenu_paste" label="&pasteCmd.label;"
accesskey="&pasteCmd.accesskey;" command="cmd_paste"/>
<menuitem id="cMenu_delete" label="&deleteCmd.label;"
accesskey="&deleteCmd.accesskey;" command="cmd_delete"/>
<menuitem id="cMenu_selectAll" label="&selectAllCmd.label;"
accesskey="&selectAllCmd.accesskey;" command="cmd_selectAll"/>
<menuitem id="cMenu_find" label="&findCmd.label;"
accesskey="&findCmd.accesskey;" command="cmd_find"/>
<menuitem id="cMenu_findAgain" label="&findAgainCmd.label;"
accesskey="&findAgainCmd.accesskey;" command="cmd_findAgain"/>
<menuitem id="cMenu_findPrevious" label="&findPreviousCmd.label;"
accesskey="&findPreviousCmd.accesskey;" command="cmd_findPrevious"/>
</overlay>

View file

@ -28,7 +28,7 @@
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/standalone.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://zotero/content/standalone/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://zotero/content/zoteroPane.xul"?>
<?xul-overlay href="chrome://zotero/content/itemPane.xul"?>
<?xul-overlay href="chrome://zotero-platform/content/standalone/menuOverlay.xul"?>
@ -128,15 +128,13 @@
</menupopup>
</menu>
<menu id="editMenu" label="&editMenu.label;" accesskey="&editMenu.accesskey;">
<menu id="menu_edit">
<menupopup id="menu_EditPopup">
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy" label="&copyCmd.label;"
key="key_copy" accesskey="&copyCmd.accesskey;"
command="cmd_copy"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_copyCitation" label="&copyCitationCmd.label;"
command="cmd_zotero_copyCitation"/>
<menuitem id="menu_copyBibliography" label="&copyBibliographyCmd.label;"

View file

@ -0,0 +1,35 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!ENTITY editMenu.label "Edit">
<!ENTITY editMenu.accesskey "e">
<!ENTITY undoCmd.label "Undo">
<!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey "u">
<!ENTITY redoCmd.label "Redo">
<!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "r">
<!ENTITY cutCmd.label "Cut">
<!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "t">
<!ENTITY copyCmd.label "Copy">
<!ENTITY copyCmd.key "C">
<!ENTITY copyCmd.accesskey "c">
<!ENTITY pasteCmd.label "Paste">
<!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "p">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY deleteCmd.accesskey "d">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "a">
<!ENTITY findCmd.label "Find">
<!ENTITY findCmd.key "F">
<!ENTITY findCmd.accesskey "F">
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY findAgainCmd.key "G">
<!ENTITY findAgainCmd.key2 "VK_F3">
<!ENTITY findAgainCmd.accesskey "g">
<!ENTITY findPreviousCmd.label "Find Previous">
<!ENTITY findPreviousCmd.accesskey "v">

View file

@ -30,38 +30,9 @@
<!ENTITY quitApplicationCmd.accesskey "Q">
<!--EDIT MENU-->
<!ENTITY editMenu.label "Edit">
<!ENTITY editMenu.accesskey "E">
<!ENTITY undoCmd.label "Undo">
<!ENTITY undoCmd.key "Z">
<!ENTITY undoCmd.accesskey "U">
<!ENTITY redoCmd.label "Redo">
<!ENTITY redoCmd.key "Y">
<!ENTITY redoCmd.accesskey "R">
<!ENTITY cutCmd.label "Cut">
<!ENTITY cutCmd.key "X">
<!ENTITY cutCmd.accesskey "t">
<!ENTITY copyCmd.label "Copy">
<!ENTITY copyCmd.key "C">
<!ENTITY copyCmd.accesskey "C">
<!ENTITY copyCitationCmd.label "Copy Citation">
<!ENTITY copyBibliographyCmd.label "Copy Bibliography">
<!ENTITY pasteCmd.label "Paste">
<!ENTITY pasteCmd.key "V">
<!ENTITY pasteCmd.accesskey "P">
<!ENTITY deleteCmd.label "Delete">
<!ENTITY deleteCmd.key "D">
<!ENTITY deleteCmd.accesskey "D">
<!ENTITY selectAllCmd.label "Select All">
<!ENTITY selectAllCmd.key "A">
<!ENTITY selectAllCmd.accesskey "A">
<!ENTITY preferencesCmd.label "Preferences">
<!ENTITY preferencesCmd.accesskey "O">
<!ENTITY preferencesCmdUnix.label "Preferences">
<!ENTITY preferencesCmdUnix.accesskey "n">
<!ENTITY findCmd.label "Find">
<!ENTITY findCmd.accesskey "F">
<!ENTITY findCmd.commandkey "f">
<!ENTITY bidiSwitchPageDirectionItem.label "Switch Page Direction">
<!ENTITY bidiSwitchPageDirectionItem.accesskey "g">
<!ENTITY bidiSwitchTextDirectionItem.label "Switch Text Direction">