Remove unused errors and make STF error codes match Android error codes better.

This commit is contained in:
Simo Kinnunen
2014-09-05 14:00:51 +09:00
parent 254994ce3b
commit 77261ffd43
2 changed files with 6 additions and 12 deletions

View File

@@ -6,15 +6,9 @@ var responses = require('./response-codes.json')
module.exports = function installErrorFilter(gettext) {
return function (text) {
switch (text) {
case 'fail_invalid_app_file':
return gettext('Uploaded file is not valid.')
case 'fail_download':
return gettext('Failed to download specified URL.')
case 'fail_invalid_url':
return gettext('The specified URL is invalid.')
case 'fail':
return gettext('Upload failed to due unknown error.')
case 'timeout':
case 'INSTALL_ERROR_UNKNOWN':
return gettext('Installation failed due to an unknown error.')
case 'INSTALL_ERROR_TIMEOUT':
return gettext('Installation timed out.')
default:
return gettext(responses[text] || text)