svn commit: r522682 - in head/www: . py-flask-babelex py-flask-babelex/files
Kubilay Kocak
koobs at FreeBSD.org
Sat Jan 11 12:30:19 UTC 2020
Author: koobs
Date: Sat Jan 11 12:30:17 2020
New Revision: 522682
URL: https://svnweb.freebsd.org/changeset/ports/522682
Log:
[NEW] www/py-flask-babelex: Support i18n/l10n in Flask applications
This is fork of official Flask-Babel extension with following features:
- 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
PR: 242616
Submitted by: Goran Mekić <mek tilda center>
Added:
head/www/py-flask-babelex/
head/www/py-flask-babelex/Makefile (contents, props changed)
head/www/py-flask-babelex/distinfo (contents, props changed)
head/www/py-flask-babelex/files/
head/www/py-flask-babelex/files/patch-tests_tests.py (contents, props changed)
head/www/py-flask-babelex/pkg-descr (contents, props changed)
Modified:
head/www/Makefile
Modified: head/www/Makefile
==============================================================================
--- head/www/Makefile Sat Jan 11 12:18:08 2020 (r522681)
+++ head/www/Makefile Sat Jan 11 12:30:17 2020 (r522682)
@@ -1626,6 +1626,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-collect
Added: head/www/py-flask-babelex/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/py-flask-babelex/Makefile Sat Jan 11 12:30:17 2020 (r522682)
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+PORTNAME= flask-babelex
+PORTVERSION= 0.9.3
+CATEGORIES= www devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= Flask-BabelEx-${DISTVERSION}
+
+MAINTAINER= meka at 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>=1.0:devel/py-babel@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}speaklater>=1.2:devel/py-speaklater@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}Jinja2>=2.5: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} tests.py
+
+.include <bsd.port.mk>
Added: head/www/py-flask-babelex/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/py-flask-babelex/distinfo Sat Jan 11 12:30:17 2020 (r522682)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1576631688
+SHA256 (Flask-BabelEx-0.9.3.tar.gz) = cf79cdedb5ce860166120136b0e059e9d97b8df07a3bc2411f6243de04b754b4
+SIZE (Flask-BabelEx-0.9.3.tar.gz) = 41040
Added: head/www/py-flask-babelex/files/patch-tests_tests.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/py-flask-babelex/files/patch-tests_tests.py Sat Jan 11 12:30:17 2020 (r522682)
@@ -0,0 +1,33 @@
+# Failing test: test_custom_locale_selector
+# https://github.com/mrjoes/flask-babelex/issues/17
+# TODO: Upstream
+
+--- 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__)
Added: head/www/py-flask-babelex/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/py-flask-babelex/pkg-descr Sat Jan 11 12:30:17 2020 (r522682)
@@ -0,0 +1,8 @@
+This is fork of official Flask-Babel extension with following features:
+
+ - 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
More information about the svn-ports-head
mailing list