You've already forked snikket-web-portal
Compare commits
1 Commits
feature/wt
...
feature/ci
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b84b84b394 |
23
.github/workflows/main.yaml
vendored
23
.github/workflows/main.yaml
vendored
@@ -50,6 +50,29 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m flake8 snikket_web
|
python -m flake8 snikket_web
|
||||||
|
|
||||||
|
translation-check:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
name: 'lint: i18n'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: '3.9'
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
pip install flask-babel
|
||||||
|
- name: Linting
|
||||||
|
run: |
|
||||||
|
sed -ri '/^"POT-Creation-Date: /d' snikket_web/translations/messages.pot
|
||||||
|
git add snikket_web/translations/messages.pot
|
||||||
|
make extract_translations
|
||||||
|
sed -ri '/^"POT-Creation-Date: /d' snikket_web/translations/messages.pot
|
||||||
|
git diff --exit-code --color -- snikket_web/translations/messages.pot
|
||||||
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ hsluv~=0.0.2
|
|||||||
flask-babel~=1.0
|
flask-babel~=1.0
|
||||||
email-validator~=1.1
|
email-validator~=1.1
|
||||||
environ-config~=20.0
|
environ-config~=20.0
|
||||||
wtforms~=3.0
|
wtforms~=2.3
|
||||||
typing-extensions
|
typing-extensions
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import aiohttp
|
|||||||
import quart.flask_patch
|
import quart.flask_patch
|
||||||
|
|
||||||
import wtforms
|
import wtforms
|
||||||
|
import wtforms.fields.html5
|
||||||
|
|
||||||
from quart import (
|
from quart import (
|
||||||
Blueprint,
|
Blueprint,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ bp = quart.Blueprint("main", __name__)
|
|||||||
|
|
||||||
|
|
||||||
class LoginForm(BaseForm):
|
class LoginForm(BaseForm):
|
||||||
address = wtforms.StringField(
|
address = wtforms.TextField(
|
||||||
_l("Address"),
|
_l("Address"),
|
||||||
validators=[wtforms.validators.InputRequired()],
|
validators=[wtforms.validators.InputRequired()],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ _ACCESS_MODEL_CHOICES = [
|
|||||||
|
|
||||||
|
|
||||||
class ProfileForm(BaseForm):
|
class ProfileForm(BaseForm):
|
||||||
nickname = wtforms.StringField(
|
nickname = wtforms.TextField(
|
||||||
_l("Display name"),
|
_l("Display name"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user