Compare commits

..

4 commits

10 changed files with 68 additions and 68 deletions

View file

@ -1,13 +1,12 @@
{ {
"fr": { "fr": {
"welcome": "Bienvenue à {0}!", "easter": "Pâques",
"easter-date-calc": "Calculer la date de Pâques",
"homepage": "Page de démarrage", "homepage": "Page de démarrage",
"latest-notes": "Dernières notes", "latest-notes": "Dernières notes",
"latest-uploads": "Derniers téléchargements", "latest-uploads": "Derniers téléchargements",
"new-note": "Créer un note", "new-note": "Créer un page",
"upload-file": "Télécharger une image", "other-dates": "Autres dates",
"easter-date-calc": "Calculer la date de Pâques", "welcome": "Bienvenue à {0}!"
"easter": "Pâques",
"other-dates": "Autres dates"
} }
} }

View file

@ -1,71 +1,72 @@
{ {
"it": { "it": {
"welcome": "Benvenuti in {0}!", "access-denied": "Accesso negato",
"homepage": "Pagina iniziale", "access-denied-text": "Non hai il permesso per accedere a questa risorsa",
"latest-notes": "Pagine pi\u00f9 recenti", "action-edit": "Modifica",
"latest-uploads": "Caricamenti pi\u00f9 recenti", "action-history": "Cronologia",
"new-note": "Crea nota", "action-view-source": "Visualizza sorgente",
"upload-file": "Carica immagine", "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-date-calc": "Calcolo della data di Pasqua",
"easter": "Pasqua", "easter": "Pasqua",
"other-dates": "Altre date", "email": "E-mail",
"jump-to-actions": "Salta alle azioni", "groups-count": "Numero di gruppi utente",
"last-changed": "Ultima modifica", "have-read-terms": "Ho letto i {0} e la {1}",
"page-id": "ID pagina", "homepage": "Pagina iniziale",
"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", "include-tags": "Includi etichette",
"notes-tagged-empty": "Non c\u2019\u00e8 nulla :(", "input-tags": "Etichette (separate da virgola)",
"search-no-results": "Nessun risultato per", "jump-to-actions": "Salta alle azioni",
"random-page": "Pagina casuale",
"search": "Cerca",
"year": "Anno",
"month": "Mese",
"calculate": "Calcola",
"show-all": "Mostra tutto",
"just-now": "poco fa", "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",
"month": "Mese",
"n-minutes-ago": "{0} minuti fa", "n-minutes-ago": "{0} minuti fa",
"n-hours-ago": "{0} ore fa", "n-hours-ago": "{0} ore fa",
"n-days-ago": "{0} giorni fa", "n-days-ago": "{0} giorni fa",
"backlinks": "Collegamenti in entrata", "new-note": "Crea nota",
"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-account-sign-up": "Non hai un account?",
"sign-up": "Registrati", "no-tags": "Nessuna etichetta",
"not-found": "Non trovato", "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-1": "La pagina con url",
"not-found-text-2": "non esiste", "not-found-text-2": "non esiste",
"not-found-text": "La pagina con url {0} non esiste", "not-logged-in": "Non autenticato",
"access-denied": "Accesso negato", "note-history": "Cronologia della pagina",
"access-denied-text": "Non hai il permesso per accedere a questa risorsa",
"users-count": "Numero di utenti",
"notes-count": "Numero di pagine", "notes-count": "Numero di pagine",
"notes-count-with-url": "Numero di pagine con URL impostato", "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": "Numero di revisioni",
"revision-count-per-page": "Media di revisioni per pagina", "revision-count-per-page": "Media di revisioni per pagina",
"remember-me-for": "Ricordami per", "search": "Cerca",
"confirm-password": "Conferma password", "search-no-results": "Nessun risultato per",
"email": "E-mail", "show-all": "Mostra tutto",
"optional": "opzionale", "sign-up": "Registrati",
"have-read-terms": "Ho letto i {0} e la {1}", "tags": "Etichette",
"terms-of-service": "Termini di Servizio", "terms-of-service": "Termini di Servizio",
"privacy-policy": "Politica sulla riservatezza", "username": "Nome utente",
"already-have-account": "Hai già un account?", "users-count": "Numero di utenti",
"logged-in-as": "Autenticato come", "welcome": "Benvenuti in {0}!",
"not-logged-in": "Non autenticato",
"owner": "Proprietario",
"write-a-comment": "Scrivi un commento…", "write-a-comment": "Scrivi un commento…",
"input-tags": "Etichette (separate da virgola)", "year": "Anno"
"no-tags": "Nessuna etichetta",
"notes-month-empty": "Non c\u2019\u00e8 nulla :(",
"calendar": "Calendario",
"groups-count": "Numero di gruppi utente"
} }
} }

View file

@ -1,5 +1,6 @@
{ {
"ru":{ "ru":{
"new-note": "Новая страница",
"welcome": "Добро пожаловать в {0}!" "welcome": "Добро пожаловать в {0}!"
} }
} }

View file

@ -15,7 +15,7 @@ dependencies = [
"Flask-WTF", "Flask-WTF",
"python-dotenv>=1.0.0", "python-dotenv>=1.0.0",
"pymysql", "pymysql",
"sakuragasaki46-suou>=0.5.0" "sakuragasaki46-suou>=0.6.0"
] ]
requires-python = ">=3.10" requires-python = ">=3.10"
classifiers = [ classifiers = [

View file

@ -8,7 +8,7 @@ Pages are stored in SQLite/MySQL databases.
Markdown is used for text formatting. Markdown is used for text formatting.
''' '''
__version__ = '1.0.0-dev35' __version__ = '1.0.0'
from flask import ( from flask import (
Flask, abort, flash, g, jsonify, make_response, redirect, Flask, abort, flash, g, jsonify, make_response, redirect,

View file

@ -644,8 +644,8 @@ def create_first_user():
permissions = int(default_permissions) permissions = int(default_permissions)
).returning(UserGroup)).scalar() ).returning(UserGroup)).scalar()
db.session.execute(insert(UserGroupMembership).values( db.session.execute(insert(UserGroupMembership).values(
user = ua, user_id = ua.id,
group = ug group_id = ug.id
)) ))
db.session.commit() db.session.commit()
print('Installed successfully!') print('Installed successfully!')

View file

@ -78,8 +78,8 @@ def register():
join_date = datetime.datetime.now() join_date = datetime.datetime.now()
).returning(User)).scalar() ).returning(User)).scalar()
db.session.execute(insert(UserGroupMembership).values( db.session.execute(insert(UserGroupMembership).values(
user = u, user_id = u.id,
group = UserGroup.get_default() group_id = UserGroup.get_default().id
)) ))
db.session.commit() db.session.commit()

View file

@ -1,8 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ g.lang }}"> <html lang="{{ g.lang }}">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{% block title %} {% block title %}
<title>{{ app_name }}</title> <title>{{ app_name }}</title>

View file

@ -10,8 +10,8 @@
<div class="preview-subtitle">{{ T('notes-tagged') }}</div> <div class="preview-subtitle">{{ T('notes-tagged') }}</div>
<div class="inner-content"> <div class="inner-content">
{% if total_count > 0 %} {% if tagged_notes.total > 0 %}
{{ nl_list(tagged_notes, page_n=page_n, total_count=total_count, hl_tags=(tagname,), other_url='tags/' + tagname) }} {{ nl_list(tagged_notes, hl_tags=(tagname,), other_url='tags/' + tagname) }}
{% else %} {% else %}
<p class="nl-placeholder">{{ T('notes-tagged-empty') }}</p> <p class="nl-placeholder">{{ T('notes-tagged-empty') }}</p>
{% endif %} {% endif %}

View file

@ -16,7 +16,7 @@
{% if not is_main %} {% if not is_main %}
<p class="nl-pagination"> <p class="nl-pagination">
Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong> Showing results <strong>{{ page_n * 20 - 19 }}</strong> to <strong>{{ min(page_n * 20, total_count) }}</strong>
of <strong>{{ total_count }}</strong> total.</p> of <strong>{{ l.total }}</strong> total.</p>
{% endif %} {% endif %}
<ul class="nl-list"> <ul class="nl-list">
@ -62,7 +62,7 @@
{% if is_main %} {% if is_main %}
<li class="nl-next"><a href="/{{ other_url }}/">{{ T('show-all') }}</a></li> <li class="nl-next"><a href="/{{ other_url }}/">{{ T('show-all') }}</a></li>
{% elif page_n <= (total_count - 1) // 20 %} {% elif page_n <= (l.total - 1) // 20 %}
<li class="nl-next"><a href="/{{ other_url }}/?page={{ page_n + 1 }}">Next page &raquo;</a></li> <li class="nl-next"><a href="/{{ other_url }}/?page={{ page_n + 1 }}">Next page &raquo;</a></li>
{% endif %} {% endif %}
</ul> </ul>