diff --git a/i18n/salvi.fr.json b/i18n/salvi.fr.json index 6a95dd0..9a63a86 100644 --- a/i18n/salvi.fr.json +++ b/i18n/salvi.fr.json @@ -1,12 +1,13 @@ { "fr": { - "easter": "Pâques", - "easter-date-calc": "Calculer la date de Pâques", + "welcome": "Bienvenue à {0}!", "homepage": "Page de démarrage", "latest-notes": "Dernières notes", "latest-uploads": "Derniers téléchargements", - "new-note": "Créer un page", - "other-dates": "Autres dates", - "welcome": "Bienvenue à {0}!" + "new-note": "Créer un note", + "upload-file": "Télécharger une image", + "easter-date-calc": "Calculer la date de Pâques", + "easter": "Pâques", + "other-dates": "Autres dates" } } \ No newline at end of file diff --git a/i18n/salvi.it.json b/i18n/salvi.it.json index 711625d..dd4d4ca 100644 --- a/i18n/salvi.it.json +++ b/i18n/salvi.it.json @@ -1,72 +1,71 @@ { "it": { - "access-denied": "Accesso negato", - "access-denied-text": "Non hai il permesso per accedere a questa risorsa", - "action-edit": "Modifica", - "action-history": "Cronologia", - "action-view-source": "Visualizza sorgente", - "already-have-account": "Hai già un account?", - "back-to": "Torna a", - "backlinks": "Collegamenti in entrata", - "backlinks-empty": "Nessuna altra pagina punta qui. Questa pagina è orfana?", - "calculate": "Calcola", - "calendar": "Calendario", - "confirm-password": "Conferma password", - "easter-date-calc": "Calcolo della data di Pasqua", - "easter": "Pasqua", - "email": "E-mail", - "groups-count": "Numero di gruppi utente", - "have-read-terms": "Ho letto i {0} e la {1}", + "welcome": "Benvenuti in {0}!", "homepage": "Pagina iniziale", - "include-tags": "Includi etichette", - "input-tags": "Etichette (separate da virgola)", - "jump-to-actions": "Salta alle azioni", - "just-now": "poco fa", - "last-changed": "Ultima modifica", "latest-notes": "Pagine pi\u00f9 recenti", "latest-uploads": "Caricamenti pi\u00f9 recenti", - "login": "Entra", - "logged-in-as": "Autenticato come", + "new-note": "Crea nota", + "upload-file": "Carica immagine", + "easter-date-calc": "Calcolo della data di Pasqua", + "easter": "Pasqua", + "other-dates": "Altre date", + "jump-to-actions": "Salta alle azioni", + "last-changed": "Ultima modifica", + "page-id": "ID pagina", + "action-edit": "Modifica", + "action-view-source": "Visualizza sorgente", + "action-history": "Cronologia", + "tags": "Etichette", + "old-revision-notice": "\u00c8 mostrata una revisione vecchia della pagina, risalente al", + "notes-tagged": "Pagine con etichetta", + "include-tags": "Includi etichette", + "notes-tagged-empty": "Non c\u2019\u00e8 nulla :(", + "search-no-results": "Nessun risultato per", + "random-page": "Pagina casuale", + "search": "Cerca", + "year": "Anno", "month": "Mese", + "calculate": "Calcola", + "show-all": "Mostra tutto", + "just-now": "poco fa", "n-minutes-ago": "{0} minuti fa", "n-hours-ago": "{0} ore fa", "n-days-ago": "{0} giorni fa", - "new-note": "Crea nota", + "backlinks": "Collegamenti in entrata", + "backlinks-empty": "Nessuna altra pagina punta qui. Questa pagina è orfana?", + "back-to": "Torna a", + "login": "Entra", + "username": "Nome utente", + "password": "Password", "no-account-sign-up": "Non hai un account?", - "no-tags": "Nessuna etichetta", + "sign-up": "Registrati", "not-found": "Non trovato", - "not-found-text": "La pagina con url {0} non esiste", "not-found-text-1": "La pagina con url", "not-found-text-2": "non esiste", - "not-logged-in": "Non autenticato", - "note-history": "Cronologia della pagina", + "not-found-text": "La pagina con url {0} non esiste", + "access-denied": "Accesso negato", + "access-denied-text": "Non hai il permesso per accedere a questa risorsa", + "users-count": "Numero di utenti", "notes-count": "Numero di pagine", "notes-count-with-url": "Numero di pagine con URL impostato", - "notes-month-empty": "Non c\u2019\u00e8 nulla :(", - "notes-tagged": "Pagine con etichetta", - "notes-tagged-empty": "Non c\u2019\u00e8 nulla :(", - "old-revision-notice": "\u00c8 mostrata una revisione vecchia della pagina, risalente al", - "optional": "opzionale", - "other-dates": "Altre date", - "page-created": "Pagina creata", - "owner": "Proprietario", - "page-id": "ID pagina", - "password": "Password", - "privacy-policy": "Politica sulla riservatezza", - "random-page": "Pagina casuale", - "remember-me-for": "Ricordami per", "revision-count": "Numero di revisioni", "revision-count-per-page": "Media di revisioni per pagina", - "search": "Cerca", - "search-no-results": "Nessun risultato per", - "show-all": "Mostra tutto", - "sign-up": "Registrati", - "tags": "Etichette", + "remember-me-for": "Ricordami per", + "confirm-password": "Conferma password", + "email": "E-mail", + "optional": "opzionale", + "have-read-terms": "Ho letto i {0} e la {1}", "terms-of-service": "Termini di Servizio", - "username": "Nome utente", - "users-count": "Numero di utenti", - "welcome": "Benvenuti in {0}!", + "privacy-policy": "Politica sulla riservatezza", + "already-have-account": "Hai già un account?", + "logged-in-as": "Autenticato come", + "not-logged-in": "Non autenticato", + "owner": "Proprietario", "write-a-comment": "Scrivi un commento…", - "year": "Anno" + "input-tags": "Etichette (separate da virgola)", + "no-tags": "Nessuna etichetta", + "notes-month-empty": "Non c\u2019\u00e8 nulla :(", + "calendar": "Calendario", + "groups-count": "Numero di gruppi utente" } } \ No newline at end of file diff --git a/i18n/salvi.ru.json b/i18n/salvi.ru.json index ab209e3..bea96b7 100644 --- a/i18n/salvi.ru.json +++ b/i18n/salvi.ru.json @@ -1,6 +1,5 @@ { "ru":{ - "new-note": "Новая страница", "welcome": "Добро пожаловать в {0}!" } } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ffd0921..6f11f74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "Flask-WTF", "python-dotenv>=1.0.0", "pymysql", - "sakuragasaki46-suou>=0.6.0" + "sakuragasaki46-suou>=0.5.0" ] requires-python = ">=3.10" classifiers = [ diff --git a/salvi/__init__.py b/salvi/__init__.py index f6ada0d..54d50d4 100644 --- a/salvi/__init__.py +++ b/salvi/__init__.py @@ -8,7 +8,7 @@ Pages are stored in SQLite/MySQL databases. Markdown is used for text formatting. ''' -__version__ = '1.0.0' +__version__ = '1.0.0-dev35' from flask import ( Flask, abort, flash, g, jsonify, make_response, redirect, diff --git a/salvi/models.py b/salvi/models.py index ac26b2c..67d51aa 100644 --- a/salvi/models.py +++ b/salvi/models.py @@ -644,8 +644,8 @@ def create_first_user(): permissions = int(default_permissions) ).returning(UserGroup)).scalar() db.session.execute(insert(UserGroupMembership).values( - user_id = ua.id, - group_id = ug.id + user = ua, + group = ug )) db.session.commit() print('Installed successfully!') diff --git a/salvi/routes/accounts.py b/salvi/routes/accounts.py index 56c45f5..4847418 100644 --- a/salvi/routes/accounts.py +++ b/salvi/routes/accounts.py @@ -78,8 +78,8 @@ def register(): join_date = datetime.datetime.now() ).returning(User)).scalar() db.session.execute(insert(UserGroupMembership).values( - user_id = u.id, - group_id = UserGroup.get_default().id + user = u, + group = UserGroup.get_default() )) db.session.commit() diff --git a/salvi/templates/base.html b/salvi/templates/base.html index 9f3deb1..998968e 100644 --- a/salvi/templates/base.html +++ b/salvi/templates/base.html @@ -1,7 +1,8 @@ - + + {% block title %} {{ app_name }} diff --git a/salvi/templates/listtag.html b/salvi/templates/listtag.html index a69a93b..bb0c26a 100644 --- a/salvi/templates/listtag.html +++ b/salvi/templates/listtag.html @@ -10,8 +10,8 @@
{{ T('notes-tagged') }}
- {% if tagged_notes.total > 0 %} - {{ nl_list(tagged_notes, hl_tags=(tagname,), other_url='tags/' + tagname) }} + {% if total_count > 0 %} + {{ nl_list(tagged_notes, page_n=page_n, total_count=total_count, hl_tags=(tagname,), other_url='tags/' + tagname) }} {% else %}

{{ T('notes-tagged-empty') }}

{% endif %} diff --git a/salvi/templates/macros/nl.html b/salvi/templates/macros/nl.html index a4355fd..e448d66 100644 --- a/salvi/templates/macros/nl.html +++ b/salvi/templates/macros/nl.html @@ -16,7 +16,7 @@ {% if not is_main %}

Showing results {{ page_n * 20 - 19 }} to {{ min(page_n * 20, total_count) }} - of {{ l.total }} total.

+ of {{ total_count }} total.

{% endif %}