summaryrefslogtreecommitdiff
path: root/addons/website_twitter
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-03-01 14:56:19 +0000
committerMartin Trigaux <mat@odoo.com>2019-08-01 12:40:01 +0000
commitf8ff7debdc86ee910af881be82f7b67201bcd791 (patch)
treea627efeb739dff7e0a5f24c14ec3e8a34a0426c2 /addons/website_twitter
parentf4319580e576e033b95db1627dd11f126c187323 (diff)
[FIX] *: bad usage of _ method
No need for selection fields If in global variable, the _lt should be used instead closes odoo/odoo#31211 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/website_twitter')
-rw-r--r--addons/website_twitter/models/res_config_settings.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/addons/website_twitter/models/res_config_settings.py b/addons/website_twitter/models/res_config_settings.py
index b0e70529313..b590f379ec1 100644
--- a/addons/website_twitter/models/res_config_settings.py
+++ b/addons/website_twitter/models/res_config_settings.py
@@ -5,21 +5,21 @@ import logging
import requests
-from odoo import api, fields, models, _
+from odoo import api, fields, models, _, _lt
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
TWITTER_EXCEPTION = {
- 304: _('There was no new data to return.'),
- 400: _('The request was invalid or cannot be otherwise served. Requests without authentication are considered invalid and will yield this response.'),
- 401: _('Authentication credentials were missing or incorrect. Maybe screen name tweets are protected.'),
- 403: _('The request is understood, but it has been refused or access is not allowed. Please check your Twitter API Key and Secret.'),
- 429: _('Request cannot be served due to the applications rate limit having been exhausted for the resource.'),
- 500: _('Twitter seems broken. Please retry later. You may consider posting an issue on Twitter forums to get help.'),
- 502: _('Twitter is down or being upgraded.'),
- 503: _('The Twitter servers are up, but overloaded with requests. Try again later.'),
- 504: _('The Twitter servers are up, but the request could not be serviced due to some failure within our stack. Try again later.')
+ 304: _lt('There was no new data to return.'),
+ 400: _lt('The request was invalid or cannot be otherwise served. Requests without authentication are considered invalid and will yield this response.'),
+ 401: _lt('Authentication credentials were missing or incorrect. Maybe screen name tweets are protected.'),
+ 403: _lt('The request is understood, but it has been refused or access is not allowed. Please check your Twitter API Key and Secret.'),
+ 429: _lt('Request cannot be served due to the applications rate limit having been exhausted for the resource.'),
+ 500: _lt('Twitter seems broken. Please retry later. You may consider posting an issue on Twitter forums to get help.'),
+ 502: _lt('Twitter is down or being upgraded.'),
+ 503: _lt('The Twitter servers are up, but overloaded with requests. Try again later.'),
+ 504: _lt('The Twitter servers are up, but the request could not be serviced due to some failure within our stack. Try again later.')
}