Compare commits

...

7 Commits

Author SHA1 Message Date
Jonas Schäfer
3a81a0140b Revert "Fix spurious mypy error"
This reverts commit 28ff19c19c.
2022-01-08 13:12:30 +01:00
Jonas Schäfer
5b4d4ddd36 Fix some mypy regression 2022-01-08 13:12:30 +01:00
Jonas Schäfer
28ff19c19c Fix spurious mypy error
For whatever reason, it thinks that babel has no __version__ field, but
it in fact does.
2022-01-08 12:52:31 +01:00
uira
8e3837f704 Translated using Weblate (Indonesian)
Currently translated at 100.0% (303 of 303 strings)

Translation: Snikket/Web Portal
Translate-URL: http://i18n.sotecware.net/projects/snikket/web-portal/id/
2021-12-12 07:00:42 +00:00
Matthew Wild
98e7de3166 Merge pull request #104 from snikket-im/feature/enable-restricted-users
admin: Show restricted user role in the UI
2021-11-09 17:03:08 +00:00
Matthew Wild
58c2112fec Merge pull request #102 from snikket-im/feature/pin-wtforms
Pin wtforms to 2.x
2021-11-09 10:48:18 +00:00
Jonas Schäfer
c856afee82 Pin wtforms to 2.x
wtforms 3.0 is incompatible with our code. A separate issue will be
filed to address the incompatibilities, but this should be enough to get
working images out of it.

With 3.x, we're seeing:

```
  File "/home/horazont/Projects/python/snikket-web-portal/snikket_web/main.py", line 35, in LoginForm
    address = wtforms.TextField(
AttributeError: module 'wtforms' has no attribute 'TextField'
```

and the portal fails to start.
2021-11-08 18:07:34 +01:00
4 changed files with 13 additions and 7 deletions

View File

@@ -5,4 +5,5 @@ hsluv~=0.0.2
flask-babel~=1.0
email-validator~=1.1
environ-config~=20.0
wtforms~=2.3
typing-extensions

View File

@@ -6,18 +6,18 @@
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"Report-Msgid-Bugs-To: translations@snikket.org\n"
"POT-Creation-Date: 2021-06-18 16:05+0200\n"
"PO-Revision-Date: 2021-06-21 23:01+0000\n"
"PO-Revision-Date: 2021-12-12 07:00+0000\n"
"Last-Translator: uira <inboxriau@andriana.id>\n"
"Language-Team: Indonesian <https://i18n.sotecware.net/projects/snikket/"
"Language-Team: Indonesian <http://i18n.sotecware.net/projects/snikket/"
"web-portal/id/>\n"
"Language: id\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 4.5.1\n"
"X-Generator: Weblate 4.8.1\n"
"Generated-By: Babel 2.9.0\n"
#: snikket_web/admin.py:66
@@ -980,7 +980,7 @@ msgstr "Perangkat terhubung"
#: snikket_web/templates/admin_system.html:82
msgid "Broadcast message"
msgstr "Siarkan pesan"
msgstr "Sebarkan pesan"
#: snikket_web/templates/admin_system.html:84
msgid ""

View File

@@ -207,7 +207,7 @@ def make_avatar_metadata_set_request(
item,
"metadata", xmlns=NS_USER_AVATAR_METADATA)
attr: typing.MutableMapping[str, str] = {
attr: typing.Dict[str, str] = {
"id": id_,
"bytes": str(size),
"type": mimetype,
@@ -217,7 +217,12 @@ def make_avatar_metadata_set_request(
if height is not None:
attr["height"] = str(height)
ET.SubElement(metadata_wrap, "info", xmlns=NS_USER_AVATAR_METADATA, **attr)
ET.SubElement(
metadata_wrap,
"info",
xmlns=NS_USER_AVATAR_METADATA,
**attr, # type: ignore
)
return req