Book -> Item

This commit is contained in:
j 2024-08-14 12:23:48 +02:00
parent 5c4ea79dbc
commit 2a7ed2bd2c
14 changed files with 34 additions and 34 deletions

View file

@ -286,7 +286,7 @@
],
"itemViews": [
{"id": "info", "title": "Info"},
{"id": "book", "title": "Book"}
{"id": "book", "title": "Item"}
],
"lists": [
{"title": "Reading List"},

View file

@ -435,7 +435,7 @@ class List(db.Model):
if self.name:
name = os.path.join('Lists', self.name)
else:
name = 'Books'
name = 'Items'
path = os.path.join(os.path.expanduser(settings.preferences['libraryPath']), name, 'library.json')
ox.makedirs(os.path.dirname(path))
items = []

View file

@ -7,7 +7,7 @@ oml.ui.backButton = function() {
that = Ox.Button({
style: 'squared',
title: 'arrowLeft',
tooltip: Ox._('Back to Books {0}', [Ox.SYMBOLS.control + 'W']),
tooltip: Ox._('Back to Items {0}', [Ox.SYMBOLS.control + 'W']),
type: 'image'
})
.css({
@ -25,4 +25,4 @@ oml.ui.backButton = function() {
return that;
};
};

View file

@ -47,7 +47,7 @@ oml.ui.editDialog = function() {
removeOnClose: true,
title: Ox._('Edit Metadata for {0}', [
Ox.formatNumber(ids.length) + ' ' + (
ids.length == 1 ? 'Book' : 'Books'
ids.length == 1 ? 'Item' : 'Items'
)
]),
width: 512

View file

@ -198,7 +198,7 @@ oml.ui.identifyDialog = function(data) {
fixedSize: true,
height: 384,
removeOnClose: true,
title: Ox._('Identify Book'),
title: Ox._('Identify Item'),
width: 768
});

View file

@ -10,8 +10,8 @@ oml.ui.importExportDialog = function() {
$buttons = Ox.ButtonGroup({
buttons: [
{id: 'import', title: Ox._('Import Books')},
{id: 'export', title: Ox._('Export Books')}
{id: 'import', title: Ox._('Import Items')},
{id: 'export', title: Ox._('Export Items')}
],
min: 1,
max: 1,
@ -66,7 +66,7 @@ oml.ui.importExportDialog = function() {
content: Ox.LoadingScreen().start(),
height: 144,
removeOnClose: true,
title: Ox._('Import & Export Books'),
title: Ox._('Import & Export Items'),
width: 512
})
.bindEvent({
@ -96,7 +96,7 @@ oml.ui.importExportDialog = function() {
activity = result.data.activity;
/*
result.data = {
path: '/Users/rolux/Desktop/Books',
path: '/Users/rolux/Desktop/Items',
status: {},
progress: [0,42]
};

View file

@ -39,7 +39,7 @@ oml.ui.importScreen = function() {
color: 'rgb(0, 0, 0)',
textAlign: 'center'
})
.text(Ox._('Import Books'))
.text(Ox._('Import Items'))
.appendTo(that);
return that;

View file

@ -153,7 +153,7 @@ oml.ui.infoView = function(externalData, isMixed) {
return Ox.Button({
disabled: data.mediastate != 'available',
style: 'squared',
title: Ox._('Identify Book...'),
title: Ox._('Identify Item...'),
width: 128
})
.css({marginTop: '8px'})
@ -206,7 +206,7 @@ oml.ui.infoView = function(externalData, isMixed) {
elements: [
Ox.Button({
style: 'squared',
title: Ox._('Download Book'),
title: Ox._('Download Item'),
width: 112
})
.bindEvent({
@ -227,7 +227,7 @@ oml.ui.infoView = function(externalData, isMixed) {
overlap: 'left',
style: 'squared',
title: 'select',
tooltip: Ox._('Download Book to a List'),
tooltip: Ox._('Download Item to a List'),
type: 'image'
})
.bindEvent({
@ -282,7 +282,7 @@ oml.ui.infoView = function(externalData, isMixed) {
elements: [
Ox.Button({
style: 'squared',
title: Ox._('Book Missing'),
title: Ox._('Item Missing'),
width: 112
})
.bindEvent({
@ -317,7 +317,7 @@ oml.ui.infoView = function(externalData, isMixed) {
elements: [
Ox.Button({
style: 'squared',
title: Ox._('Read Book'),
title: Ox._('Read Item'),
width: 112
})
.bindEvent({
@ -336,7 +336,7 @@ oml.ui.infoView = function(externalData, isMixed) {
overlap: 'left',
style: 'squared',
title: 'select',
tooltip: Ox._('Download Book to a List'),
tooltip: Ox._('Download Item to a List'),
type: 'image'
})
.bindEvent({

View file

@ -14,7 +14,7 @@ oml.ui.itemViewButtons = function() {
{
id: 'book',
title: 'book',
tooltip: Ox._('Read Book')
tooltip: Ox._('Read Item')
}
],
selectable: true,

View file

@ -93,7 +93,7 @@ oml.ui.mainMenu = function() {
items: [
{
id: 'books',
title: Ox._('Books'),
title: Ox._('Items'),
checked: true
},
{
@ -113,7 +113,7 @@ oml.ui.mainMenu = function() {
{},
{
id: 'listviewSubmenu',
title: Ox._('Books'),
title: Ox._('Items'),
items: [
{
group: 'listview',
@ -136,7 +136,7 @@ oml.ui.mainMenu = function() {
},
{
id: 'itemviewSubmenu',
title: Ox._('Book'),
title: Ox._('Item'),
items: [
{
group: 'itemview',
@ -265,11 +265,11 @@ oml.ui.mainMenu = function() {
items: [
{
id: 'sortitems',
title: Ox._('Sort Books by'),
title: Ox._('Sort Items by'),
items: [
{
group: 'sort',
title: Ox._('Sort Books by'),
title: Ox._('Sort Items by'),
min: 1,
max: 1,
items: oml.config.sortKeys.map(function(key) {
@ -284,7 +284,7 @@ oml.ui.mainMenu = function() {
},
{
id: 'orderitems',
title: Ox._('Order Books'),
title: Ox._('Order Items'),
items: [
{
group: 'order',
@ -770,21 +770,21 @@ oml.ui.mainMenu = function() {
unavailableItems = selectionItems - availableItems,
selectionItemName = (
selectionItems > 1 ? Ox.formatNumber(selectionItems) + ' ' : ''
) + Ox._(selectionItems == 1 ? 'Book' : 'Books'),
) + Ox._(selectionItems == 1 ? 'Item' : 'Items'),
downloadItemName = (
selectionItems > 1 && unavailableItems ? Ox.formatNumber(unavailableItems) + ' ' + (
availableItems ? ' of ' + Ox.formatNumber(selectionItems) + ' ' : ''
) : '') + Ox._(selectionItems == 1 ? 'Book' : 'Books'),
) : '') + Ox._(selectionItems == 1 ? 'Item' : 'Items'),
editItemName = (
selectionItems > 1 && availableItems ? Ox.formatNumber(availableItems) + ' ' + (
unavailableItems ? ' of ' + Ox.formatNumber(selectionItems) + ' ' : ''
) : '') + Ox._(selectionItems == 1 ? 'Book' : 'Books'),
) : '') + Ox._(selectionItems == 1 ? 'Item' : 'Items'),
clipboardItems = oml.clipboard.items(),
clipboardType = oml.clipboard.type(),
clipboardItemName = !clipboardItems ? ''
: (
clipboardItems > 1 ? Ox.formatNumber(clipboardItems) + ' ' : ''
) + Ox._(clipboardItems == 1 ? 'Book' : 'Books'),
) + Ox._(clipboardItems == 1 ? 'Item' : 'Items'),
canSelect = !ui.item,
canDownload = !!unavailableItems || (oml.readOnly && selectionItems == 1),
canCopy = canSelect && selectionItems,
@ -805,11 +805,11 @@ oml.ui.mainMenu = function() {
items: [].concat(oml.readOnly ? [] : [
{
id: 'import',
title: Ox._(oml.user.importing ? 'Importing Books...' : 'Import Books...') // FIXME
title: Ox._(oml.user.importing ? 'Importing Items...' : 'Import Items...') // FIXME
},
{
id: 'export',
title: Ox._(oml.user.exporting ? 'Exporting Books...' : 'Export Books...') // FIXME
title: Ox._(oml.user.exporting ? 'Exporting Items...' : 'Export Items...') // FIXME
},
{},
]).concat([

View file

@ -7,7 +7,7 @@ oml.ui.openButton = function() {
that = Ox.Button({
style: 'squared',
title: 'arrowRight',
tooltip: Ox._('Open Book {0}', [Ox.SYMBOLS.return]),
tooltip: Ox._('Open Item {0}', [Ox.SYMBOLS.return]),
type: 'image'
})
.css({

View file

@ -27,7 +27,7 @@ oml.ui.preferencesPanel = function() {
title: 'Library Path',
type: 'selectfolder',
value: preferences.libraryPath,
help: 'The directory in which your "Books" folder is located. This is where your media files are stored. It can be on your local machine, but just as well on an external drive or networked volume.'
help: 'The directory in which your "Items" folder is located. This is where your media files are stored. It can be on your local machine, but just as well on an external drive or networked volume.'
},
{
id: 'importPath',

View file

@ -6,7 +6,7 @@ oml.ui.sectionButtons = function() {
that = Ox.ButtonGroup({
buttons: [
{id: 'books', title: Ox._('Books')},
{id: 'books', title: Ox._('Items')},
{id: 'music', title: Ox._('Music'), disabled: true},
{id: 'movies', title: Ox._('Movies'), disabled: true}
],

View file

@ -186,7 +186,7 @@ oml.createLinks = function($element) {
},
length = items.length,
text = Ox._(actions[action]) + ' ' + (
length == 1 ? 'Book' : 'Books'
length == 1 ? 'Item' : 'Items'
);
oml.history.add({
action: action,