-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,9 @@ | |
|
||
'use strict'; | ||
|
||
/* global $ */ | ||
|
||
import translateUI from './translateUI.js'; | ||
import zimArchive from './zimArchive.js'; | ||
|
||
/** | ||
|
@@ -72,16 +75,16 @@ function scanForArchives (storages, callbackFunction, callbackError) { | |
$.when.apply(null, promises).then(function () { | ||
callbackFunction(directories); | ||
}).catch(function (error) { | ||
callbackError('Error scanning your device storage : ' + error + | ||
". If you're using the Firefox OS Simulator, please put the archives in " + | ||
"a 'fake-sdcard' directory inside your Firefox profile " + | ||
callbackError((translateUI.t('dialog-scanstorage-error-message') || 'Error scanning your device storage:') + ' ' + error + '. ' + | ||
(translateUI.t('dialog-scanstorage-fxos-error-message') || ("If you're using the Firefox OS Simulator, please put the archives in " + | ||
'a "fake-sdcard" directory inside your Firefox profile ' + | ||
'(ex : ~/.mozilla/firefox/xxxx.default/extensions/[email protected]/' + | ||
'profile/fake-sdcard/wikipedia_en_ray_charles_2015-06.zim)', 'Error reading Device Storage'); | ||
'profile/fake-sdcard/wikipedia_en_ray_charles_2015-06.zim)')), translateUI.t('dialog-scanstorage-fxos-error-title') || 'Error scanning Device Storage'); | ||
}); | ||
} | ||
|
||
export default { | ||
loadArchiveFromDeviceStorage: loadArchiveFromDeviceStorage, | ||
loadArchiveFromFiles: loadArchiveFromFiles, | ||
scanForArchives: scanForArchives | ||
}; | ||
}; |