From 2b447a437065ce4bd982562f6fd0c2877074c2da Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 1 Mar 2019 10:56:09 +0100 Subject: [PATCH] Librarian in requirements. Some housekeeping. --- .gitmodules | 3 -- Makefile | 1 - lib/librarian | 1 - requirements/requirements.txt | 10 ++----- scripts/drop-tables | 5 ---- scripts/make-locale-pack | 28 +++++++++---------- scripts/make-tags | 4 +-- scripts/make-xml-zip.py | 15 ++++------ scripts/remove_duplicates.py | 35 ------------------------ scripts/save-locale-pack | 16 +++++------ src/api/locale/de/LC_MESSAGES/django.mo | Bin 421 -> 653 bytes src/api/locale/de/LC_MESSAGES/django.po | 20 ++++++++++++-- src/api/locale/es/LC_MESSAGES/django.mo | Bin 421 -> 662 bytes src/api/locale/es/LC_MESSAGES/django.po | 21 ++++++++++++-- src/api/locale/fr/LC_MESSAGES/django.mo | Bin 420 -> 667 bytes src/api/locale/fr/LC_MESSAGES/django.po | 21 ++++++++++++-- src/api/locale/it/LC_MESSAGES/django.mo | Bin 421 -> 654 bytes src/api/locale/it/LC_MESSAGES/django.po | 21 ++++++++++++-- src/api/locale/lt/LC_MESSAGES/django.mo | Bin 484 -> 773 bytes src/api/locale/lt/LC_MESSAGES/django.po | 22 +++++++++++++-- src/api/locale/pl/LC_MESSAGES/django.mo | Bin 3747 -> 4012 bytes src/api/locale/pl/LC_MESSAGES/django.po | 35 ++++++++++++++++++------ src/api/locale/ru/LC_MESSAGES/django.mo | Bin 495 -> 812 bytes src/api/locale/ru/LC_MESSAGES/django.po | 22 +++++++++++++-- src/api/locale/uk/LC_MESSAGES/django.mo | Bin 495 -> 821 bytes src/api/locale/uk/LC_MESSAGES/django.po | 22 +++++++++++++-- src/catalogue/fields.py | 2 +- src/lesmianator/models.py | 2 +- src/manage.py | 4 --- src/wolnelektury/celery.py | 6 ---- src/wolnelektury/wsgi.py | 9 ------ 31 files changed, 196 insertions(+), 129 deletions(-) delete mode 100644 .gitmodules delete mode 160000 lib/librarian delete mode 100755 scripts/drop-tables delete mode 100755 scripts/remove_duplicates.py diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 004f6f379..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "lib/librarian"] - path = lib/librarian - url = git://git.nowoczesnapolska.org.pl/librarian.git diff --git a/Makefile b/Makefile index 79fa8f6f5..1a602bad4 100644 --- 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 index 3cae7a60c..000000000 --- a/lib/librarian +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3cae7a60cf91b6e2b84628c5f3b4b2df77eda5d6 diff --git a/requirements/requirements.txt b/requirements/requirements.txt index ed0ee1605..fc6f6fb5e 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -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 index dba22eb62..000000000 --- a/scripts/drop-tables +++ /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 diff --git a/scripts/make-locale-pack b/scripts/make-locale-pack index 9c8e8a760..5ccd4543b 100755 --- a/scripts/make-locale-pack +++ b/scripts/make-locale-pack @@ -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 diff --git a/scripts/make-tags b/scripts/make-tags index c6f81e861..b19c80664 100755 --- a/scripts/make-tags +++ b/scripts/make-tags @@ -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 diff --git a/scripts/make-xml-zip.py b/scripts/make-xml-zip.py index de579c3e2..6d6a329de 100755 --- a/scripts/make-xml-zip.py +++ b/scripts/make-xml-zip.py @@ -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 index bea5cda27..000000000 --- a/scripts/remove_duplicates.py +++ /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 diff --git a/scripts/save-locale-pack b/scripts/save-locale-pack index 69bc9e517..c1a0f0d12 100755 --- a/scripts/save-locale-pack +++ b/scripts/save-locale-pack @@ -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 diff --git a/src/api/locale/de/LC_MESSAGES/django.mo b/src/api/locale/de/LC_MESSAGES/django.mo index fbbbcbfe1a44cff5b6272a9c1916d721063dcf30..fd153958299351fd59df61e2f3e821cfb990afc1 100644 GIT binary patch delta 343 zcmZ3=+{;>jPl#nI0}wC+u?!HK05K~N`v5TrBml7@5GMk$KM*$qu@fT$!(||?3B+Pd z5Va0K8Ym1l2S_mhxe(x3T9T1plv$OkkeHmDT3oD9lCKb+pOcrW;FFqN5?oqT$>5xy zmzG(S3zA91s~V_SA+cDYv^cd$!KS#RC_gXVPE`ZM)hxErhYILTw6NPapN+BHB{feW zsx&<@FI}Ok6vi{tbSO9T0P|^}egVeyl#7lN+A-c{*sfi_- n`FXl7i6yC43PuKoX1WHJx`rkShDKJ#CfWu@1_qmX895mN^_vix diff --git a/src/api/locale/de/LC_MESSAGES/django.po b/src/api/locale/de/LC_MESSAGES/django.po index fbe58ce3c..a4ce1b502 100644 --- a/src/api/locale/de/LC_MESSAGES/django.po +++ b/src/api/locale/de/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" " %(f)s.\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 %(user)s." +msgstr "Bitte bestätigen Sie den Zugang zu Wolne Lektury %(user)s." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "" diff --git a/src/api/locale/es/LC_MESSAGES/django.mo b/src/api/locale/es/LC_MESSAGES/django.mo index fbbbcbfe1a44cff5b6272a9c1916d721063dcf30..5b458944f119793bdd8a34a8e97c1461d2db35e1 100644 GIT binary patch delta 353 zcmZ3=JdL&fo)F7a1|VPtVi_Pd0b*7l_5orLNC09*AWj5ge;{rKVkbrhhRZ-&35dm* z7#L!Jv?Y)R3WLo7QVc*Y1UQzKWaJlRR;4N=CMTyB7b}$HD}?9g&r7#c)c|odi*59w0(uiI>^9D4W2^_- z46-;;AvFhLH_&(_tC4I@R47O+N(5OB)=-37heC3GZazr5w74{}C^H|AGZ+~FqLpFl delta 108 zcmbQnx|G@Co)F7a1|VPrVi_P-0b*t#)&XJ=umIw0prj>`2C0F8iI?ouLUf&rQWHxu o^Ye6F5=&C86pRcE&2$Ycbq!4v42`UeO|%V+3=B5&GIBBk0QqMSq5uE@ diff --git a/src/api/locale/es/LC_MESSAGES/django.po b/src/api/locale/es/LC_MESSAGES/django.po index fbe58ce3c..cd723830b 100644 --- a/src/api/locale/es/LC_MESSAGES/django.po +++ b/src/api/locale/es/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" " %(f)s.\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 %(user)s." +msgstr "Confirma para autorizar el acceso a Wolne Lektury como el usuario " +"%(user)s." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "" diff --git a/src/api/locale/fr/LC_MESSAGES/django.mo b/src/api/locale/fr/LC_MESSAGES/django.mo index 5ab43e3c45ff5050bf321de110ed3b33b4d0d885..a9bbec41c1055c4ee7cc099c0b45fd82b1452e34 100644 GIT binary patch delta 359 zcmZ3&Je#%to)F7a1|VPtVi_Pd0b*7l_5orLNC09*AWj5ge;{rKVn;>>hRZ-&8Hh!h zAaa&K8Ym1l2S_mhxe(x3T9T1plv$OkkeHmDT3oD9lCKb+pOcrW;FFqN5?oqT$>5xy zmzG(S3zA91s~V_SA+cDYv^cd$!KS#RC_gXVPE`ZM)hxErhYILTw6NPapOvv5Xfx2_ z;?ydI9Ce`GhgTFU9A1EAH05_@Mk delta 108 zcmbQux`f%{o)F7a1|VPrVi_P-0b*t#)&XJ=umIvLprj>`2C0F8iI?ouLUf&rQWHxu o^Ye6F5=&C86pRcE&2$Ycbq!4v42`UeO|%V+3=B5&GIB5i0Q%GrqyPW_ diff --git a/src/api/locale/fr/LC_MESSAGES/django.po b/src/api/locale/fr/LC_MESSAGES/django.po index 53929e13b..faf15d28a 100644 --- a/src/api/locale/fr/LC_MESSAGES/django.po +++ b/src/api/locale/fr/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" " %(f)s.\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 %(user)s." +msgstr "Confirmez pour autoriser l'accès à Wolne Lektury comme l'utilisateur " +"%(user)s." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "" diff --git a/src/api/locale/it/LC_MESSAGES/django.mo b/src/api/locale/it/LC_MESSAGES/django.mo index fbbbcbfe1a44cff5b6272a9c1916d721063dcf30..f0c98b335bc4954fd31aba552626750c22af839b 100644 GIT binary patch delta 344 zcmZ3=+{apfPl#nI0}wC+u?!HK05K~N`v5TrBml7@5GMk$KM*$qu@fT$!(|{15*K4) zUxo_ y$l|I*sLeprk!*%poLZEdsF0%$aU9qI5KSP*pek2L&d*I%C@o3ND@ny;Jp%w$$X}NL delta 108 zcmeBUUCL~6Pl#nI0}wC*u?!Ha05LNV>i{tbSO9T0P|^}egVeyl#7lN+A-c{*sfi_- n`FXl7i6yC43PuKoX1WHJx`rkShDKJ#CfWu@1_qmX895mN_6HD} diff --git a/src/api/locale/it/LC_MESSAGES/django.po b/src/api/locale/it/LC_MESSAGES/django.po index fbe58ce3c..089a329d7 100644 --- a/src/api/locale/it/LC_MESSAGES/django.po +++ b/src/api/locale/it/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" " %(f)s.\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 %(user)s." +msgstr "Conferma l'accesso autorizzato a Wolne Lektury come utente %(user)s." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "" diff --git a/src/api/locale/lt/LC_MESSAGES/django.mo b/src/api/locale/lt/LC_MESSAGES/django.mo index a10298a693b4bfdf621d82d5b58364320aaa3915..4203c031fad7a83f14fc2cb7aead6f3a3fc23d1f 100644 GIT binary patch delta 401 zcmb7;F-k*05QZm4JwR%Uu@DqQ5dEh(QGyg=0Hdq4NU;z{$#~D}#4jh7eaMvPwgYJNn zIihRm0~F=P2SP}{Vz07`5cO8r_4|?%Tj0|$^1_9bc3j09+7JF*<5m7~e|DppUE(T9 z=%2t)hf6TTTH;n6;YZon8xWw_l-%X!vIeDi5 delta 108 zcmZo=d%|pSPl#nI0}wC*u?!Ha05LNV>i{tbSOD=Vprj>`2C0F8iI?ouLUf&rQWHxu o^Ye6F5=&C86pRcE&2$Ycbq!4v42`UeO|%V+3=B5&GI}rq03F5=PXGV_ diff --git a/src/api/locale/lt/LC_MESSAGES/django.po b/src/api/locale/lt/LC_MESSAGES/django.po index 8595f543a..d5e6ae132 100644 --- a/src/api/locale/lt/LC_MESSAGES/django.po +++ b/src/api/locale/lt/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" " %(f)s.\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 %(user)s." +msgstr "" +"Patvirtinkite, kad leistute prieigą prie Wolne Lektury interneto svetainės " +"kaip vartotojas %(user)s." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "" diff --git a/src/api/locale/pl/LC_MESSAGES/django.mo b/src/api/locale/pl/LC_MESSAGES/django.mo index fc5c10799dee17a15824faf25aa0fd43d579ad05..1cbdae7aec999a8539fb24ab99156c1bcd73b93c 100644 GIT binary patch delta 810 zcmajcKWI}y9KiA4YtqyvO{%Sbz&3b_0So?Fgf3Mmoy3CO1ffGn&-69vyYk)(F+~XC z=pv*JrHfIp1-nS-P@7FVnZc=x5L9p!baV83@f8#ikKFI`e)sO){qFKSyM3nK9f>~? z+DZC2y+hB^?>hwAH|*kf{DANKL>}XIOynwFi;E<9=i^KATEEB(%q2tyv4crGz_a)X zQy3c%;a8Vo;w=VFA#0_GqqvMC_#ko(kCAUi`7YXd9b|9$h%E~Ff(PX5?7oL9?7o8+ z*>w^>V}^OBheVp}FB55z4PLy%qgc%Rs`wtBCx3`Xa4Q;rg>&R>v<0V!`5=y>J?S|d z!%LAjFh{PV{1MuMH_@>h+C}z5$LS{;^Um0`J*Pdpon|k~Hv0#$qIYI{vE1Vyjp~IX z^^TBf?K(f=_328uXnc27t9+rLgFuBw-8N-Ut65zND}GI8Ou4KJp=-Q=XYa1-FCS_r z=l}Nsl@C-U(7u`qLf?4B>$wXyod~9`1Yx2#a=Fn?v|G)A**-@#z7FmYw~{-=`P8JN zT5G9{L-K5>Nt{V<5WDGY{f=I(zG;<}msblW2;Z)+V6XUEVKFLSZkn<#6_&KjnXu|= le_{XiZ;$_8sFw02qbmFDT39kw&n^8`e$v(-l^@GI{R#E_rpf>S delta 565 zcmY+=KS&#K6u|M9H2%BfjK;-~ib2#x0+$#f)y0@}5Cs>(MHK&>kS2IwBBB(8(oG7& z4;Nb`APAz1L>IMCadQ_3MRC+YT!exMet$L&ecZdxz5CtWd-vOI-fUXF4tUmtXdpk5 z`(zV2=;B2D!D~FhODwuYR`KfxkvN(jkxJJ3aEH3TLSze{um*osiWssTf-vtrcY!Y z)22ur-k>4lB9B~DbK@EHWS&|P4ly|C$%7ce*0R0WMm<`tzo8y%1L^nnj{c60fcoJI zC0P(Zsh@fez28jq_N#iI_}l+NkEr*Hp+rh|uD>2{%E{&IsY1q?&8wNJcP`ND!Tw5Mb!IN6L0I5|5z^~F{`fAJOaUQ{gr diff --git a/src/api/locale/pl/LC_MESSAGES/django.po b/src/api/locale/pl/LC_MESSAGES/django.po index 5fef31cd0..b2e8fbaaa 100644 --- a/src/api/locale/pl/LC_MESSAGES/django.po +++ b/src/api/locale/pl/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 %(u)s.\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,\n" "ale dostępny jest też format XML – wystarczy dodać parametr ?" "format=xml\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. %(e1)s czy %(e2)s.\n" +"href=\"%(e2)s\">%(e2)s.\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: %(e)s.\n" +"odpowiadające zadanym kryteriom. Na przykład: %(e)s.\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.: %(e)s.\n" +"\"%(e)s\">%(e)s.\n " #: templates/api/main.html:88 #, python-format @@ -164,4 +165,20 @@ msgstr "" "wyszukiwać fragmenty:%(e)s. \n" "Każdy element uzyskanej listy w atrybucie „href” zawiera link do " "szczegółowego opisu danego fragmentu, np.:\n" -"%(f)s.\n" +"%(f)s.\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 %(user)s." +msgstr "Potwierdź dostęp do Wolnych Lektur jako użytkownik %(user)s." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "Potwierdź" diff --git a/src/api/locale/ru/LC_MESSAGES/django.mo b/src/api/locale/ru/LC_MESSAGES/django.mo index 94888006c7dbfcb125c47ba02d4a24a8bfa4b69f..20e404df106eb35834907bc6de16f42bff085734 100644 GIT binary patch delta 429 zcmaFQyoRm*o)F7a1|VPtVi_Pd0b*7l_5orLNC09*AWj5ge;{rK;vPl@hRZFGckC=50SNHGAp5a3u^l96AOS(U1gn4FwiT&z%%uMnP}lb5RClbT%;Tv}Ag z;GCbAmRXbwl1ap?8mL$yu~?zBIJHQ@rnsaiKQG-*RRhG;EVj{y3g}I=u-iC4fU*9< zgbSN4HeJ|vvEjmw3)?SjxY%}K$Hjhy3tNCfjTf6PHec9(VS~bjT}aLWx#q(B3;Ql? z0czZIVJlGUHlX^g7xn^;*b36R8)U);OoK1%KsVSI-DIFuK%Ki3fY$B|aj R8-P}A1@SSwq=4`f0|0PWu$=$^ delta 108 zcmZ3(_MX||o)F7a1|VPrVi_P-0b*t#)&XJ=umIw%KuJp=4N?OG6EE4Rh3GmLr6!hS o=I80UB$lLFDHs_Tn&}!?>Kd9T7#dj_n`j#t85nHlWejEn05!i6mjD0& diff --git a/src/api/locale/ru/LC_MESSAGES/django.po b/src/api/locale/ru/LC_MESSAGES/django.po index 59141676b..f3d7f9d72 100644 --- a/src/api/locale/ru/LC_MESSAGES/django.po +++ b/src/api/locale/ru/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" " %(f)s.\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 %(user)s." +msgstr "" +"Подтверждение для авторизации доступа к Wolne Lektury как пользователь " +"%(user)s ." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "" diff --git a/src/api/locale/uk/LC_MESSAGES/django.mo b/src/api/locale/uk/LC_MESSAGES/django.mo index 94888006c7dbfcb125c47ba02d4a24a8bfa4b69f..a603c7591d9a2ec1cabe5b6ed8230dfe55225ef8 100644 GIT binary patch delta 438 zcmaFQyp^r~o)F7a1|VPtVi_Pd0b*7l_5orLNC09*AWj5ge;{rK;vPl@hRZ6t(pC=50SNHGAp5a3u^l96AOS(U1gn4FwiT&z%%uMnP}lb5RClbT%;Tv}Ag z;GCbAmRXbwl1ap?8mL$yu~?zBIJHQ@rnsaiKQG-*RRhG;EVj{y3g}I=u-iC4fU*9< zgbSN4HeJ|vvEjmw3)?R?U)XeE1CYN%;ldW6VB^ImpwNCW2gyMo_gt8NaoU9~K&6{5 zYz1oGa$yHZn~uW8&I|i4Y*e_gfhcpsfVQ9-tN_#pG*|&h?76V@!rqJ16fW$7xDVKd9T7#dj_n`j#t85nHlWejEn06B{hpa1{> diff --git a/src/api/locale/uk/LC_MESSAGES/django.po b/src/api/locale/uk/LC_MESSAGES/django.po index 59141676b..419e3dbb2 100644 --- a/src/api/locale/uk/LC_MESSAGES/django.po +++ b/src/api/locale/uk/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \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 "" " %(f)s.\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 %(user)s." +msgstr "" +"Підтвердити, щоб авторизувати доступ до Wolne Lektury від імені користувача " +"%(user)s." + +#: templates/oauth/authorize_token.html:17 +msgid "Confirm" +msgstr "" diff --git a/src/catalogue/fields.py b/src/catalogue/fields.py index 08ac454a0..ebe4df17e 100644 --- a/src/catalogue/fields.py +++ b/src/catalogue/fields.py @@ -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 diff --git a/src/lesmianator/models.py b/src/lesmianator/models.py index 092a828fa..684d1c4bf 100644 --- a/src/lesmianator/models.py +++ b/src/lesmianator/models.py @@ -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 = {} diff --git a/src/manage.py b/src/manage.py index d69b6e5f5..a29b48f38 100755 --- a/src/manage.py +++ b/src/manage.py @@ -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( diff --git a/src/wolnelektury/celery.py b/src/wolnelektury/celery.py index 85ecb4a17..d1e18d7d6 100644 --- a/src/wolnelektury/celery.py +++ b/src/wolnelektury/celery.py @@ -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') diff --git a/src/wolnelektury/wsgi.py b/src/wolnelektury/wsgi.py index 245e15ddd..fe72d395d 100644 --- a/src/wolnelektury/wsgi.py +++ b/src/wolnelektury/wsgi.py @@ -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") -- 2.20.1