From: Oleg Broytman Date: Mon, 11 Jun 2018 13:31:43 +0000 (+0300) Subject: Feat(db): Add book.lang/ext properties X-Git-Tag: 0.1.4~1 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=c72b7b2964eeb0ff44e80234ade3ec03c7a2d3c2;p=m_librarian.git Feat(db): Add book.lang/ext properties --- diff --git a/m_librarian.conf.sample b/m_librarian.conf.sample index 4b68519..95fcb82 100644 --- a/m_librarian.conf.sample +++ b/m_librarian.conf.sample @@ -32,7 +32,7 @@ use_in_books_list = 1 author = fullname count # Full list of book columns: # book = title series ser_no archive file size lib_id deleted date -# author1 author_list +# author1 author_list ext lang # genre1name genre1title genre_name_list genre_title_list # author1 is just one author from the list if there are more than 1 # author_list is a comma-separated list of full names diff --git a/m_librarian/db.py b/m_librarian/db.py index 88b0b11..d910688 100755 --- a/m_librarian/db.py +++ b/m_librarian/db.py @@ -96,6 +96,14 @@ class Book(SQLObject): def genre_title_list(self): return u', '.join([g.title for g in self.genres]) + @property + def ext(self): + return self.extension.name + + @property + def lang(self): + return self.language.name + class BookGenre(SQLObject): class sqlmeta: diff --git a/m_librarian/translations/ru.mo b/m_librarian/translations/ru.mo index 5794760..a61fb0b 100644 Binary files a/m_librarian/translations/ru.mo and b/m_librarian/translations/ru.mo differ diff --git a/m_librarian/translations/ru.po b/m_librarian/translations/ru.po index 4a70714..3a7521f 100644 --- a/m_librarian/translations/ru.po +++ b/m_librarian/translations/ru.po @@ -120,3 +120,9 @@ msgstr "Список жанров" msgid "genre_title_list" msgstr "Список жанров" + +msgid "ext" +msgstr "Расширение" + +msgid "lang" +msgstr "Язык"