diff options
author | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-06-23 20:11:08 -0300 |
---|---|---|
committer | Tulio Casagrande <tcasagra@thoughtworks.com> | 2016-06-23 20:11:08 -0300 |
commit | 0837621dd7a4d843adabd1ea80e42d8599cbe5f7 (patch) | |
tree | 180592cc063b5e83831c8edda0a944a4f3170fd6 /web-ui/app/js/helpers | |
parent | f1e5f54048cfadec42990f3dfb212c7147bf5faa (diff) |
[#619] Fix some missing translation strings
Diffstat (limited to 'web-ui/app/js/helpers')
-rw-r--r-- | web-ui/app/js/helpers/monitored_ajax.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/web-ui/app/js/helpers/monitored_ajax.js b/web-ui/app/js/helpers/monitored_ajax.js index dc182d58..3dfec34a 100644 --- a/web-ui/app/js/helpers/monitored_ajax.js +++ b/web-ui/app/js/helpers/monitored_ajax.js @@ -20,9 +20,9 @@ define(['page/events', 'views/i18n', 'helpers/browser'], function (events, i18n, 'use strict'; var messages = { - timeout: 'a timeout occurred', - error: 'problems talking to server', - parseerror: 'got invalid response from server' + timeout: i18n('error.timeout'), + error: i18n('error.general'), + parseerror: i18n('error.parse') }; function monitoredAjax(on, url, config) { @@ -48,8 +48,7 @@ define(['page/events', 'views/i18n', 'helpers/browser'], function (events, i18n, return $.ajax(url, config).fail(function (xmlhttprequest, textstatus, message) { if (!config.skipErrorMessage) { var msg = (xmlhttprequest.responseJSON && xmlhttprequest.responseJSON.message) || - messages[textstatus] || - 'unexpected problem while talking to server'; + messages[textstatus] || messages.error; on.trigger(document, events.ui.userAlerts.displayMessage, {message: i18n(msg), class: 'error'}); } |