commit 6fd3b298de15073f7542ab295856c2150559142b
parent 90625e8a0502c3ffe56c2666b7167cff2edc495c
Author: rmzelle <rintze.zelle@gmail.com>
Date: Mon, 12 Jan 2015 21:34:47 -0500
Rename Reference Test and Preview panes
* Also start localization of Zotero Style Preview
Diffstat:
5 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/chrome/content/zotero/tools/csledit.xul b/chrome/content/zotero/tools/csledit.xul
@@ -30,7 +30,7 @@
id="csl-edit"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Zotero_CSL_Editor.init();"
- title="Zotero Reference Test pane">
+ title="Zotero Style Editor">
<script src="chrome://zotero/content/include.js"/>
diff --git a/chrome/content/zotero/tools/cslpreview.xul b/chrome/content/zotero/tools/cslpreview.xul
@@ -27,11 +27,13 @@
<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
+<!DOCTYPE window SYSTEM "chrome://zotero/locale/cslpreview.dtd">
+
<window
id="csl-preview"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Zotero_CSL_Preview.init();"
- title="Zotero Preview pane">
+ title="&zotero.cslpreview;">
<script src="chrome://zotero/content/include.js"/>
@@ -46,13 +48,13 @@
//refresh();
var iframe = document.getElementById('zotero-csl-preview-box');
- iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p>Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.</p></body></html>';
+ iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p>' + Zotero.getString('cslpreview.instruction') + '</p></body></html>';
}
function refresh() {
var iframe = document.getElementById('zotero-csl-preview-box');
var items = Zotero.getActiveZoteroPane().getSelectedItems();
if (items.length === 0) {
- iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p style="color: red">No items selected in Zotero.</p></body></html>';
+ iframe.contentDocument.documentElement.innerHTML = '<html><head><title></title></head><body><p style="color: red">' + Zotero.getString('cslpreview.warning.noItems') + '</p></body></html>';
return;
}
var progressWin = new Zotero.ProgressWindow();
@@ -120,21 +122,21 @@
}();
]]>
</script>
- <!-- NEEDS LOCALISING -->
+
<vbox flex="1">
<hbox >
<hbox align="center">
- <button id="preview-refresh-button" label="Refresh" oncommand="Zotero_CSL_Preview.refresh()"/>
+ <button id="preview-refresh-button" label="&zotero.cslpreview.refresh;" oncommand="Zotero_CSL_Preview.refresh()"/>
<groupbox orient="horizontal" align="center">
- <label value="Citation format:" />
+ <label value="&zotero.cslpreview.citationFormat;" />
<menulist id="citation-format" oncommand="Zotero_CSL_Preview.refresh()">
<menupopup>
- <menuitem label="all" value="all"/>
- <menuitem label="author" value="author"/>
- <menuitem label="author-date" value="author-date"/>
- <menuitem label="label" value="label"/>
- <menuitem label="note" value="note"/>
- <menuitem label="numeric" value="numeric"/>
+ <menuitem value="all" label="&zotero.cslpreview.citationFormat.all;"/>
+ <menuitem value="author" label="&zotero.cslpreview.citationFormat.author;"/>
+ <menuitem value="author-date" label="&zotero.cslpreview.citationFormat.authorDate;"/>
+ <menuitem value="label" label="&zotero.cslpreview.citationFormat.label;"/>
+ <menuitem value="note" label="&zotero.cslpreview.citationFormat.note;"/>
+ <menuitem value="numeric" label="&zotero.cslpreview.citationFormat.numeric;"/>
</menupopup>
</menulist>
</groupbox>
diff --git a/chrome/locale/en-US/zotero/cslpreview.dtd b/chrome/locale/en-US/zotero/cslpreview.dtd
@@ -0,0 +1,10 @@
+<!ENTITY zotero.cslpreview "Zotero Style Preview">
+<!ENTITY zotero.cslpreview.refresh "Refresh">
+
+<!ENTITY zotero.cslpreview.citationFormat "Citation Format:">
+<!ENTITY zotero.cslpreview.citationFormat.all "all">
+<!ENTITY zotero.cslpreview.citationFormat.author "author">
+<!ENTITY zotero.cslpreview.citationFormat.authorDate "author-date">
+<!ENTITY zotero.cslpreview.citationFormat.label "label">
+<!ENTITY zotero.cslpreview.citationFormat.note "note">
+<!ENTITY zotero.cslpreview.citationFormat.numeric "numeric">
diff --git a/chrome/locale/en-US/zotero/preferences.dtd b/chrome/locale/en-US/zotero/preferences.dtd
@@ -204,6 +204,6 @@
<!ENTITY zotero.preferences.debugOutputLogging.submitToServer "Submit to Zotero Server">
<!ENTITY zotero.preferences.openAboutConfig "Open about:config">
-<!ENTITY zotero.preferences.openCSLEdit "Open CSL Editor">
-<!ENTITY zotero.preferences.openCSLPreview "Open CSL Preview">
-<!ENTITY zotero.preferences.openAboutMemory "Open about:memory">
-\ No newline at end of file
+<!ENTITY zotero.preferences.openCSLEdit "Open Style Editor">
+<!ENTITY zotero.preferences.openCSLPreview "Open Style Preview">
+<!ENTITY zotero.preferences.openAboutMemory "Open about:memory">
diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties
@@ -968,3 +968,6 @@ firstRunGuidance.quickFormat = Type a title or author to search for a reference.
firstRunGuidance.quickFormatMac = Type a title or author to search for a reference.\n\nAfter you've made your selection, click the bubble or press Cmd-\u2193 to add page numbers, prefixes, or suffixes. You can also include a page number along with your search terms to add it directly.\n\nYou can edit citations directly in the word processor document.
firstRunGuidance.toolbarButton.new = Click here to open Zotero, or use the %S keyboard shortcut.
firstRunGuidance.toolbarButton.upgrade = The Zotero icon can now be found in the Firefox toolbar. Click the icon to open Zotero, or use the %S keyboard shortcut.
+
+cslpreview.instruction = Select one or more items in Zotero and click the "Refresh" button to see how these items are rendered by the installed CSL citation styles.
+cslpreview.warning.noItems = No items selected in Zotero.