Converted interface strings into localized entities/properties.
Fixed: New Item shows the metadata pane if it is not already shown.
This commit is contained in:
parent
0a234c9f70
commit
560864ad6b
9 changed files with 56 additions and 37 deletions
|
@ -279,7 +279,7 @@ Scholar.ItemGroup.prototype.getName = function()
|
|||
if(this.isCollection())
|
||||
return this.ref.getName();
|
||||
else if(this.isLibrary())
|
||||
return "Library";
|
||||
return Scholar.getString('pane.collections.library');
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ MetadataPane = new function()
|
|||
function viewItem(thisItem)
|
||||
{
|
||||
if(_editButton.hidden)
|
||||
toggleEdit(confirm("Save changes to '"+_itemBeingEdited.getField('title')+"'?"));
|
||||
toggleEdit(confirm(Scholar.getString('metadata.savechanges').replace('%1',_itemBeingEdited.getField('title'))));
|
||||
|
||||
_itemBeingEdited = thisItem;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE window SYSTEM "chrome://scholar/locale/scholar.dtd">
|
||||
|
||||
<overlay
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
@ -16,7 +17,7 @@
|
|||
</rows>
|
||||
</grid>
|
||||
<toolbar id="metadata-creators-toolbar" hidden="true">
|
||||
<label value="Creators"/>
|
||||
<label value="&metadata.creators.label;"/>
|
||||
<spacer flex="1"/>
|
||||
<toolbarbutton label="+" oncommand="MetadataPane.addCreator()" class="addremove"/>
|
||||
</toolbar>
|
||||
|
@ -34,9 +35,9 @@
|
|||
</grid>
|
||||
<spacer flex="1"/>
|
||||
<toolbar id="metadata-toolbar">
|
||||
<toolbarbutton id="metadata-pane-edit-button" label="Edit" oncommand="MetadataPane.toggleEdit()"/>
|
||||
<toolbarbutton id="metadata-pane-cancel-button" label="Cancel" oncommand="MetadataPane.toggleEdit()" hidden="true"/>
|
||||
<toolbarbutton id="metadata-pane-save-button" label="Save" oncommand="MetadataPane.toggleEdit(true)" hidden="true"/>
|
||||
<toolbarbutton id="metadata-pane-edit-button" label="&metadata.edit.label;" oncommand="MetadataPane.toggleEdit()"/>
|
||||
<toolbarbutton id="metadata-pane-cancel-button" label="&metadata.cancel.label;" oncommand="MetadataPane.toggleEdit()" hidden="true"/>
|
||||
<toolbarbutton id="metadata-pane-save-button" label="&metadata.save.label;" oncommand="MetadataPane.toggleEdit(true)" hidden="true"/>
|
||||
<spacer flex="1" />
|
||||
</toolbar>
|
||||
</vbox>
|
||||
|
|
|
@ -74,13 +74,14 @@ var ScholarPane = new function()
|
|||
*/
|
||||
function newItem(typeID)
|
||||
{
|
||||
document.getElementById('scholar-floater').hidden=false;
|
||||
MetadataPane.viewItem(new Scholar.Item(typeID));
|
||||
MetadataPane.toggleEdit();
|
||||
}
|
||||
|
||||
function newCollection()
|
||||
{
|
||||
Scholar.Collections.add('Untitled Collection');
|
||||
Scholar.Collections.add(Scholar.getString('pane.collections.untitled'));
|
||||
}
|
||||
|
||||
function folderSelected()
|
||||
|
@ -130,13 +131,13 @@ var ScholarPane = new function()
|
|||
|
||||
function deleteItemSelection()
|
||||
{
|
||||
if(itemsView && itemsView.selection.count > 0 && confirm("Are you sure you want to delete the selected items?"))
|
||||
if(itemsView && itemsView.selection.count > 0 && confirm(Scholar.getString('pane.items.delete')))
|
||||
itemsView.deleteSelection();
|
||||
}
|
||||
|
||||
function deleteCollectionSelection()
|
||||
{
|
||||
if(foldersView.selection.count > 0 && confirm("Are you sure you want to delete the selected collections?"))
|
||||
if(foldersView.selection.count > 0 && confirm(Scholar.getString('pane.collections.delete')))
|
||||
foldersView.deleteSelection();
|
||||
}
|
||||
|
||||
|
@ -146,7 +147,7 @@ var ScholarPane = new function()
|
|||
{
|
||||
collection = foldersView._getItemAtRow(foldersView.selection.currentIndex);
|
||||
|
||||
var newName = prompt('Rename collection:',collection.getName());
|
||||
var newName = prompt(Scholar.getString('pane.collections.rename'),collection.getName());
|
||||
if(newName)
|
||||
collection.ref.rename(newName);
|
||||
}
|
||||
|
@ -180,7 +181,7 @@ var ScholarItemsDragObserver =
|
|||
onDragStart: function (evt,transferData,action)
|
||||
{
|
||||
transferData.data=new TransferData();
|
||||
transferData.data.addDataForFlavour("text/unicode","finally");
|
||||
transferData.data.addDataForFlavour("text/unicode","random data");
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
<vbox id="scholar-floater" hidden="true">
|
||||
<vbox id="scholar-metadata">
|
||||
<toolbar>
|
||||
<label value="Metadata"/>
|
||||
<label value="&metadata.label;"/>
|
||||
<spacer flex="1"/>
|
||||
<toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleView('metadata')"/>
|
||||
</toolbar>
|
||||
</vbox>
|
||||
<vbox id="scholar-notes">
|
||||
<toolbar>
|
||||
<label value="Notes"/>
|
||||
<label value="¬es.label;"/>
|
||||
<spacer flex="1"/>
|
||||
<toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleView('notes')"/>
|
||||
</toolbar>
|
||||
|
@ -43,8 +43,8 @@
|
|||
<hbox id="scholar-pane" position="1" persist="height collapsed">
|
||||
<vbox persist="width" flex="1">
|
||||
<toolbar>
|
||||
<toolbarbutton label="&menuitem.newCollection.label;" command="cmd_scholar_newCollection"/>
|
||||
<toolbarbutton id="tb-rename" label="Rename Collection" oncommand="ScholarPane.renameSelectedCollection();" disabled="true"/>
|
||||
<toolbarbutton label="&toolbar.newCollection.label;" command="cmd_scholar_newCollection"/>
|
||||
<toolbarbutton id="tb-rename" label="&toolbar.renameCollection.label;" oncommand="ScholarPane.renameSelectedCollection();" disabled="true"/>
|
||||
</toolbar>
|
||||
<tree id="folders-tree" hidecolumnpicker="true"
|
||||
onselect="ScholarPane.folderSelected();" seltype="single"
|
||||
|
@ -64,15 +64,15 @@
|
|||
<splitter id="scholar-tree-splitter" resizebefore="closest" resizeafter="closest"/>
|
||||
<vbox persist="width" flex="5">
|
||||
<toolbar align="center">
|
||||
<toolbarbutton id="tb-add" label="&menuitem.newItem.label;" type="menu">
|
||||
<toolbarbutton id="tb-add" label="&toolbar.newItem.label;" type="menu">
|
||||
<menupopup>
|
||||
</menupopup>
|
||||
</toolbarbutton>
|
||||
<spacer flex="1"/>
|
||||
<toolbarbutton class="scholar-toggler" id="tb-metadata" label="Metadata" checked="true" oncommand="ScholarPane.toggleView('metadata')"/>
|
||||
<toolbarbutton class="scholar-toggler" id="tb-notes" label="Notes" checked="true" oncommand="ScholarPane.toggleView('notes')"/>
|
||||
<toolbarbutton class="scholar-toggler" id="tb-metadata" label="&toolbar.metadata.label;" checked="true" oncommand="ScholarPane.toggleView('metadata')"/>
|
||||
<toolbarbutton class="scholar-toggler" id="tb-notes" label="&toolbar.notes.label;" checked="true" oncommand="ScholarPane.toggleView('notes')"/>
|
||||
<spacer flex="1"/>
|
||||
<label value="Search:" control="tb-search"/>
|
||||
<label value="&toolbar.search.label;" control="tb-search"/>
|
||||
<textbox id="tb-search" type="timed" timeout="500" command="cmd_scholar_search"/>
|
||||
<toolbarbutton class="tabs-closebutton" oncommand="ScholarPane.toggleDisplay()"/>
|
||||
</toolbar>
|
||||
|
@ -137,7 +137,7 @@
|
|||
<menupopup id="menu_ToolsPopup">
|
||||
<menuseparator id="scholarSeparator" insertbefore="devToolsSeparator"/>
|
||||
<menuitem id="tools-scholar" insertbefore="devToolsSeparator"
|
||||
oncommand="ScholarPane.toggleDisplay();" label="Scholar"
|
||||
oncommand="ScholarPane.toggleDisplay();" label="&scholar.name;"
|
||||
key="key_openScholar"/>
|
||||
</menupopup>
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE window SYSTEM "chrome://scholar/locale/preferences.dtd">
|
||||
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<dialog id="winMain" title="Scholar Preferences" style="min-width:400px;"
|
||||
<dialog id="winMain" title="&scholar.preferences.title;" style="min-width:400px;"
|
||||
onload="init();" ondialogaccept="accept()"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<script src="preferences.js"/>
|
||||
<script src="include.js"/>
|
||||
|
||||
<dialogheader id="header" title="Scholar" description="Scholar Preferences"/>
|
||||
<dialogheader id="header" title="&scholar.name;" description="&scholar.preferences.title;"/>
|
||||
|
||||
<checkbox id="whateverBox" label="Whatever!"/>
|
||||
|
||||
|
|
2
chrome/chromeFiles/locale/en-US/scholar/preferences.dtd
Normal file
2
chrome/chromeFiles/locale/en-US/scholar/preferences.dtd
Normal file
|
@ -0,0 +1,2 @@
|
|||
<!ENTITY scholar.name "Scholar">
|
||||
<!ENTITY scholar.preferences.title "Scholar Preferences">
|
|
@ -1,3 +1,13 @@
|
|||
<!ENTITY scholar.name "Scholar">
|
||||
|
||||
<!ENTITY metadata.label "Metadata">
|
||||
<!ENTITY notes.label "Notes">
|
||||
|
||||
<!ENTITY metadata.creators.label "Creators">
|
||||
<!ENTITY metadata.edit.label "Edit">
|
||||
<!ENTITY metadata.cancel.label "Cancel">
|
||||
<!ENTITY metadata.save.label "Save">
|
||||
|
||||
<!ENTITY items.title_column "Title">
|
||||
<!ENTITY items.creator_column "Creator">
|
||||
<!ENTITY items.source_column "Source">
|
||||
|
@ -7,20 +17,12 @@
|
|||
|
||||
<!ENTITY collections.name_column "Name">
|
||||
|
||||
<!ENTITY creators.firstname "First name">
|
||||
<!ENTITY creators.lastname "Last name">
|
||||
<!ENTITY creators.type "Type">
|
||||
|
||||
<!ENTITY fileMenu.label "File">
|
||||
<!ENTITY fileMenu.accesskey "F">
|
||||
<!ENTITY viewMenu.label "View">
|
||||
<!ENTITY viewMenu.accesskey "V">
|
||||
|
||||
<!ENTITY menuitem.newItem.label "New Item...">
|
||||
<!ENTITY menuitem.newItem.accesskey "n">
|
||||
<!ENTITY menuitem.newCollection.label "New Collection...">
|
||||
<!ENTITY menuitem.newFolder.accesskey "o">
|
||||
|
||||
<!ENTITY toolbar.newItem.label "New Item">
|
||||
<!ENTITY toolbar.newCollection.label "New Project">
|
||||
<!ENTITY toolbar.renameCollection.label "Rename Project...">
|
||||
<!ENTITY toolbar.search.label "Search:">
|
||||
<!ENTITY toolbar.metadata.label "Metadata">
|
||||
<!ENTITY toolbar.notes.label "Notes">
|
||||
|
||||
<!ENTITY closeCmd.label "Close">
|
||||
<!ENTITY closeCmd.accesskey "C">
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
pane.items.delete = Are you sure you want to delete the selected item?
|
||||
pane.items.delete.multiple = Are you sure you want to delete the selected items?
|
||||
pane.collections.delete = Are you sure you want to delete the selected collection?
|
||||
pane.collections.delete.multiple = Are you sure you want to delete the selected collections?
|
||||
pane.collections.rename = Rename collection:
|
||||
|
||||
pane.collections.library = Library
|
||||
pane.collections.untitled = Untitled Collection
|
||||
|
||||
metadata.savechanges = Do you want to save changes to '%1'?
|
||||
|
||||
itemFields.title = Title
|
||||
itemFields.dateAdded = Date Added
|
||||
itemFields.dateModified = Modified
|
||||
|
|
Loading…
Reference in a new issue