commit 5e8c9669ea1a577632d6e0e1cde89089fc7fcd4b
parent 498f06c49b71624a72ae665a9de42e02349425eb
Author: Simon Kornblith <simon@simonster.com>
Date: Mon, 11 Jul 2011 17:14:51 +0000
Closes #1863, Add transform -> sentence case option
Diffstat:
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml
@@ -1825,6 +1825,9 @@
case 'title':
var newVal = Zotero.Utilities.capitalizeTitle(val.toLowerCase(), true);
break;
+ case 'sentence':
+ var newVal = val.length ? val[0].toUpperCase()+val.substr(1).toLowerCase() : val;
+ break;
default:
throw ("Invalid transform mode '" + mode + "' in zoteroitembox.textTransform()");
}
@@ -2264,10 +2267,12 @@
<menupopup id="field-menu">
<menu label="&zotero.item.textTransform;">
<menupopup>
- <menuitem label="&zotero.item.textTransform.lowercase;" class="menuitem-non-iconic"
- oncommand="document.getBindingParent(this).textTransform(document.popupNode, 'lower')"/>
<menuitem label="&zotero.item.textTransform.titlecase;" class="menuitem-non-iconic"
oncommand="document.getBindingParent(this).textTransform(document.popupNode, 'title')"/>
+ <menuitem label="&zotero.item.textTransform.sentencecase;" class="menuitem-non-iconic"
+ oncommand="document.getBindingParent(this).textTransform(document.popupNode, 'sentence')"/>
+ <menuitem label="&zotero.item.textTransform.lowercase;" class="menuitem-non-iconic"
+ oncommand="document.getBindingParent(this).textTransform(document.popupNode, 'lower')"/>
</menupopup>
</menu>
</menupopup>
diff --git a/chrome/locale/en-US/zotero/zotero.dtd b/chrome/locale/en-US/zotero/zotero.dtd
@@ -99,6 +99,7 @@
<!ENTITY zotero.item.textTransform "Transform Text">
<!ENTITY zotero.item.textTransform.lowercase "lower case">
<!ENTITY zotero.item.textTransform.titlecase "Title Case">
+<!ENTITY zotero.item.textTransform.sentencecase "Sentence case">
<!ENTITY zotero.toolbar.newNote "New Note">
<!ENTITY zotero.toolbar.note.standalone "New Standalone Note">