Librarian in requirements.
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 1 Mar 2019 09:56:09 +0000 (10:56 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 1 Mar 2019 09:56:09 +0000 (10:56 +0100)
Some housekeeping.

31 files changed:
.gitmodules [deleted file]
Makefile
lib/librarian [deleted submodule]
requirements/requirements.txt
scripts/drop-tables [deleted file]
scripts/make-locale-pack
scripts/make-tags
scripts/make-xml-zip.py
scripts/remove_duplicates.py [deleted file]
scripts/save-locale-pack
src/api/locale/de/LC_MESSAGES/django.mo
src/api/locale/de/LC_MESSAGES/django.po
src/api/locale/es/LC_MESSAGES/django.mo
src/api/locale/es/LC_MESSAGES/django.po
src/api/locale/fr/LC_MESSAGES/django.mo
src/api/locale/fr/LC_MESSAGES/django.po
src/api/locale/it/LC_MESSAGES/django.mo
src/api/locale/it/LC_MESSAGES/django.po
src/api/locale/lt/LC_MESSAGES/django.mo
src/api/locale/lt/LC_MESSAGES/django.po
src/api/locale/pl/LC_MESSAGES/django.mo
src/api/locale/pl/LC_MESSAGES/django.po
src/api/locale/ru/LC_MESSAGES/django.mo
src/api/locale/ru/LC_MESSAGES/django.po
src/api/locale/uk/LC_MESSAGES/django.mo
src/api/locale/uk/LC_MESSAGES/django.po
src/catalogue/fields.py
src/lesmianator/models.py
src/manage.py
src/wolnelektury/celery.py
src/wolnelektury/wsgi.py

diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644 (file)
index 004f6f3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "lib/librarian"]
-       path = lib/librarian
-       url = git://git.nowoczesnapolska.org.pl/librarian.git
index 79fa8f6..1a602ba 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,6 @@
 
 
 deploy: src/wolnelektury/localsettings.py
-       git submodule update --init
        pip install -r requirements/requirements.txt
        src/manage.py migrate --noinput
        src/manage.py update_counters
diff --git a/lib/librarian b/lib/librarian
deleted file mode 160000 (submodule)
index 3cae7a6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 3cae7a60cf91b6e2b84628c5f3b4b2df77eda5d6
index ed0ee16..fc6f6fb 100644 (file)
@@ -12,7 +12,7 @@ django-picklefield>=1.0,<1.1
 django-modeltranslation==0.12.1
 django-allauth==0.38.0
 django-extensions==1.7.8
-djangorestframework<3.7
+djangorestframework==3.9.1
 djangorestframework-xml
 oauthlib>=3.0.1,<3.1
 
@@ -24,7 +24,7 @@ django-babel==0.6.1
 
 pytz
 
-django-honeypot==0.6.0
+django-honeypot==0.7.0
 
 python-memcached
 django-piwik
@@ -38,10 +38,7 @@ mutagen>=1.31
 sorl-thumbnail>=12.3,<12.4
 
 # home-brewed & dependencies
-lxml>=2.2.2
-# -e git+git://github.com/fnp/librarian.git@d43d87400dcc19851442#egg=librarian
-
-# MySQL-python>=1.2,<2.0
+librarian==1.7
 
 # celery tasks
 celery>=3.1.12,<3.2
@@ -60,7 +57,6 @@ django-getpaid==1.8.0
 deprecated
 
 httplib2
-Texml
 django-ssify>=0.2.6,<0.3
 
 raven
diff --git a/scripts/drop-tables b/scripts/drop-tables
deleted file mode 100755 (executable)
index dba22eb..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-DATABASE=$1
-USERNAME=$2
-PASSWORD=$3
-mysqldump -u$USERNAME -p$PASSWORD --add-drop-table --no-data $DATABASE | grep ^DROP | mysql -u$USERNAME -p$PASSWORD $DATABASE
index 9c8e8a7..5ccd454 100755 (executable)
@@ -4,38 +4,38 @@ ME=$0
 ROOT=$(git rev-parse --show-toplevel)
 DST=`mktemp -d`/wl-lokalizacja
 mkdir -p $DST
-MANAGE=$ROOT/manage.py
+MANAGE=$ROOT/src/manage.py
 
 
 export_po()
 {
-    for appdir in $ROOT/apps/*; do
+    for appdir in $ROOT/src/*/; do
        app=`basename $appdir`
-       if [ -d $ROOT/apps/$app/locale ]; then
-       for langdir in $ROOT/apps/$app/locale/*; do
+       if [ -d $ROOT/src/$app/locale ]; then
+       for langdir in $ROOT/src/$app/locale/*; do
            lang=`basename $langdir`
            mkdir -p $DST/$lang
-           cp -v ${ROOT}/apps/${app}/locale/${lang}/LC_MESSAGES/django.po $DST/${lang}/${app}.po
+           cp -v ${ROOT}/src/${app}/locale/${lang}/LC_MESSAGES/django.po $DST/${lang}/${app}.po
        done
        fi
     done
 
-    for langdir in $ROOT/wolnelektury/locale-contrib/*/; do
-        lang = `basename $langdir`
+    for langdir in $ROOT/src/wolnelektury/locale-contrib/*/; do
+        lang=`basename $langdir`
         mkdir -p "$DST/$lang"
         cp -v "${langdir}LC_MESSAGES/django.po" "${DST}/$lang/contrib.po"
     done
 
-    cp -v ${ROOT}/wolnelektury/static/js/locale.js $DST/locale.js.txt
-    cp -v ${ROOT}/apps/infopages/fixtures/infopages.json $DST/infopages.json
+    cp -v ${ROOT}/src/wolnelektury/static/js/locale.js $DST/locale.js.txt
+    cp -v ${ROOT}/src/infopages/fixtures/infopages.json $DST/infopages.json
 
     ${0}-json.py $DST/infopages.json
 }
 
 
 (
-cd $ROOT/apps
-for i in *; do
+cd $ROOT/src
+for i in */; do
     if [ -e "$i/locale" ]; then
         echo "Generate po for app $i"
         ( cd $i; $MANAGE makemessages --all;
@@ -48,10 +48,10 @@ done
 
 (
     pybabel extract -F "$ROOT/babel.cfg" \
-      -o "$ROOT/wolnelektury/locale-contrib/django.pot" \
+      -o "$ROOT/src/wolnelektury/locale-contrib/django.pot" \
       "`python -c 'import os,allauth; print os.path.dirname(allauth.__file__)'`"
-    pybabel update -D django -i "$ROOT/wolnelektury/locale-contrib/django.pot" \
-      -d "$ROOT/wolnelektury/locale-contrib"
+    pybabel update -D django -i "$ROOT/src/wolnelektury/locale-contrib/django.pot" \
+      -d "$ROOT/src/wolnelektury/locale-contrib"
 )
 
 export_po
index c6f81e8..b19c806 100755 (executable)
@@ -9,5 +9,5 @@ else
     echo "No Virtual env enabled, will not add it to TAGS"
 fi
 
-find $ROOT/apps/wolnelektury_core/static/css -name '*.css' |xargs etags -a -o ${ROOT}/TAGS
-find $ROOT/apps/wolnelektury_core/static/js -name '*.js' |xargs etags -a -o ${ROOT}/TAGS
+find $ROOT/src/wolnelektury/static/css -name '*.css' |xargs etags -a -o ${ROOT}/TAGS
+find $ROOT/src/wolnelektury/static/js -name '*.js' |xargs etags -a -o ${ROOT}/TAGS
index de579c3..6d6a329 100755 (executable)
@@ -3,18 +3,15 @@
 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
 #
-import sys
-sys.path.insert(0, '../apps')
-sys.path.insert(0, '../lib')
-sys.path.insert(0, '../lib/librarian')
-sys.path.insert(0, '..')
-
-from django.core.management import setup_environ
-from wolnelektury import settings
+import os
+import django
 import sys
 import zipfile
 
-setup_environ(settings)
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../src'))
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wolnelektury.settings")
+django.setup()
 
 from catalogue.models import Book
 
diff --git a/scripts/remove_duplicates.py b/scripts/remove_duplicates.py
deleted file mode 100755 (executable)
index bea5cda..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
-#
-import sys
-
-from django.core.management import setup_environ
-from wolnelektury import settings
-try:
-    set
-except AttributeError:
-    from set import Set as set
-
-setup_environ(settings)
-
-from catalogue import models
-
-fragment_identifiers = set()
-
-print
-print 'Before: %d fragments' % models.Fragment.objects.count()
-print
-
-for fragment in models.Fragment.objects.all():
-    if (fragment.book_id, fragment.anchor) in fragment_identifiers:
-        fragment.delete()
-        sys.stderr.write('X')
-    else:
-        fragment_identifiers.add((fragment.book_id, fragment.anchor))
-        sys.stderr.write('.')
-
-print
-print 'After: %d fragments' % models.Fragment.objects.count()
-print
\ No newline at end of file
index 69bc9e5..c1a0f0d 100755 (executable)
@@ -2,7 +2,7 @@
 
 ME=$0
 ROOT=$(git rev-parse --show-toplevel)
-MANAGE=$ROOT/manage.py
+MANAGE=$ROOT/src/manage.py
 
 LOCALIZED=$1
 if [ ! -d "$LOCALIZED" ]; then
@@ -18,9 +18,9 @@ load_lang()
        app=`basename "$pofile" .po`
        echo $app
        if [ "$app" = "contrib" ]; then
-           cp -v "$pofile" "$ROOT/wolnelektury/locale-contrib/$L/LC_MESSAGES/django.po"
+           cp -v "$pofile" "$ROOT/src/wolnelektury/locale-contrib/$L/LC_MESSAGES/django.po"
        else
-           cp -v "$pofile" "$ROOT/apps/$app/locale/$L/LC_MESSAGES/django.po"
+           cp -v "$pofile" "$ROOT/src/$app/locale/$L/LC_MESSAGES/django.po"
        fi
     done
 }
@@ -34,16 +34,16 @@ else
     done
 fi
 
-cp -v ${ROOT}/apps/infopages/fixtures/infopages.json "$LOCALIZED/infopages.json"
+cp -v ${ROOT}/src/infopages/fixtures/infopages.json "$LOCALIZED/infopages.json"
 ${0}-json.py "$LOCALIZED/infopages.json" $LNG
 if [ ! "$?" = 0 ]; then
     exit 1;
 fi
-cp -v "$LOCALIZED/infopages.json" ${ROOT}/apps/infopages/fixtures/infopages.json
-cp -v "$LOCALIZED/locale.js.txt" ${ROOT}/wolnelektury/static/js/locale.js
+cp -v "$LOCALIZED/infopages.json" ${ROOT}/src/infopages/fixtures/infopages.json
+cp -v "$LOCALIZED/locale.js.txt" ${ROOT}/src/wolnelektury/static/js/locale.js
 
-for i in $ROOT/apps/*; do 
+for i in $ROOT/src/*/; do
     cd $i;
     env PYTHONPATH=$ROOT ${VIRTUAL_ENV}/bin/django-admin.py compilemessages --settings=wolnelektury.settings
 done
-pybabel compile -D django -d $ROOT/wolnelektury/locale-contrib
+pybabel compile -D django -d $ROOT/src/wolnelektury/locale-contrib
index fbbbcbf..fd15395 100644 (file)
Binary files a/src/api/locale/de/LC_MESSAGES/django.mo and b/src/api/locale/de/LC_MESSAGES/django.mo differ
index fbe58ce..a4ce1b5 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr ""
 
@@ -135,3 +135,19 @@ msgid ""
 "        <a href=\"%(f)s\">%(f)s</a>.\n"
 "      "
 msgstr ""
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Den Zugang zu Wolne Lektury authorisieren"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr "Bitte bestätigen Sie den Zugang zu Wolne Lektury <strong>%(user)s</strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr ""
index fbbbcbf..5b45894 100644 (file)
Binary files a/src/api/locale/es/LC_MESSAGES/django.mo and b/src/api/locale/es/LC_MESSAGES/django.mo differ
index fbe58ce..cd72383 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr ""
 
@@ -135,3 +135,20 @@ msgid ""
 "        <a href=\"%(f)s\">%(f)s</a>.\n"
 "      "
 msgstr ""
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Autoriza el acceso a Wolne Lektury"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr "Confirma para autorizar el acceso a Wolne Lektury como el usuario <strong>"
+"%(user)s</strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr ""
index 5ab43e3..a9bbec4 100644 (file)
Binary files a/src/api/locale/fr/LC_MESSAGES/django.mo and b/src/api/locale/fr/LC_MESSAGES/django.mo differ
index 53929e1..faf15d2 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr ""
 
@@ -135,3 +135,20 @@ msgid ""
 "        <a href=\"%(f)s\">%(f)s</a>.\n"
 "      "
 msgstr ""
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Autorisez l'accès à Wolne Lektury"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr "Confirmez pour autoriser l'accès à Wolne Lektury comme l'utilisateur <strong>"
+"%(user)s</strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr ""
index fbbbcbf..f0c98b3 100644 (file)
Binary files a/src/api/locale/it/LC_MESSAGES/django.mo and b/src/api/locale/it/LC_MESSAGES/django.mo differ
index fbe58ce..089a329 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,7 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr ""
 
@@ -135,3 +135,20 @@ msgid ""
 "        <a href=\"%(f)s\">%(f)s</a>.\n"
 "      "
 msgstr ""
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Autorizza accesso a Wolne Lektury"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr "Conferma l'accesso autorizzato a Wolne Lektury come utente <strong>%(user)s</"
+"strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr ""
index a10298a..4203c03 100644 (file)
Binary files a/src/api/locale/lt/LC_MESSAGES/django.mo and b/src/api/locale/lt/LC_MESSAGES/django.mo differ
index 8595f54..d5e6ae1 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,7 +19,7 @@ msgstr ""
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n"
 "%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr ""
 
@@ -136,3 +136,21 @@ msgid ""
 "        <a href=\"%(f)s\">%(f)s</a>.\n"
 "      "
 msgstr ""
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Leisti prieigą prie Wolne Lektury interneto svetainės"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr ""
+"Patvirtinkite, kad leistute prieigą prie Wolne Lektury interneto svetainės "
+"kaip vartotojas <strong>%(user)s</strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr ""
index fc5c107..1cbdae7 100644 (file)
Binary files a/src/api/locale/pl/LC_MESSAGES/django.mo and b/src/api/locale/pl/LC_MESSAGES/django.mo differ
index 5fef31c..b2e8fba 100644 (file)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: 2013-06-14 11:45+0100\n"
 "Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,7 +19,7 @@ msgstr ""
 "|| n%100>=20) ? 1 : 2);\n"
 "X-Generator: Poedit 1.5.4\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr "slug"
 
@@ -40,7 +40,7 @@ msgstr ""
 "\n"
 "API serwisu WolneLektury.pl znajduje się pod adresem <code>%(u)s</code>.\n"
 "Za jego pomocą można uzyskać informacje o utworach, ich fragmentach i "
-"metadanych.\n"
+"metadanych.\n "
 
 #: templates/api/main.html:23
 msgid ""
@@ -56,7 +56,7 @@ msgstr ""
 "wiki/JSON\">JSON</a>,\n"
 "ale dostępny jest też format XML – wystarczy dodać parametr <code>?"
 "format=xml</code>\n"
-"do każdego zapytania.\n"
+"do każdego zapytania.\n "
 
 #: templates/api/main.html:32
 msgid ""
@@ -64,8 +64,9 @@ msgid ""
 "        The URLs in WolneLektury.pl API are:\n"
 "      "
 msgstr ""
+
 "\n"
-"API Wolnych Lektur zawiera następujące adresy URL:\n"
+"API Wolnych Lektur zawiera następujące adresy URL:\n "
 
 #: templates/api/main.html:39
 msgid "All books"
@@ -117,7 +118,7 @@ msgstr ""
 "\n"
 "Każdy element na tych listach zawiera adres (w atrybucie „href”), pod którym "
 "można znaleźć szczegółowe dane, np. <a href=\"%(e1)s\">%(e1)s</a> czy <a "
-"href=\"%(e2)s\">%(e2)s</a>.\n"
+"href=\"%(e2)s\">%(e2)s</a>.\n "
 
 #: templates/api/main.html:72
 #, python-format
@@ -131,7 +132,7 @@ msgid ""
 msgstr ""
 "\n"
 "Można łączyć autorów, epoki, gatunki i rodzaje, aby wybrać tylko utwory "
-"odpowiadające zadanym kryteriom. Na przykład: <a href=\"%(e)s\">%(e)s</a>.\n"
+"odpowiadające zadanym kryteriom. Na przykład: <a href=\"%(e)s\">%(e)s</a>.\n "
 
 #: templates/api/main.html:80
 #, python-format
@@ -145,7 +146,7 @@ msgstr ""
 "\n"
 "Aby spośród wszystkich pasujących wybrać tylko utwory najwyższego poziomu "
 "(pomijając ich podutwory), można użyć zapytania /parent_books/, np.: <a href="
-"\"%(e)s\">%(e)s</a>.\n"
+"\"%(e)s\">%(e)s</a>.\n "
 
 #: templates/api/main.html:88
 #, python-format
@@ -164,4 +165,20 @@ msgstr ""
 "wyszukiwać fragmenty:<a href=\"%(e)s\">%(e)s</a>. \n"
 "Każdy element uzyskanej listy w atrybucie „href” zawiera link do "
 "szczegółowego opisu danego fragmentu, np.:\n"
-"<a href=\"%(f)s\">%(f)s</a>.\n"
+"<a href=\"%(f)s\">%(f)s</a>.\n "
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Zezwól na dostęp do Wolnych Lektur"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr "Potwierdź dostęp do Wolnych Lektur jako użytkownik <strong>%(user)s</strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr "Potwierdź"
index 9488800..20e404d 100644 (file)
Binary files a/src/api/locale/ru/LC_MESSAGES/django.mo and b/src/api/locale/ru/LC_MESSAGES/django.mo differ
index 5914167..f3d7f9d 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,7 +19,7 @@ msgstr ""
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr ""
 
@@ -136,3 +136,21 @@ msgid ""
 "        <a href=\"%(f)s\">%(f)s</a>.\n"
 "      "
 msgstr ""
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Авторизация доступа к Wolne Lektury"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr ""
+"Подтверждение для авторизации доступа к Wolne Lektury как пользователь "
+"<strong>%(user)s </strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr ""
index 9488800..a603c75 100644 (file)
Binary files a/src/api/locale/uk/LC_MESSAGES/django.mo and b/src/api/locale/uk/LC_MESSAGES/django.mo differ
index 5914167..419e3db 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-09-14 12:34+0200\n"
+"POT-Creation-Date: 2019-03-01 09:45+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -19,7 +19,7 @@ msgstr ""
 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
 
-#: models.py:15
+#: models.py:17
 msgid "slug"
 msgstr ""
 
@@ -136,3 +136,21 @@ msgid ""
 "        <a href=\"%(f)s\">%(f)s</a>.\n"
 "      "
 msgstr ""
+
+#: templates/oauth/authorize_token.html:4
+#: templates/oauth/authorize_token.html:7
+msgid "Authorize access to Wolne Lektury"
+msgstr "Авторизувати доступ до Wolne Lektury"
+
+#: templates/oauth/authorize_token.html:11
+#, python-format
+msgid ""
+"Confirm to authorize access to Wolne Lektury as user <strong>%(user)s</"
+"strong>."
+msgstr ""
+"Підтвердити, щоб авторизувати доступ до Wolne Lektury від імені користувача "
+"<strong>%(user)s</strong>."
+
+#: templates/oauth/authorize_token.html:17
+msgid "Confirm"
+msgstr ""
index 08ac454..ebe4df1 100644 (file)
@@ -184,7 +184,7 @@ class BuildHtml(BuildEbook):
             if lang not in [ln[0] for ln in settings.LANGUAGES]:
                 lang = None
 
-            fieldfile.save(None, ContentFile(html_output.get_string()), save=False)
+            fieldfile.save(None, ContentFile(html_output.get_bytes()), save=False)
             self.set_file_permissions(fieldfile)
             type(book).objects.filter(pk=book.pk).update(**{
                 fieldfile.field.attname: fieldfile
index 092a828..684d1c4 100644 (file)
@@ -126,7 +126,7 @@ class Continuations(models.Model):
         # count from this book only
         output = StringIO()
         wldoc = book.wldocument(parse_dublincore=False)
-        output = wldoc.as_text(('raw-text',)).get_string()
+        output = wldoc.as_text(('raw-text',)).get_bytes()
         del wldoc
 
         conts = {}
index d69b6e5..a29b48f 100755 (executable)
@@ -2,10 +2,6 @@
 import os
 import sys
 
-ROOT = os.path.dirname(os.path.abspath(__file__))
-sys.path = [
-    os.path.join(ROOT, '../lib/librarian'),
-] + sys.path
 
 if __name__ == "__main__":
     os.environ.setdefault(
index 85ecb4a..d1e18d7 100644 (file)
@@ -5,15 +5,9 @@
 from __future__ import absolute_import
 
 import os
-import sys
-
 from celery import Celery
 from django.conf import settings
 
-ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
-sys.path = [
-    os.path.join(ROOT, 'lib/librarian'),
-] + sys.path
 
 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wolnelektury.settings')
 
index 245e15d..fe72d39 100644 (file)
@@ -1,14 +1,5 @@
 # -*- coding: utf-8 -*-
 import os
-import sys
-
-ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-
-# Add apps and lib directories to PYTHONPATH
-sys.path = [
-    os.path.join(ROOT, '../lib/librarian'),
-] + sys.path
-
 
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wolnelektury.settings")