Skip to content

Commit

Permalink
Switch to Flask-Babel (hasgeek#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
jace authored Jul 7, 2022
1 parent dedf0c4 commit a332212
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 20 deletions.
2 changes: 1 addition & 1 deletion funnel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import os.path

from flask import Flask
from flask_babelhg import get_locale
from flask_babel import get_locale
from flask_flatpages import FlatPages
from flask_mailman import Mail
from flask_migrate import Migrate
Expand Down
2 changes: 1 addition & 1 deletion funnel/forms/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from hashlib import sha1
from typing import Dict, Iterable, Optional

from flask_babelhg import ngettext
from flask_babel import ngettext

import requests

Expand Down
2 changes: 1 addition & 1 deletion funnel/forms/venue.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import gettext
import re

from flask_babelhg import get_locale
from flask_babel import get_locale

import pycountry

Expand Down
2 changes: 1 addition & 1 deletion funnel/models/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from datetime import datetime, timedelta
from typing import Any, Dict, Optional, Type

from flask_babelhg import get_locale
from flask_babel import get_locale
from werkzeug.utils import cached_property

from babel.dates import format_date
Expand Down
2 changes: 1 addition & 1 deletion funnel/views/account_reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
session,
url_for,
)
from flask_babelhg import ngettext
from flask_babel import ngettext
import itsdangerous

from baseframe import _
Expand Down
2 changes: 1 addition & 1 deletion funnel/views/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from uuid import uuid4

from flask import url_for
from flask_babelhg import force_locale
from flask_babel import force_locale
from werkzeug.utils import cached_property

from typing_extensions import Literal
Expand Down
2 changes: 1 addition & 1 deletion funnel/views/notifications/rsvp_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List, Optional

from flask import render_template
from flask_babelhg import get_locale
from flask_babel import get_locale

from baseframe import _, __
from baseframe.filters import datetime_filter
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ known_flask = [
'wtforms',
'webassets',
'flask_assets',
'flask_babelhg',
'flask_babel',
'flask_executor',
'flask_flatpages',
'flask_mailman',
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dataclasses-json
fabric3
Flask
Flask-Assets
Flask-Babel
Flask-Executor
Flask-FlatPages
flask-mailman
Expand All @@ -24,7 +25,6 @@ furl
geoip2
git+https://github.com/hasgeek/baseframe.git#egg=baseframe
git+https://github.com/hasgeek/coaster.git#egg=coaster
git+https://github.com/hasgeek/flask-babelhg.git#egg=Flask-Babelhg
html2text
icalendar
idna>=2.5
Expand Down
13 changes: 5 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ attrs==21.4.0
babel==2.10.3
# via
# -r requirements.in
# flask-babelhg
# flask-babel
base58==2.1.1
# via
# -r requirements.in
Expand Down Expand Up @@ -114,7 +114,7 @@ flask==2.1.2
# baseframe
# coaster
# flask-assets
# flask-babelhg
# flask-babel
# flask-caching
# flask-executor
# flask-flatpages
Expand All @@ -130,7 +130,7 @@ flask-assets==2.0
# -r requirements.in
# baseframe
# coaster
flask-babelhg @ git+https://github.com/hasgeek/flask-babelhg.git
flask-babel==2.0.0
# via
# -r requirements.in
# baseframe
Expand Down Expand Up @@ -211,7 +211,7 @@ jinja2==3.1.2
# via
# coaster
# flask
# flask-babelhg
# flask-babel
# flask-flatpages
joblib==1.1.0
# via nltk
Expand Down Expand Up @@ -347,6 +347,7 @@ pytz==2022.1
# babel
# baseframe
# coaster
# flask-babel
# icalendar
# twilio
pytz-deprecation-shim==0.1.0.post0
Expand Down Expand Up @@ -403,8 +404,6 @@ semantic-version==2.10.0
# coaster
sentry-sdk==1.6.0
# via baseframe
simplejson==3.17.6
# via coaster
six==1.16.0
# via
# bleach
Expand All @@ -424,8 +423,6 @@ six==1.16.0
# sqlalchemy-utils
# tuspy
# url-normalize
speaklater==1.3
# via baseframe
sqlalchemy==1.4.39
# via
# -r requirements.in
Expand Down
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dill==0.3.5.1
# via pylint
distlib==0.3.4
# via virtualenv
djlint==1.4.0
djlint==1.6.0
# via -r requirements_dev.in
filelock==3.7.1
# via virtualenv
Expand Down Expand Up @@ -216,7 +216,7 @@ tomli==2.0.1
# pep517
# pylint
# pytest
tomlkit==0.11.0
tomlkit==0.11.1
# via pylint
tqdm==4.64.0
# via djlint
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/models/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from sqlalchemy.exc import StatementError

from flask_babelhg import lazy_gettext
from flask_babel import lazy_gettext

import pytest

Expand Down

0 comments on commit a332212

Please sign in to comment.