Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct config language key to pt_BR #4854

Merged
merged 1 commit into from Apr 20, 2018
Merged

Conversation

pld
Copy link
Contributor

@pld pld commented Apr 20, 2018

With the current value of pt-BR Superset throws the following exception:

        Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/security/views.py", line 503, in login
    appbuilder=self.appbuilder)
  File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/baseviews.py", line 160, in render_template
    return render_template(template, **dict(list(kwargs.items()) + list(self.extra_args.items())))
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/usr/local/lib/python2.7/dist-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/templates/appbuilder/general/security/login_oauth.html", line 2, in top-level template code
    {% extends "appbuilder/base.html" %}
  File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/templates/appbuilder/base.html", line 1, in top-level template code
    {% extends base_template %}
  File "/usr/local/lib/python2.7/dist-packages/superset/templates/superset/base.html", line 1, in top-level template code
    {% extends "appbuilder/baselayout.html" %}
  File "/usr/local/lib/python2.7/dist-packages/superset/templates/appbuilder/baselayout.html", line 2, in top-level template code
    {% import 'appbuilder/baselib.html' as baselib %}
  File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/templates/appbuilder/init.html", line 46, in top-level template code
    {% block body %}
  File "/usr/local/lib/python2.7/dist-packages/superset/templates/appbuilder/baselayout.html", line 5, in block "body"
    {% include 'appbuilder/general/confirm.html' %}
  File "/usr/local/lib/python2.7/dist-packages/flask_appbuilder/templates/appbuilder/general/confirm.html", line 6, in top-level template code
    {{_('User confirmation needed')}}
  File "/usr/local/lib/python2.7/dist-packages/jinja2/ext.py", line 134, in _gettext_alias
    return __context.call(__context.resolve('gettext'), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/jinja2/ext.py", line 140, in gettext
    rv = __context.call(func, __string)
  File "/usr/local/lib/python2.7/dist-packages/flask_babel/__init__.py", line 113, in <lambda>
    lambda x: get_translations().ugettext(x),
  File "/usr/local/lib/python2.7/dist-packages/flask_babel/__init__.py", line 216, in get_translations
    catalog = support.Translations.load(dirname, [get_locale()])
  File "/usr/local/lib/python2.7/dist-packages/flask_babel/__init__.py", line 248, in get_locale
    locale = Locale.parse(rv)
  File "/usr/local/lib/python2.7/dist-packages/babel/core.py", line 268, in parse
    parts = parse_locale(identifier, sep=sep)
  File "/usr/local/lib/python2.7/dist-packages/babel/core.py", line 1094, in parse_locale
    raise ValueError('expected only letters, got %r' % lang)
ValueError: expected only letters, got u'pt-br'

the correct value is pt_BR

@codecov-io
Copy link

Codecov Report

Merging #4854 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4854   +/-   ##
=======================================
  Coverage   76.96%   76.96%           
=======================================
  Files          44       44           
  Lines        8534     8534           
=======================================
  Hits         6568     6568           
  Misses       1966     1966
Impacted Files Coverage Δ
superset/config.py 92.3% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e88b0b6...f738108. Read the comment docs.

@mistercrunch mistercrunch merged commit c92b56e into apache:master Apr 20, 2018
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this pull request May 31, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.25.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants