File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
translations/fr/LC_MESSAGES Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- flaskext.babel
3
- ~~~~~~~~~~~~~~
2
+ flask_babel
3
+ ~~~~~~~~~~~
4
4
5
5
Implements i18n/l10n support for Flask applications based on Babel.
6
6
@@ -151,7 +151,7 @@ def list_translations(self):
151
151
if not os .path .isdir (locale_dir ):
152
152
continue
153
153
154
- if filter ( lambda x : x .endswith ('.mo' ), os .listdir (locale_dir )):
154
+ if any ( x .endswith ('.mo' ) for x in os .listdir (locale_dir )):
155
155
result .append (Locale .parse (folder ))
156
156
157
157
# If not other translations are found, add the default locale.
Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ def test_no_request_context():
22
22
def test_multiple_directories ():
23
23
"""
24
24
Ensure we can load translations from multiple directories.
25
+
26
+ This also ensures that directories without any translation files
27
+ are not taken into account.
25
28
"""
26
29
b = babel .Babel ()
27
30
app = flask .Flask (__name__ )
You can’t perform that action at this time.
0 commit comments