FreeBSD Bugzilla – Attachment 210032 Details for
Bug 242616
[NEW PORT] www/py-flask-babelex: Adds i18n/l10n support to Flask applications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
py-flask-babelex.diff
py-flask-babelex.diff (text/plain), 3.84 KB, created by
Goran Mekić
on 2019-12-18 13:10:49 UTC
(
hide
)
Description:
py-flask-babelex.diff
Filename:
MIME Type:
Creator:
Goran Mekić
Created:
2019-12-18 13:10:49 UTC
Size:
3.84 KB
patch
obsolete
>commit 866d399326403d50907d4ee4181720ed8176e228 >Author: Goran MekiÄ <meka@tilda.center> >Date: Wed Dec 18 02:27:04 2019 +0100 > > Add flask-babelex > >diff --git a/www/Makefile b/www/Makefile >index 49b3826ddf08..f4c5c47bc08b 100644 >--- a/www/Makefile >+++ b/www/Makefile >@@ -1627,6 +1627,7 @@ > SUBDIR += py-flask-api > SUBDIR += py-flask-apscheduler > SUBDIR += py-flask-assets >+ SUBDIR += py-flask-babelex > SUBDIR += py-flask-bootstrap > SUBDIR += py-flask-cache > SUBDIR += py-flask-compress >diff --git a/www/py-flask-babelex/Makefile b/www/py-flask-babelex/Makefile >new file mode 100644 >index 000000000000..0e918696438a >--- /dev/null >+++ b/www/py-flask-babelex/Makefile >@@ -0,0 +1,30 @@ >+# $FreeBSD$ >+ >+PORTNAME= Flask-BabelEx >+PORTVERSION= 0.9.3 >+CATEGORIES= www devel python >+MASTER_SITES= CHEESESHOP >+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >+ >+MAINTAINER= meka@tilda.center >+COMMENT= Support i18n/l10n in Flask applications >+ >+LICENSE= MIT >+LICENSE_FILE= ${WRKSRC}/LICENSE >+ >+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Flask>=0:www/py-flask@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}Babel>=0:devel/py-babel@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}speaklater>=0:devel/py-speaklater@${PY_FLAVOR} \ >+ ${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} >+ >+USES= python:3.5+ >+USE_PYTHON= autoplist concurrent distutils >+ >+TEST_ENV= PYTHONPATH=${WRKSRC}/src >+ >+NO_ARCH= yes >+ >+do-test: >+ cd ${WRKSRC}/tests && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest tests.py >+ >+.include <bsd.port.mk> >diff --git a/www/py-flask-babelex/distinfo b/www/py-flask-babelex/distinfo >new file mode 100644 >index 000000000000..ac5750932b35 >--- /dev/null >+++ b/www/py-flask-babelex/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP = 1576631688 >+SHA256 (Flask-BabelEx-0.9.3.tar.gz) = cf79cdedb5ce860166120136b0e059e9d97b8df07a3bc2411f6243de04b754b4 >+SIZE (Flask-BabelEx-0.9.3.tar.gz) = 41040 >diff --git a/www/py-flask-babelex/files/patch-tests_tests.py b/www/py-flask-babelex/files/patch-tests_tests.py >new file mode 100644 >index 000000000000..545514de27ef >--- /dev/null >+++ b/www/py-flask-babelex/files/patch-tests_tests.py >@@ -0,0 +1,29 @@ >+--- tests/tests.py.orig 2019-12-18 13:03:25 UTC >++++ tests/tests.py >+@@ -35,7 +35,7 @@ class DateFormattingTestCase(unittest.TestCase): >+ with app.test_request_context(): >+ app.config['BABEL_DEFAULT_LOCALE'] = 'de_DE' >+ assert babel.format_datetime(d, 'long') == \ >+- '12. April 2010 15:46:00 MESZ' >++ '12. April 2010 um 15:46:00 MESZ' >+ >+ def test_init_app(self): >+ b = babel.Babel() >+@@ -57,7 +57,7 @@ class DateFormattingTestCase(unittest.TestCase): >+ with app.test_request_context(): >+ app.config['BABEL_DEFAULT_LOCALE'] = 'de_DE' >+ assert babel.format_datetime(d, 'long') == \ >+- '12. April 2010 15:46:00 MESZ' >++ '12. April 2010 um 15:46:00 MESZ' >+ >+ def test_custom_formats(self): >+ app = flask.Flask(__name__) >+@@ -95,7 +95,7 @@ class DateFormattingTestCase(unittest.TestCase): >+ the_timezone = 'Europe/Vienna' >+ >+ with app.test_request_context(): >+- assert babel.format_datetime(d) == '12.04.2010 15:46:00' >++ assert babel.format_datetime(d) == '12.04.2010, 15:46:00' >+ >+ def test_refreshing(self): >+ app = flask.Flask(__name__) >diff --git a/www/py-flask-babelex/pkg-descr b/www/py-flask-babelex/pkg-descr >new file mode 100644 >index 000000000000..60d1a974b398 >--- /dev/null >+++ b/www/py-flask-babelex/pkg-descr >@@ -0,0 +1,8 @@ >+This is fork of official Flask-Babel extension with following features: >+ >+ - It is possible to use multiple language catalogs in one Flask application; >+ - Localization domains: your extension can package localization file(s) and >+ use them if necessary; >+ - Does not reload localizations for each request. >+ >+WWW: https://github.com/mrjoes/flask-babelex
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
meka
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 242616
:
209905
| 210032