Closed elinguiuriel closed 4 years ago
Translation do not work for Arabic because de translation module Babel do not support ar_AR
2020-08-20T17:11:05.853054+00:00 app[web.1]: [2020-08-20 17:11:05 +0000] [7] [ERROR] Error handling request /webhook 2020-08-20T17:11:05.853056+00:00 app[web.1]: Traceback (most recent call last): 2020-08-20T17:11:05.853056+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base_async.py", line 55, in handle 2020-08-20T17:11:05.853057+00:00 app[web.1]: self.handle_request(listener_name, req, client, addr) 2020-08-20T17:11:05.853057+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/ggevent.py", line 143, in handle_request 2020-08-20T17:11:05.853058+00:00 app[web.1]: super().handle_request(listener_name, req, sock, addr) 2020-08-20T17:11:05.853058+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base_async.py", line 106, in handle_request 2020-08-20T17:11:05.853059+00:00 app[web.1]: respiter = self.wsgi(environ, resp.start_response) 2020-08-20T17:11:05.853060+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2464, in __call__ 2020-08-20T17:11:05.853060+00:00 app[web.1]: return self.wsgi_app(environ, start_response) 2020-08-20T17:11:05.853060+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2450, in wsgi_app 2020-08-20T17:11:05.853061+00:00 app[web.1]: response = self.handle_exception(e) 2020-08-20T17:11:05.853061+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1867, in handle_exception 2020-08-20T17:11:05.853061+00:00 app[web.1]: reraise(exc_type, exc_value, tb) 2020-08-20T17:11:05.853062+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise 2020-08-20T17:11:05.853063+00:00 app[web.1]: raise value 2020-08-20T17:11:05.853063+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app 2020-08-20T17:11:05.853064+00:00 app[web.1]: response = self.full_dispatch_request() 2020-08-20T17:11:05.853064+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request 2020-08-20T17:11:05.853064+00:00 app[web.1]: rv = self.handle_user_exception(e) 2020-08-20T17:11:05.853065+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception 2020-08-20T17:11:05.853065+00:00 app[web.1]: reraise(exc_type, exc_value, tb) 2020-08-20T17:11:05.853081+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise 2020-08-20T17:11:05.853082+00:00 app[web.1]: raise value 2020-08-20T17:11:05.853082+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request 2020-08-20T17:11:05.853082+00:00 app[web.1]: rv = self.dispatch_request() 2020-08-20T17:11:05.853083+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request 2020-08-20T17:11:05.853083+00:00 app[web.1]: return self.view_functions[rule.endpoint](**req.view_args) 2020-08-20T17:11:05.853083+00:00 app[web.1]: File "/app/services/messenger.py", line 977, in webhook 2020-08-20T17:11:05.853084+00:00 app[web.1]: messenger.handle(message) 2020-08-20T17:11:05.853084+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/fbmessenger/__init__.py", line 287, in handle 2020-08-20T17:11:05.853085+00:00 app[web.1]: return self.postback(message) 2020-08-20T17:11:05.853085+00:00 app[web.1]: File "/app/services/messenger.py", line 931, in postback 2020-08-20T17:11:05.853086+00:00 app[web.1]: process_postback(self, payload) 2020-08-20T17:11:05.853086+00:00 app[web.1]: File "/app/services/messenger.py", line 188, in process_postback 2020-08-20T17:11:05.853086+00:00 app[web.1]: send_start_messages(messenger) 2020-08-20T17:11:05.853087+00:00 app[web.1]: File "/app/services/messenger.py", line 78, in send_start_messages 2020-08-20T17:11:05.853087+00:00 app[web.1]: **user 2020-08-20T17:11:05.853087+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask_babel/__init__.py", line 548, in gettext 2020-08-20T17:11:05.853088+00:00 app[web.1]: t = get_translations() 2020-08-20T17:11:05.853088+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask_babel/__init__.py", line 221, in get_translations 2020-08-20T17:11:05.853089+00:00 app[web.1]: [get_locale()], 2020-08-20T17:11:05.853089+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/flask_babel/__init__.py", line 255, in get_locale 2020-08-20T17:11:05.853089+00:00 app[web.1]: locale = Locale.parse(rv) 2020-08-20T17:11:05.853090+00:00 app[web.1]: File "/usr/local/lib/python3.7/site-packages/babel/core.py", line 331, in parse 2020-08-20T17:11:05.853090+00:00 app[web.1]: raise UnknownLocaleError(input_id) 2020-08-20T17:11:05.853090+00:00 app[web.1]: babel.core.UnknownLocaleError: unknown locale 'ar_AR'
We ne to find a way to map ar_AR to ar
ar_AR
ar
Put your facebook default language to Arabic
Describe the bug
Translation do not work for Arabic because de translation module Babel do not support ar_AR
Expected behavior
We ne to find a way to map
ar_AR
toar
Additional context
Put your facebook default language to Arabic